Sha256: bed0ba0aeb3faaecdddca11becd94223d8465c81ecdefc56b14a5e12469e5bc4
Contents?: true
Size: 964 Bytes
Versions: 5
Compression:
Stored size: 964 Bytes
Contents
require_relative 'representers/set_representer' module Pokemon class Set include Roar::JSON include SetRepresenter attr_accessor :code, :name, :series, :total_cards, :standard_legal, :release_date # Get the resource string # # @return [String] The API resource string def self.Resource "sets" end # Find a single set by the set code # # @param id [String] the set code # @return [Set] the Set object response def self.find(id) QueryBuilder.new(Set).find(id) end # Get all sets from a query by paging through data # # @return [Array<Set>] Array of Set objects def self.all QueryBuilder.new(Set).all end # Adds a parameter to the hash of query parameters # # @param args [Hash] the query parameter # @return [QueryBuilder] the QueryBuilder def self.where(args) QueryBuilder.new(Set).where(args) end end end
Version data entries
5 entries across 5 versions & 1 rubygems