Get a User
Gets a User by ID, Email or Username.
Method Signature
User Get(Guid id);
async Task<User> GetAsync(Guid id);
Parameters
Parameter | Type | Description |
---|---|---|
id | Guid | The id of the User to get |
returns | User | The requested User |
User Get(string identifier);
async Task<User> GetAsync(string identifier);
Parameter | Type | Description |
---|---|---|
identifier | string | The ID, Email or Username of the User to get |
returns | User | The requested User |
Example
/*
* This example demonstrates getting a User by Email
*/
using Catalytic.Sdk.Entities;
namespace Catalytic.Sdk.Examples
{
class Program
{
static void Main(string[] args)
{
var catalytic = new Catalytic.Sdk.CatalyticClient(Credentials.Default);
var alice = catalytic.Users.Get("[email protected]");
}
}
}
Updated almost 3 years ago