Class: ZombieBattleground::Api
- Inherits:
-
Object
- Object
- ZombieBattleground::Api
- Extended by:
- Extensions
- Defined in:
- lib/zombie_battleground/api.rb,
lib/zombie_battleground/api/client.rb,
lib/zombie_battleground/api/errors.rb,
lib/zombie_battleground/api/version.rb,
lib/zombie_battleground/api/constants.rb,
lib/zombie_battleground/api/extensions.rb,
lib/zombie_battleground/api/models/card.rb,
lib/zombie_battleground/api/models/deck.rb,
lib/zombie_battleground/api/models/match.rb,
lib/zombie_battleground/api/extensions/cards.rb,
lib/zombie_battleground/api/extensions/decks.rb,
lib/zombie_battleground/api/validation_helper.rb,
lib/zombie_battleground/api/models/simple_card.rb,
lib/zombie_battleground/api/requests/request_helper.rb,
lib/zombie_battleground/api/requests/get_card_request.rb,
lib/zombie_battleground/api/requests/get_deck_request.rb,
lib/zombie_battleground/api/responses/response_helper.rb,
lib/zombie_battleground/api/requests/get_cards_request.rb,
lib/zombie_battleground/api/requests/get_decks_request.rb,
lib/zombie_battleground/api/requests/get_match_request.rb,
lib/zombie_battleground/api/responses/get_card_response.rb,
lib/zombie_battleground/api/responses/get_deck_response.rb,
lib/zombie_battleground/api/requests/get_matches_request.rb,
lib/zombie_battleground/api/responses/get_cards_response.rb,
lib/zombie_battleground/api/responses/get_decks_response.rb,
lib/zombie_battleground/api/responses/get_match_response.rb,
lib/zombie_battleground/api/responses/get_matches_response.rb
Overview
API for Zombie Battleground
Defined Under Namespace
Modules: Extensions, ValidationHelper Classes: Client, Errors, Models, Requests, Responses
Constant Summary collapse
- VERSION =
Verion of the Gem
'0.5.2'
- PAGE_MAX =
Max items per page
100
- DECK_REQUIRED_CARDS_COUNT =
Required amount of cards in deck
30
Class Method Summary collapse
-
.card(**args) ⇒ ZombieBattleground::Api::Models::Card
Queries for a Card and returns the card in the response.
-
.card_request(**args) ⇒ ZombieBattleground::Api::Responses::GetCardResponse
Queries for a Card and returns the response.
-
.cards(**args) ⇒ Array<ZombieBattleground::Api::Models::Card>
Queries for Cards and returns the cards in the response.
-
.cards_request(**args) ⇒ ZombieBattleground::Api::Responses::GetCardsResponse
Queries for Cards and returns the response.
-
.deck(**args) ⇒ ZombieBattleground::Api::Models::Deck
Queries for a Deck and returns deck in the response.
-
.deck_request(**args) ⇒ ZombieBattleground::Api::Responses::GetDeckResponse
Queries for a Deck and returns the response.
-
.decks(**args) ⇒ Array<ZombieBattleground::Api::Models::Deck>
Queries for Decks and returns the decks in the response.
-
.decks_request(**args) ⇒ ZombieBattleground::Api::Responses::GetDecksResponse
Queries for Decks and returns a modeled response.
-
.match(**args) ⇒ ZombieBattleground::Api::Models::Match
Queries for a Match and returns the match in the response.
-
.match_request(**args) ⇒ ZombieBattleground::Api::Responses::GetMatchResponse
Queries for a Match and returns the response.
-
.matches(**args) ⇒ Array<ZombieBattleground::Api::Models::Match>
Queries for Matches and returns the matches in the response.
-
.matches_request(**args) ⇒ ZombieBattleground::Api::Responses::GetMatchesResponse
Queries for Matches and returns the response.
Methods included from Extensions::Decks
Methods included from Extensions::Cards
#all_cards, #card_factions, #card_kinds, #card_ranks, #card_rarities, #card_sets, #card_types, #cards_by_faction, #cards_by_kind, #cards_by_rank, #cards_by_rarity, #cards_by_set, #cards_by_type
Class Method Details
.card(**args) ⇒ ZombieBattleground::Api::Models::Card
Queries for a Card and returns the card in the response
263 264 265 |
# File 'lib/zombie_battleground/api.rb', line 263 def card(**args) card_request(**args).card end |
.card_request(**args) ⇒ ZombieBattleground::Api::Responses::GetCardResponse
Queries for a Card and returns the response
246 247 248 |
# File 'lib/zombie_battleground/api.rb', line 246 def card_request(**args) @client.card_request(**args) end |
.cards(**args) ⇒ Array<ZombieBattleground::Api::Models::Card>
Queries for Cards and returns the cards in the response
229 230 231 |
# File 'lib/zombie_battleground/api.rb', line 229 def cards(**args) cards_request(**args).cards end |
.cards_request(**args) ⇒ ZombieBattleground::Api::Responses::GetCardsResponse
Queries for Cards and returns the response
200 201 202 |
# File 'lib/zombie_battleground/api.rb', line 200 def cards_request(**args) @client.cards_request(**args) end |
.deck(**args) ⇒ ZombieBattleground::Api::Models::Deck
Queries for a Deck and returns deck in the response
93 94 95 |
# File 'lib/zombie_battleground/api.rb', line 93 def deck(**args) deck_request(**args).deck end |
.deck_request(**args) ⇒ ZombieBattleground::Api::Responses::GetDeckResponse
Queries for a Deck and returns the response
77 78 79 |
# File 'lib/zombie_battleground/api.rb', line 77 def deck_request(**args) @client.deck_request(**args) end |
.decks(**args) ⇒ Array<ZombieBattleground::Api::Models::Deck>
Queries for Decks and returns the decks in the response
61 62 63 |
# File 'lib/zombie_battleground/api.rb', line 61 def decks(**args) decks_request(**args).decks end |
.decks_request(**args) ⇒ ZombieBattleground::Api::Responses::GetDecksResponse
Queries for Decks and returns a modeled response
36 37 38 |
# File 'lib/zombie_battleground/api.rb', line 36 def decks_request(**args) @client.decks_request(**args) end |
.match(**args) ⇒ ZombieBattleground::Api::Models::Match
Queries for a Match and returns the match in the response
171 172 173 |
# File 'lib/zombie_battleground/api.rb', line 171 def match(**args) match_request(**args).match end |
.match_request(**args) ⇒ ZombieBattleground::Api::Responses::GetMatchResponse
Queries for a Match and returns the response
155 156 157 |
# File 'lib/zombie_battleground/api.rb', line 155 def match_request(**args) @client.match_request(**args) end |
.matches(**args) ⇒ Array<ZombieBattleground::Api::Models::Match>
Queries for Matches and returns the matches in the response
139 140 141 |
# File 'lib/zombie_battleground/api.rb', line 139 def matches(**args) matches_request(**args).matches end |
.matches_request(**args) ⇒ ZombieBattleground::Api::Responses::GetMatchesResponse
Queries for Matches and returns the response
116 117 118 |
# File 'lib/zombie_battleground/api.rb', line 116 def matches_request(**args) @client.matches_request(**args) end |