import 'package:knowgo/api.dart';
All URIs are relative to https://api.adaptant.io/v1
Method | HTTP request | Description |
---|---|---|
addEvent | POST /events | Add a new Event |
deleteEvent | DELETE /events/{eventId} | Delete Event by ID |
getEventById | GET /events/{eventId} | Find Event by ID |
updateEventWithForm | POST /events/{eventId} | Updates an Event with form data |
Event addEvent(event)
Add a new Event
Adds a new Event to the system. The EventID 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 Event record with allocated EventID 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 = EventsApi();
var event = Event(); // Event | Event object to operate on
try {
var result = api_instance.addEvent(event);
print(result);
} catch (e) {
print("Exception when calling EventsApi->addEvent: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
event | Event | Event 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]
deleteEvent(eventId)
Delete Event by ID
For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
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 = EventsApi();
var eventId = 789; // int | ID of the Event to delete
try {
api_instance.deleteEvent(eventId);
} catch (e) {
print("Exception when calling EventsApi->deleteEvent: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
eventId | int | ID of the Event 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]
Event getEventById(eventId)
Find Event by 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 = EventsApi();
var eventId = 789; // int | ID of Event that needs to be fetched
try {
var result = api_instance.getEventById(eventId);
print(result);
} catch (e) {
print("Exception when calling EventsApi->getEventById: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
eventId | int | ID of Event 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]
updateEventWithForm(eventId, event)
Updates an Event 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 = EventsApi();
var eventId = 789; // int | ID of Event that needs to be updated
var event = Event(); // Event | Event object to operate on
try {
api_instance.updateEventWithForm(eventId, event);
} catch (e) {
print("Exception when calling EventsApi->updateEventWithForm: $e\n");
}
Name | Type | Description | Notes |
---|---|---|---|
eventId | int | ID of Event that needs to be updated | [default to null] |
event | Event | Event 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]