Sha256: 90ddab0fac2ef5db40f790a8790c768cab6f4d7ea993a5a0e42c0e6f438c424e

Contents?: true

Size: 988 Bytes

Versions: 3

Compression:

Stored size: 988 Bytes

Contents

require 'elder_scrolls_legends_sdk/representers/set_representer'

module ElderScrollsLegends
  class Set
    include Roar::JSON
    include SetRepresenter
  
    attr_accessor :name, :release_date, :total_cards, :id

    # Get the resource string
    #
    # @return [String] The API resource string
    def self.Resource
      "sets"
    end
    
    # Find a single card by the set id
    #
    # @param id [String] the set id
    # @return [Set] the Set object response
    def self.find(id)
      QueryBuilder.new(Set).find(id)
    end

    # Get all set 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 [Array<Set>] Array of Set objects
    def self.where(args)
      QueryBuilder.new(Set).where(args)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
elder_scrolls_legends_sdk-1.2.0 lib/elder_scrolls_legends_sdk/set.rb
elder_scrolls_legends_sdk-1.1.0 lib/elder_scrolls_legends_sdk/set.rb
elder_scrolls_legends_sdk-1.0.0 lib/elder_scrolls_legends_sdk/set.rb