igdb_client 0.0.6 copy "igdb_client: ^0.0.6" to clipboard
igdb_client: ^0.0.6 copied to clipboard

outdated

A dart library for IGDB API

igdb_client #

A Dart library for using the IGDB.com API v4 https://api-docs.igdb.com/

It is highly recommended to read through the IGDB documentation to understand what exactly you can do with the API.

Usage in Web and Mobile Applications #

From the IGDB documentation on Web and Mobile applications

What?

The IGDB V4 API uses Oauth App Tokens, which aren’t suitable for mobile or frontend-only applications:

  • There is a limit of roughly 25 app tokens active at any time
  • Tokens expire after roughly 60 days. To help transition to V4, we are providing a quick way to setup a proxy for mobile applications.

How?

Please follow our proxy guide!!

Usage #

To start using this, just add it to your pubspec:

pub package

See example/igdb_client_example.dart for a more in depth example of some of the things you can do with this client. Otherwise a simple example can be found below.

import 'package:igdb_client/igdb_client.dart';

var client = await IGDBClient.create(MY_USER_AGENT, MY_CLIENT_ID, MY_CLIENT_SECRET);

var gamesResponse = await client.games(new IGDBRequestParameters(
  limit: 3
));

print(IGDBClient.getPrettyStringFromMap(gamesResponse.toMap()));

if (gamesResponse.isSuccess()) {
  // do something with gamesResponse.data
}
else {
  // do something depending on gamesResponse.error
}
3
likes
30
pub points
0%
popularity

Publisher

unverified uploader

A dart library for IGDB API

Repository (GitHub)
View/report issues

License

BSD-2-Clause (license)

Dependencies

http

More

Packages that depend on igdb_client