Class: ElderScrollsLegends::Card

Inherits:
Object
  • Object
show all
Includes:
CardRepresenter, Roar::JSON
Defined in:
lib/elder_scrolls_legends_sdk/card.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def attributes
  @attributes
end

#costObject

Returns the value of attribute cost.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def cost
  @cost
end

#healthObject

Returns the value of attribute health.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def health
  @health
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def id
  @id
end

#image_urlObject

Returns the value of attribute image_url.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def image_url
  @image_url
end

#keywordsObject

Returns the value of attribute keywords.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def keywords
  @keywords
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def name
  @name
end

#powerObject

Returns the value of attribute power.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def power
  @power
end

#rarityObject

Returns the value of attribute rarity.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def rarity
  @rarity
end

#setObject

Returns the value of attribute set.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def set
  @set
end

#soul_summonObject

Returns the value of attribute soul_summon.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def soul_summon
  @soul_summon
end

#soul_trapObject

Returns the value of attribute soul_trap.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def soul_trap
  @soul_trap
end

#subtypeObject

Returns the value of attribute subtype.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def subtype
  @subtype
end

#textObject

Returns the value of attribute text.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def text
  @text
end

#typeObject

Returns the value of attribute type.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def type
  @type
end

#uniqueObject

Returns the value of attribute unique.



8
9
10
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 8

def unique
  @unique
end

Class Method Details

.allArray<Card>

Get all cards from a query by paging through data

Returns:

  • (Array<Card>)

    Array of Card objects



29
30
31
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 29

def self.all
  QueryBuilder.new(Card).all
end

.find(id) ⇒ Card

Find a single card by the card id

Parameters:

  • id (String)

    the card id

Returns:

  • (Card)

    the Card object response



22
23
24
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 22

def self.find(id)
  QueryBuilder.new(Card).find(id)
end

.ResourceString

Get the resource string

Returns:

  • (String)

    The API resource string



14
15
16
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 14

def self.Resource
  "cards"
end

.where(args) ⇒ Array<Card>

Adds a parameter to the hash of query parameters

Parameters:

  • args (Hash)

    the query parameter

Returns:

  • (Array<Card>)

    Array of Card objects



37
38
39
# File 'lib/elder_scrolls_legends_sdk/card.rb', line 37

def self.where(args)
  QueryBuilder.new(Card).where(args)
end