Sha256: 918106118dbd6dff6e9f97429f4036d8d91c0e1d6ebe133616c6d593666dc1dd

Contents?: true

Size: 633 Bytes

Versions: 1

Compression:

Stored size: 633 Bytes

Contents

module StreamElements
  class ActivitiesResource < Resource

    def list(channel:, after:, before:, limit:, types:, **params)
      attrs = { after: after, before: before, limit: limit, types: types }.merge(params)
      response = get_request("activities/#{channel}", params: attrs)
      Collection.from_response(response, type: Activity)
    end

    def top(channel:, period:, offset:, limit:, type:)
      attrs = { period: period, offset: offset, limit: limit, type: type }
      response = get_request("activities/#{channel}/top", params: attrs)
      Collection.from_response(response, type: TopActivity)
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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