public interface VideogameRestInterface
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FIELD_LIST |
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<VideogameJSON> |
getVideogameInfo(java.lang.String gameId,
java.lang.String apiKey)
Get data for a specific videogame
|
retrofit2.Call<VideogameSearchJSON> |
searchVideogames(java.lang.String query,
int maxResults,
java.lang.String apiKey)
Searches videogames
|
static final java.lang.String FIELD_LIST
@GET(value="search?format=json&resources=game") retrofit2.Call<VideogameSearchJSON> searchVideogames(@Query(value="query") java.lang.String query, @Query(value="limit") int maxResults, @Query(value="api_key") java.lang.String apiKey)
query
- the title to searchmaxResults
- max number of resultsapiKey
- the service API key@GET(value="game/{gameId}/?format=json&field_list=id,original_release_date,expected_release_day,expected_release_month,expected_release_year,genres,name,deck,developers,publishers,platforms,image") retrofit2.Call<VideogameJSON> getVideogameInfo(@Path(value="gameId") java.lang.String gameId, @Query(value="api_key") java.lang.String apiKey)
gameId
- the ID of the videogameapiKey
- the service API key