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);
// get the screenshot
List<String> screen = await Rawg.getScreenshot(gameID: 5);
// get the trailer
List<String> trailer = await Rawg.getTrailers(gameID: 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();
- publisher
// get the publisher
List<Publisher> publisher = await Ragw.getPublisher();
- store
// get the store
List<Store> publisher = await Ragw.getStore();
// get the store for game
List<String> gameStore = await Rawg.getStoreForGame(gameID: 5);
TODO
- Get links to the stores that sell the game
Libraries
- controller/achievement_controller
- controller/game_controller
- controller/genre_controller
- controller/platform_controller
- controller/publisher_controller
- controller/rawg
- controller/rawg_utils
- controller/store_controller
- controller/utils
- models/achievement
- models/errors
- models/game
- models/genre
- models/ordering
- models/platform
- models/publisher
- models/store
- rawg_dart_wrapper