Class: Knockapi::Resources::Users::Feeds
- Inherits:
-
Object
- Object
- Knockapi::Resources::Users::Feeds
- Defined in:
- lib/knockapi/resources/users/feeds.rb
Instance Method Summary collapse
-
#get_settings(user_id, id, request_options: {}) ⇒ Knockapi::Models::Users::FeedGetSettingsResponse
Returns the feed settings for a user.
-
#initialize(client:) ⇒ Feeds
constructor
private
A new instance of Feeds.
-
#list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {}) ⇒ Knockapi::Internal::EntriesCursor<Knockapi::Models::Users::FeedListItemsResponse>
Some parameter documentations has been truncated, see Models::Users::FeedListItemsParams for more details.
Constructor Details
#initialize(client:) ⇒ Feeds
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Feeds.
95 96 97 |
# File 'lib/knockapi/resources/users/feeds.rb', line 95 def initialize(client:) @client = client end |
Instance Method Details
#get_settings(user_id, id, request_options: {}) ⇒ Knockapi::Models::Users::FeedGetSettingsResponse
Returns the feed settings for a user.
20 21 22 23 24 25 26 27 |
# File 'lib/knockapi/resources/users/feeds.rb', line 20 def get_settings(user_id, id, params = {}) @client.request( method: :get, path: ["v1/users/%1$s/feeds/%2$s/settings", user_id, id], model: Knockapi::Models::Users::FeedGetSettingsResponse, options: params[:request_options] ) end |
#list_items(user_id, id, after: nil, archived: nil, before: nil, has_tenant: nil, locale: nil, page_size: nil, source: nil, status: nil, tenant: nil, trigger_data: nil, workflow_categories: nil, request_options: {}) ⇒ Knockapi::Internal::EntriesCursor<Knockapi::Models::Users::FeedListItemsResponse>
Some parameter documentations has been truncated, see Models::Users::FeedListItemsParams for more details.
Returns a paginated list of feed items for a user in reverse chronological order, including metadata about the feed. If the user has not yet been identified within Knock, an empty feed will be returned.
You can customize the response using [response filters](/integrations/in-app/knock#customizing-api-response-content) to exclude or only include specific properties on your resources.
Notes:
-
When making this call from a client-side environment, use your publishable key along with a user token.
-
This endpoint’s rate limit is always scoped per-user and per-environment. This is true even for requests made without a signed user token.
80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/knockapi/resources/users/feeds.rb', line 80 def list_items(user_id, id, params = {}) parsed, = Knockapi::Users::FeedListItemsParams.dump_request(params) @client.request( method: :get, path: ["v1/users/%1$s/feeds/%2$s", user_id, id], query: parsed, page: Knockapi::Internal::EntriesCursor, model: Knockapi::Models::Users::FeedListItemsResponse, options: ) end |