Sha256: dfa2243ee89278998a5bb098511293451831817088e7aeb1b21517400be20f4d
Contents?: true
Size: 1.24 KB
Versions: 1
Compression:
Stored size: 1.24 KB
Contents
require_relative 'representers/card_representer' module Pokemon class Card include Roar::JSON include CardRepresenter attr_accessor :id, :name, :image_url, :image_url_hi_res, :subtype, :supertype, :ability, :hp, :number, :artist, :rarity, :series, :set, :set_code, :retreat_cost, :text, :types, :attacks, :weaknesses, :resistances, :national_pokedex_number, :ancient_trait, :evolves_from, :converted_retreat_cost # Get the resource string # # @return [String] The API resource string def self.Resource "cards" end # Find a single card by the card id # # @param id [String] the card id # @return [Card] the Card object response def self.find(id) QueryBuilder.new(Card).find(id) end # Get all cards from a query by paging through data # # @return [Array<Card>] Array of Card objects def self.all QueryBuilder.new(Card).all end # Adds a parameter to the hash of query parameters # # @param args [Hash] the query parameter # @return [Array<Card>] Array of Card objects def self.where(args) QueryBuilder.new(Card).where(args) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pokemon_tcg_sdk-3.0.0 | lib/pokemon_tcg_sdk/card.rb |