Class: Userplex::Resources::Users
- Inherits:
-
Object
- Object
- Userplex::Resources::Users
- Defined in:
- lib/userplex/resources/users.rb
Instance Method Summary collapse
-
#identify(user_id:, email: nil, name: nil, properties: nil, request_options: {}) ⇒ Userplex::Models::UserIdentifyResponse
Creates or updates an end user in InstantDB with the provided information.
-
#initialize(client:) ⇒ Users
constructor
private
A new instance of Users.
Constructor Details
#initialize(client:) ⇒ Users
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 Users.
38 39 40 |
# File 'lib/userplex/resources/users.rb', line 38 def initialize(client:) @client = client end |
Instance Method Details
#identify(user_id:, email: nil, name: nil, properties: nil, request_options: {}) ⇒ Userplex::Models::UserIdentifyResponse
Creates or updates an end user in InstantDB with the provided information. Requires a valid API key for authentication.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/userplex/resources/users.rb', line 24 def identify(params) parsed, = Userplex::UserIdentifyParams.dump_request(params) @client.request( method: :post, path: "api/identify", body: parsed, model: Userplex::Models::UserIdentifyResponse, options: ) end |