swapi_client 0.1.0

Dart native js
Flutter Android iOS web

A library that makes it easy to fetch data from SWAPI - The Star Wars API.

swapi_client #

Build Status codecov

A library that makes it easy to fetch data from SWAPI - The Star Wars API.

This is a pure Dart library which relies on the http package. Therefore, it can be used cross-platform, from Flutter to Web to server-side.

Usage #

You can fetch data from the Star Wars API without any api or auth tokens. Simply create an instance of the SwapiClient class and start fetching away!

import 'package:swapi_client/swapi_client.dart';

void main() async {
  final swapi = SwapiClient();

  // Fetches and prints the list of Star Wars Films
  print(await swapi.films());

  // Fetches and prints the first page of Star Wars characters. Pagination
  // information included as part of the response, so it's easy to create
  // paginated experiences!
  print(await swapi.people());
}

Features and bugs #

Please file feature requests and bugs at the issue tracker.

0
likes
90
pub points
18%
popularity

A library that makes it easy to fetch data from SWAPI - The Star Wars API.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

brian@brianegan.com

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on swapi_client