Rawg class
Constructors
Rawg ({required String apiKey })
Constructor to inizialize the API KEY
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString ()
→ String
A string representation of this object.
inherited
Static Properties
key
↔ String ?
Api key for authentication
getter/setter pair
Static Methods
getAchievements ({required int id })
→ Future <List <Achievement > >
Get a list of Achievement
params: page
return an empty list if the page does not exist
getGameDetails ({required int id })
→ Future <Game >
Get a Game by ID with more details (achievement count, alias names, original name, website)
getGames ({int page = 1 , Ordering ? order , String ? query , String ? platforms , String ? genres })
→ Future <List <Game > >
Get a list of Game
params: page, ordering, query, platforms, genres
You can sort the results by the enum Ordering
For the platforms and genres you can use the ID or SLUG separated by ',' for the search Rawg.getGames(platforms: "1,2,3") or Rawg.getGames(platforms: "pc")
return an empty list if the page does not exist
getGenres ()
→ Future <List <Genre > >
Get a list of Genre
getPlatforms ()
→ Future <List <Platform > >
Get a list of Platform
getPublisher ({int page = 1 })
→ Future <List <Publisher > >
Get a list of Publisher
getScreenshot ({required int gameID })
→ Future <List <String > >
Get a list of String (URI of image)
params: ID of the game
getStore ({int page = 1 })
→ Future <List <Store > >
Get a list of Store
getStoreForGame ({required int gameID })
→ Future <List <String > >
Get a list of String (uri of store thath sell the game)
getTrailers ({required int gameID })
→ Future <List <String > >
Get a list of String (URI of video)
params: ID of the game