RAWG Wrapper

Pub

RAWG API Documentation

RAGW API Docs Avalible here.

https://api.rawg.io/docs/

Import

import 'package:rawg_dart_wrapper/rawg_dart_wrapper.dart';

Usage

  1. Initialize
Rawg(apiKey: "0000000000000000");

// now you can use the static methods
  1. 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