Class: RawgApi::Clients::Games
- Inherits:
-
BaseClient
- Object
- ApiStruct::Client
- BaseClient
- RawgApi::Clients::Games
show all
- Defined in:
- lib/rawg_api/clients/games.rb,
lib/rawg_api/clients/game/twich.rb,
lib/rawg_api/clients/game/reddit.rb,
lib/rawg_api/clients/game/series.rb,
lib/rawg_api/clients/game/stores.rb,
lib/rawg_api/clients/game/details.rb,
lib/rawg_api/clients/game/youtube.rb,
lib/rawg_api/clients/game/trailers.rb,
lib/rawg_api/clients/game/additions.rb,
lib/rawg_api/clients/game/screenshots.rb,
lib/rawg_api/clients/game/achievements.rb,
lib/rawg_api/clients/game/parent_games.rb,
lib/rawg_api/clients/game/suggested_games.rb,
lib/rawg_api/clients/game/development_team.rb
Defined Under Namespace
Classes: Achievements, Additions, Details, DevelopmentTeam, ParentGames, Reddit, Screenshots, Series, Stores, SuggestedGames, Trailers, Twitch, Youtube
Constant Summary
Constants inherited
from BaseClient
BaseClient::DEFAULT_PAGE_SIZE
Instance Method Summary
collapse
-
#all(page: 1, page_size: DEFAULT_PAGE_SIZE) ⇒ Object
-
#search(page: 1, page_size: DEFAULT_PAGE_SIZE, title: nil, exclude_collection: nil, exclude_parents: nil, exclude_game_series: nil, order: nil, parent_platforms: [], platforms: [], stores: [], developers: [], publishers: [], genres: [], tags: [], creators: [], dates: [], platforms_count: []) ⇒ Object
Instance Method Details
#all(page: 1, page_size: DEFAULT_PAGE_SIZE) ⇒ Object
6
7
8
|
# File 'lib/rawg_api/clients/games.rb', line 6
def all(page: 1, page_size: DEFAULT_PAGE_SIZE)
get(params: {page: page, page_size: page_size})
end
|
#search(page: 1, page_size: DEFAULT_PAGE_SIZE, title: nil, exclude_collection: nil, exclude_parents: nil, exclude_game_series: nil, order: nil, parent_platforms: [], platforms: [], stores: [], developers: [], publishers: [], genres: [], tags: [], creators: [], dates: [], platforms_count: []) ⇒ Object
10
11
12
13
14
15
16
17
18
|
# File 'lib/rawg_api/clients/games.rb', line 10
def search(page: 1, page_size: DEFAULT_PAGE_SIZE, title: nil, exclude_collection: nil,
exclude_parents: nil, exclude_game_series: nil, order: nil,
parent_platforms: [], platforms: [], stores: [], developers: [],
publishers: [], genres: [], tags: [], creators: [], dates: [],
platforms_count: [])
search_params = build_search_params(binding)
get(params: search_params)
end
|