Class: WhopSDK::Resources::People
- Inherits:
-
Object
- Object
- WhopSDK::Resources::People
- Defined in:
- lib/whop_sdk/resources/people.rb,
sig/whop_sdk/resources/people.rbs
Overview
A Person represents a visitor or customer of an account, assembled from pixel events and purchase activity — ad clicks, storefront visits, and checkouts.
Use the People API to list the people of an account and retrieve a single person.
Instance Method Summary collapse
-
#initialize(client:) ⇒ People
constructor
private
A new instance of People.
-
#list(account_id: nil, after: nil, before: nil, direction: nil, filters: nil, first: nil, from: nil, sort: nil, to: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PersonListResponse>
Some parameter documentations has been truncated, see Models::PersonListParams for more details.
-
#retrieve(person_id, account_id: nil, from: nil, to: nil, request_options: {}) ⇒ WhopSDK::Models::PersonRetrieveResponse
Some parameter documentations has been truncated, see Models::PersonRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ People
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 People.
94 95 96 |
# File 'lib/whop_sdk/resources/people.rb', line 94 def initialize(client:) @client = client end |
Instance Method Details
#list(account_id: nil, after: nil, before: nil, direction: nil, filters: nil, first: nil, from: nil, sort: nil, to: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::PersonListResponse>
Some parameter documentations has been truncated, see Models::PersonListParams for more details.
Lists the people (visitors and customers) of an account, aggregated from pixel events. The account is inferred from an account API key; other credentials must pass account_id.
acco
78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/whop_sdk/resources/people.rb', line 78 def list(params = {}) parsed, = WhopSDK::PersonListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "people", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::PersonListResponse, options: ) end |
#retrieve(person_id, account_id: nil, from: nil, to: nil, request_options: {}) ⇒ WhopSDK::Models::PersonRetrieveResponse
Some parameter documentations has been truncated, see Models::PersonRetrieveParams for more details.
Retrieves one person for an account, aggregated from pixel events.
acco
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/whop_sdk/resources/people.rb', line 33 def retrieve(person_id, params = {}) parsed, = WhopSDK::PersonRetrieveParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["people/%1$s", person_id], query: query, model: WhopSDK::Models::PersonRetrieveResponse, options: ) end |