Sha256: 0c0ce55a4e64a3542e10de852af7b43500fde749d87657482602c6631936e215
Contents?: true
Size: 468 Bytes
Versions: 2
Compression:
Stored size: 468 Bytes
Contents
# frozen_string_literal: true require_relative "base" require_relative "paginator" module Theone # Quote API def class Quote < Base BASE_PATH = "/quote" class << self def all(client) Paginator.paginate(client, BASE_PATH) { |quote_json| Quote.new(client, quote_json) } end def one(client, id) quote_json = client.api_request("#{BASE_PATH}/#{id}").first Quote.new(client, quote_json) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
juggy-theone-sdk-0.1.1 | lib/theone/quote.rb |
juggy-theone-sdk-0.1.0 | lib/theone/quote.rb |