Class: ZombieBattleground::Api::Requests::GetCardsRequest

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations, RequestHelper, ValidationHelper
Defined in:
lib/zombie_battleground/api/requests/get_cards_request.rb

Overview

Request validator for GetCards

Constant Summary

Constants included from RequestHelper

RequestHelper::BLACKLISTED_INSTANCE_VARIABLES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RequestHelper

#params

Instance Attribute Details

#costInteger

Optionally set the Card’s cost for filtered querying

Examples:

request.cost #=> 1

Returns:

  • (Integer)


160
161
162
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 160

def cost
  @cost
end

#damageInteger

Optionally set the Card’s damage for filtered querying

Examples:

request.damage #=> 1

Returns:

  • (Integer)


136
137
138
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 136

def damage
  @damage
end

#healthInteger

Optionally set the Card’s health for filtered querying

Examples:

request.health #=> 1

Returns:

  • (Integer)


148
149
150
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 148

def health
  @health
end

#idInteger

Optionally set the Card’s id for filtered querying

Examples:

request.id #=> 1

Returns:

  • (Integer)


28
29
30
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 28

def id
  @id
end

#kindString

Optionally set the Card’s set for filtered querying

Examples:

request.set #=> "AIR"

Returns:

  • (String)


64
65
66
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 64

def kind
  @kind
end

#limitInteger

Optionally set the limit for max Cards returned

Examples:

request.limit #=> 100

Returns:

  • (Integer)


184
185
186
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 184

def limit
  @limit
end

#mould_idString

Optionally mould_id the Card’s mould_id for filtered querying

Examples:

request.mould_id #=> "1"

Returns:

  • (String)


40
41
42
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 40

def mould_id
  @mould_id
end

#nameString

Optionally set the Card’s name for filtered querying

Examples:

request.name #=> "Whizpar"

Returns:

  • (String)


88
89
90
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 88

def name
  @name
end

#pageInteger

Optionally set the page number for filtered querying

Examples:

request.page #=> 1

Returns:

  • (Integer)


172
173
174
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 172

def page
  @page
end

#rankString

Optionally set the Card’s rank for filtered querying

Examples:

request.rank #=> "MINION"

Returns:

  • (String)


100
101
102
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 100

def rank
  @rank
end

#rarityString

Optionally set the Card’s rarity for filtered querying

Examples:

request.rarity #=> ""

Returns:

  • (String)


124
125
126
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 124

def rarity
  @rarity
end

#setString

Optionally set the Card’s set for filtered querying

Examples:

request.set #=> "AIR"

Returns:

  • (String)


64
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 64

attr_accessor :kind

#typeString

Optionally set the Card’s type for filtered querying

Examples:

request.type #=> "WALKER"

Returns:

  • (String)


112
113
114
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 112

def type
  @type
end

#versionString

Optionally version the Card’s version for filtered querying

Examples:

request.version #=> "v3"

Returns:

  • (String)


52
53
54
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 52

def version
  @version
end

Instance Method Details

#uriString

The URI for the endpoint

Examples:

request.uri # => "cards"

Returns:

  • (String)


210
211
212
# File 'lib/zombie_battleground/api/requests/get_cards_request.rb', line 210

def uri
  'cards'
end