rawg_dart_wrapper 1.0.1 rawg_dart_wrapper: ^1.0.1 copied to clipboard
A Dart package to let users easily integrate RAWG API.
RAWG Wrapper #
RAWG API Documentation #
RAGW API Docs Avalible here.
https://api.rawg.io/docs/
Import #
import 'package:rawg_dart_wrapper/rawg_dart_wrapper.dart';
Usage #
- Initialize
Rawg(apiKey: "0000000000000000");
// now you can use the static methods
- Usage
- games
// get all games
List<Game> games = await Rawg.getGames(page: 1);
List<Game> games = await Rawg.getGames(order: Ordering.released); // custom order
// search for games
List<Game> games = await Rawg.getGames(query: "Call of duty");
// get details
Game detail = await Rawg.getGameDetails(id: 5);
- genres
// get the genres
List<Genre> genres = await Rawg.getGenres();
- achievements
Game game = ... // single game from getGames()
// get the achievement for game
List<Achievement> achievement = await Ragw.getAchievements(id: game.id);
List<Achievement> achievement = await Ragw.getAchievements(id: game.id, page: 3);
- platforms
// get the platform
List<Platform> platforms = await Ragw.getPlatforms();
TODO #
- Screenshot for game
- Search games by platform
- Search games by genre
- Store wrapper