Sha256: b7a4deeaf36a628bfe1dfbfb9ea66ecde141f3957fda2dfcb688755128579321

Contents?: true

Size: 472 Bytes

Versions: 1

Compression:

Stored size: 472 Bytes

Contents

module StreamElements
  class TipsResource < Resource

    def list(channel:, **params)
      response = get_request("tips/#{channel}", params: params)
      Collection.from_response(response, type: Tip, name: "docs")
    end

    def retrieve(channel:, id:)
      Tip.new get_request("tips/#{channel}/#{id}").body
    end

    def top(channel:)
      response = get_request("tips/#{channel}/top")
      Collection.from_response(response, type: TopTip)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
streamelements-0.1.0 lib/stream_elements/resources/tips.rb