Skip to content

Latest commit

 

History

History
229 lines (166 loc) · 8.34 KB

EventsApi.md

File metadata and controls

229 lines (166 loc) · 8.34 KB

knowgo.api.EventsApi

Load the API package

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

addEvent

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.

Example

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");
}

Parameters

Name Type Description Notes
event Event Event object to operate on

Return type

Event

Authorization

app_id, bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

deleteEvent

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

Example

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");
}

Parameters

Name Type Description Notes
eventId int ID of the Event to delete [default to null]

Return type

void (empty response body)

Authorization

app_id, bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getEventById

Event getEventById(eventId)

Find Event by ID

Example

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");
}

Parameters

Name Type Description Notes
eventId int ID of Event that needs to be fetched [default to null]

Return type

Event

Authorization

app_id, bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

updateEventWithForm

updateEventWithForm(eventId, event)

Updates an Event with form data

Example

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");
}

Parameters

Name Type Description Notes
eventId int ID of Event that needs to be updated [default to null]
event Event Event object to operate on

Return type

void (empty response body)

Authorization

app_id, bearerAuth, cookieAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

[Back to top] [Back to API list] [Back to Model list] [Back to README]