Get a User
Gets a User by ID, Email or Username.
Method Signature
get(id: string): Promise<User>;
get(id: string, callback: (err?: Error, user: User) => any): void;
Parameters
Parameter | Type | Description |
---|---|---|
id | string | The id, email, or username of the User to get |
callback | (err?: Error, user: User) => any | Optional The callback |
returns | User | The requested User |
Example
/*
* This example demonstrates getting a User by Email
*/
const { CatalyticClient } = require('@catalytic/sdk');
const catalytic = new CatalyticClient();
const alice = await catalytic.users.get('[email protected]');
Updated almost 4 years ago