All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CheckUsername | GET /users/check_username/{username} | Check if a username is already taken |
GetOneUser | GET /users/{name} | Get a specific user profile |
ListUsers | GET /users | List Users |
AnyType CheckUsername (string username)
Check if a username is already taken
Check if a username is already taken by a user or an org
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class CheckUsernameExample
{
public static void Main()
{
Configuration.Default.BasePath = "http://localhost";
var apiInstance = new UsersApi(Configuration.Default);
var username = username_example; // string |
try
{
// Check if a username is already taken
AnyType result = apiInstance.CheckUsername(username);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.CheckUsername: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
username | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Username not taken | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserPublic GetOneUser (string name)
Get a specific user profile
Get a specific user profile by name
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class GetOneUserExample
{
public static void Main()
{
Configuration.Default.BasePath = "http://localhost";
var apiInstance = new UsersApi(Configuration.Default);
var name = name_example; // string |
try
{
// Get a specific user profile
UserPublic result = apiInstance.GetOneUser(name);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.GetOneUser: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
name | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserPublicList ListUsers (string search = null, int? page = null, int? perPage = null)
List Users
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class ListUsersExample
{
public static void Main()
{
Configuration.Default.BasePath = "http://localhost";
var apiInstance = new UsersApi(Configuration.Default);
var search = search_example; // string | Search string to find users (optional)
var page = 56; // int? | Page number starting from 1 (optional) (default to 1)
var perPage = 56; // int? | Number of items per page (optional) (default to 25)
try
{
// List Users
UserPublicList result = apiInstance.ListUsers(search, page, perPage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ListUsers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
search | string | Search string to find users | [optional] |
page | int? | Page number starting from 1 | [optional] [default to 1] |
perPage | int? | Number of items per page | [optional] [default to 25] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Retrieved | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]