import 'package:pieces_os_client/api.dart';
All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
authenticateFromOauthToken | POST /users/authenticate/from_token | /users/authenticate/from_token [POST] |
usersDisconnectUser | POST /users/{user}/disconnect | /users/{user}/disconnect [POST] |
usersSnapshot | GET /users | /users [GET] |
usersSpecificUserSnapshot | GET /users/{user} | /users/{user} [GET] Scoped to Users |
UserProfile authenticateFromOauthToken(oAuthToken)
/users/authenticate/from_token [POST]
Creates a User From a oAuth Token
import 'package:pieces_os_client/api.dart';
// TODO Configure OAuth2 access token for authorization: auth0
//defaultApiClient.getAuthentication<OAuth>('auth0').accessToken = 'YOUR_ACCESS_TOKEN';
// TODO Configure OAuth2 access token for authorization: auth0
//defaultApiClient.getAuthentication<OAuth>('auth0').accessToken = 'YOUR_ACCESS_TOKEN';
// TODO Configure OAuth2 access token for authorization: auth0
//defaultApiClient.getAuthentication<OAuth>('auth0').accessToken = 'YOUR_ACCESS_TOKEN';
final api_instance = UsersApi();
final oAuthToken = OAuthToken(); // OAuthToken |
try {
final result = api_instance.authenticateFromOauthToken(oAuthToken);
print(result);
} catch (e) {
print('Exception when calling UsersApi->authenticateFromOauthToken: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
oAuthToken | OAuthToken | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Users usersDisconnectUser(user)
/users/{user}/disconnect [POST]
Locally Removing a user for the purpose of Signing Out
import 'package:pieces_os_client/api.dart';
final api_instance = UsersApi();
final user = user_example; // String |
try {
final result = api_instance.usersDisconnectUser(user);
print(result);
} catch (e) {
print('Exception when calling UsersApi->usersDisconnectUser: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
user | String |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Users usersSnapshot()
/users [GET]
this will return a snapshot of all of the users that are in the users database. TODO might want to make this internal.
import 'package:pieces_os_client/api.dart';
final api_instance = UsersApi();
try {
final result = api_instance.usersSnapshot();
print(result);
} catch (e) {
print('Exception when calling UsersApi->usersSnapshot: $e\n');
}
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserProfile usersSpecificUserSnapshot(user)
/users/{user} [GET] Scoped to Users
This enables the client to get the current user. This endpoint will return a UserPRofile or will throw an error since you are sending user uid.
import 'package:pieces_os_client/api.dart';
final api_instance = UsersApi();
final user = 497f6eca-6276-4993-bfeb-53cbbbba6f08; // String | The id (uuid) for a specific user.
try {
final result = api_instance.usersSpecificUserSnapshot(user);
print(result);
} catch (e) {
print('Exception when calling UsersApi->usersSpecificUserSnapshot: $e\n');
}
Name | Type | Description | Notes |
---|---|---|---|
user | String | The id (uuid) for a specific user. |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]