import 'package:knowgo/api.dart';
All URIs are relative to https://api.adaptant.io/v1
Method | HTTP request | Description |
---|---|---|
confirmUserPasswordChangeByRecovery | POST /users/password/confirm | Confirm the change in user password via the recovery mechanism |
createUser | POST /users | Create user |
deleteUser | DELETE /users/{userId} | Delete user |
disableServiceByUserId | DELETE /users/{userId}/services/{serviceName} | Disable a service for a specific user |
enableServiceByUserId | POST /users/{userId}/services/{serviceName} | Enable a service for a specific user |
exportUser | GET /users/{userId}/export | Exports all data about current user in CSV format |
getUserById | GET /users/{userId} | Get user by user id |
listJourneysByUserId | GET /users/{userId}/journeys | Return a list of journeys available for a specific user |
listServicesByUserId | GET /users/{userId}/services | Return a list of services for a specific user |
listVehiclesByUserId | GET /users/{userId}/vehicles | Return a list of vehicles available for a specific user |
loginUser | POST /users/login | Logs user into the system and returns an authentication token. |
logoutUser | GET /users/logout | Logs out current logged in user session |
recoverUserPassword | POST /users/password/recover | Initiaties a password recovery operation for the designated user. |
refreshToken | GET /users/refresh | Refreshes the session token for a logged-in user |
updateUser | PUT /users/{userId} | Updated user |
confirmUserPasswordChangeByRecovery(passwordRecoveryConfirmation)
Confirm the change in user password via the recovery mechanism
import 'package:knowgo/api.dart';
var api_instance = UsersApi();
var passwordRecoveryConfirmation = PasswordRecoveryConfirmation(); // PasswordRecoveryConfirmation | User email, new password and reset token to initiate password change
try {
api_instance.confirmUserPasswordChangeByRecovery(passwordRecoveryConfirmation);
} catch (e) {
print("Exception when calling UsersApi->confirmUserPasswordChangeByRecovery: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
passwordRecoveryConfirmation | PasswordRecoveryConfirmation | User email, new password and reset token to initiate password change |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User createUser(user)
Create user
Create a new user within the system
import 'package:knowgo/api.dart';
var api_instance = UsersApi();
var user = User(); // User | User object to operate on
try {
var result = api_instance.createUser(user);
print(result);
} catch (e) {
print("Exception when calling UsersApi->createUser: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
user | User | User object to operate on |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteUser(userId)
Delete user
This can only be done by the logged in user.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
try {
api_instance.deleteUser(userId);
} catch (e) {
print("Exception when calling UsersApi->deleteUser: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
disableServiceByUserId(userId, serviceName)
Disable a service for a specific user
Given an authenticated user, disable a specific service that the user no longer wishes to use.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
var serviceName = serviceName_example; // String | Name of service to disable
try {
api_instance.disableServiceByUserId(userId, serviceName);
} catch (e) {
print("Exception when calling UsersApi->disableServiceByUserId: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
serviceName | String | Name of service to disable | [default to null] |
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
enableServiceByUserId(userId, serviceName)
Enable a service for a specific user
Given an authenticated user, enable a specific service that the user wishes to use.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
var serviceName = serviceName_example; // String | Name of service to enable
try {
api_instance.enableServiceByUserId(userId, serviceName);
} catch (e) {
print("Exception when calling UsersApi->enableServiceByUserId: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
serviceName | String | Name of service to enable | [default to null] |
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
exportUser(userId)
Exports all data about current user in CSV format
This endpoint allows a logged in user to export all of the data pertaining to their userId from across the system in a simple CSV format, facilitating their right to data and service portability. This includes not only the personal information about the individual, but also all vehicles they are (or have been) associated with, journeys taken, and all events recorded.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
try {
api_instance.exportUser(userId);
} catch (e) {
print("Exception when calling UsersApi->exportUser: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
User getUserById(userId)
Get user by user id
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
try {
var result = api_instance.getUserById(userId);
print(result);
} catch (e) {
print("Exception when calling UsersApi->getUserById: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List listJourneysByUserId(userId)
Return a list of journeys available for a specific user
Given an authenticated user, return a list of journeys that are available to them.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
try {
var result = api_instance.listJourneysByUserId(userId);
print(result);
} catch (e) {
print("Exception when calling UsersApi->listJourneysByUserId: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List listServicesByUserId(userId)
Return a list of services for a specific user
Given an authenticated user, return a list of services that they have opted in to. This will include a subset of the '/services' result, and will persist regardless of the availability or lack of availability of a given service.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
try {
var result = api_instance.listServicesByUserId(userId);
print(result);
} catch (e) {
print("Exception when calling UsersApi->listServicesByUserId: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
List
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List listVehiclesByUserId(userId)
Return a list of vehicles available for a specific user
Given an authenticated user, return a list of vehicles that are available to them.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
try {
var result = api_instance.listVehiclesByUserId(userId);
print(result);
} catch (e) {
print("Exception when calling UsersApi->listVehiclesByUserId: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
String loginUser(username, password, authCredentials)
Logs user into the system and returns an authentication token.
import 'package:knowgo/api.dart';
var api_instance = UsersApi();
var username = username_example; // String | The user's username or email address for login
var password = password_example; // String | The password for login in clear text
var authCredentials = AuthCredentials(); // AuthCredentials | Basic Auth credentials for user authentication
try {
var result = api_instance.loginUser(username, password, authCredentials);
print(result);
} catch (e) {
print("Exception when calling UsersApi->loginUser: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
username | String | The user's username or email address for login | [optional] [default to null] |
password | String | The password for login in clear text | [optional] [default to null] |
authCredentials | AuthCredentials | Basic Auth credentials for user authentication | [optional] |
String
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
logoutUser()
Logs out current logged in user session
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
try {
api_instance.logoutUser();
} catch (e) {
print("Exception when calling UsersApi->logoutUser: $e\n");
}
This endpoint does not need any parameter.
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
recoverUserPassword(email, body)
Initiaties a password recovery operation for the designated user.
import 'package:knowgo/api.dart';
var api_instance = UsersApi();
var email = ; // String | The user's email address to recover the password for.
var body = String(); // String | User email address to initiate password recovery procedure for
try {
api_instance.recoverUserPassword(email, body);
} catch (e) {
print("Exception when calling UsersApi->recoverUserPassword: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
String | The user's email address to recover the password for. | [optional] [default to null] | |
body | String | User email address to initiate password recovery procedure for | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
refreshToken()
Refreshes the session token for a logged-in user
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
try {
api_instance.refreshToken();
} catch (e) {
print("Exception when calling UsersApi->refreshToken: $e\n");
}
This endpoint does not need any parameter.
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateUser(userId, user)
Updated user
This can only be done by the logged in user.
import 'package:knowgo/api.dart';
// TODO Configure API key authorization: app_id
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('app_id').apiKeyPrefix = 'Bearer';
// TODO Configure HTTP basic authorization: bearerAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('bearerAuth').password = 'YOUR_PASSWORD';
// TODO Configure API key authorization: cookieAuth
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('cookieAuth').apiKeyPrefix = 'Bearer';
var api_instance = UsersApi();
var userId = 789; // int | ID of user that needs to be fetched
var user = User(); // User | Updated user object
try {
api_instance.updateUser(userId, user);
} catch (e) {
print("Exception when calling UsersApi->updateUser: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
userId | int | ID of user that needs to be fetched | [default to null] |
user | User | Updated user object |
void (empty response body)
app_id, bearerAuth, cookieAuth
- Content-Type: application/json
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]