import 'package:knowgo/api.dart';
All URIs are relative to https://api.adaptant.io/v1
Method | HTTP request | Description |
---|---|---|
addAuto | POST /autos | Add a new auto |
deleteAuto | DELETE /autos/{autoId} | Deletes an Auto |
getAutoById | GET /autos/{autoId} | Find auto by ID |
listVehicles | GET /vehicles | Return a list of vehicles available for a specific user |
listVehiclesByUserId | GET /users/{userId}/vehicles | Return a list of vehicles available for a specific user |
updateAuto | PUT /autos | Update an existing auto |
updateAutoWithForm | POST /autos/{autoId} | Updates an auto with form data |
Auto addAuto(auto)
Add a new auto
Adds a new Auto to the system. The AutoID as input is ignored, as it is dynamically allocated at insertion time. Auto details may be as complete or as incomplete as needed, with later updates possible via the PUT method. The complete new Auto record with allocated AutoID are returned upon successful record creation.
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 = VehiclesApi();
var auto = Auto(); // Auto | Auto object to operate on
try {
var result = api_instance.addAuto(auto);
print(result);
} catch (e) {
print("Exception when calling VehiclesApi->addAuto: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
auto | Auto | Auto object to operate on |
app_id, bearerAuth, cookieAuth
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteAuto(autoId)
Deletes an Auto
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 = VehiclesApi();
var autoId = 789; // int | Auto id to delete
try {
api_instance.deleteAuto(autoId);
} catch (e) {
print("Exception when calling VehiclesApi->deleteAuto: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
autoId | int | Auto id to delete | [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]
Auto getAutoById(autoId)
Find auto by ID
Returns a single auto
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 = VehiclesApi();
var autoId = 789; // int | ID of auto to return
try {
var result = api_instance.getAutoById(autoId);
print(result);
} catch (e) {
print("Exception when calling VehiclesApi->getAutoById: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
autoId | int | ID of auto to return | [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 listVehicles()
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 = VehiclesApi();
try {
var result = api_instance.listVehicles();
print(result);
} catch (e) {
print("Exception when calling VehiclesApi->listVehicles: $e\n");
}
This endpoint does not need any parameter.
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 = VehiclesApi();
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 VehiclesApi->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]
updateAuto(auto)
Update an existing auto
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 = VehiclesApi();
var auto = Auto(); // Auto | Auto object to operate on
try {
api_instance.updateAuto(auto);
} catch (e) {
print("Exception when calling VehiclesApi->updateAuto: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
auto | Auto | Auto object to operate on |
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]
updateAutoWithForm(autoId, auto)
Updates an auto with form data
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 = VehiclesApi();
var autoId = 789; // int | ID of auto that needs to be updated
var auto = Auto(); // Auto | Auto object to operate on
try {
api_instance.updateAutoWithForm(autoId, auto);
} catch (e) {
print("Exception when calling VehiclesApi->updateAutoWithForm: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
autoId | int | ID of auto that needs to be updated | [default to null] |
auto | Auto | Auto object to operate on |
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]