class Pokemon::Set
Attributes
id[RW]
images[RW]
legalities[RW]
name[RW]
printed_total[RW]
ptcgo_code[RW]
release_date[RW]
series[RW]
total[RW]
updated_at[RW]
Public Class Methods
Resource()
click to toggle source
Get the resource string
@return [String] The API resource string
# File lib/pokemon_tcg_sdk/set.rb, line 24 def self.Resource "sets" end
all()
click to toggle source
Get all sets from a query by paging through data
@return [Array<Set>] Array of Set
objects
# File lib/pokemon_tcg_sdk/set.rb, line 39 def self.all QueryBuilder.new(Set).all end
find(id)
click to toggle source
Find a single set by the set code
@param id [String] the set code @return [Set] the Set
object response
# File lib/pokemon_tcg_sdk/set.rb, line 32 def self.find(id) QueryBuilder.new(Set).find(id) end
from_json(json)
click to toggle source
# File lib/pokemon_tcg_sdk/set.rb, line 5 def self.from_json(json) set = Set.new set.id = json['id'] set.name = json['name'] set.series = json['series'] set.printed_total = json['printedTotal'] set.total = json['total'] set.legalities = Legalities.from_json(json['legalities']) if !json['legalities'].nil? set.ptcgo_code = json['ptcgoCode'] set.release_date = json['releaseDate'] set.updated_at = json['updatedAt'] set.images = SetImages.from_json(json['images']) if !json['images'].nil? set end
where(args)
click to toggle source
Adds a parameter to the hash of query parameters
@param args [Hash] the query parameter @return [Array<Set>] Array of Set
objects
# File lib/pokemon_tcg_sdk/set.rb, line 47 def self.where(args) QueryBuilder.new(Set).where(args) end