sweep_api 1.1.0 sweep_api: ^1.1.0 copied to clipboard
Full Sweep API client
sweep_api #
API definitions for the Sweep server/dashboard.
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0-oas3
- Build package: org.openapitools.codegen.languages.DartClientCodegen
Requirements #
Dart 1.20.0 or later OR Flutter 0.0.20 or later
Installation & Usage #
Github #
If this Dart package is published to Github, please include the following in pubspec.yaml
name: sweep_api
version: 1.0.0
description: OpenAPI API client
dependencies:
sweep_api:
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
version: 'any'
Local #
To use the package in your local drive, please include the following in pubspec.yaml
dependencies:
sweep_api:
path: /path/to/sweep_api
Tests #
TODO
Getting Started #
Please follow the installation procedure and then run the following:
import 'package:sweep_api/api.dart';
// TODO Configure API key authorization: api_key
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKey = 'YOUR_API_KEY';
// uncomment below to setup prefix (e.g. Bearer) for API key, if needed
//defaultApiClient.getAuthentication<ApiKeyAuth>('api_key').apiKeyPrefix = 'Bearer';
var api_instance = new EventApi();
var eventRequestBody = new EventRequestBody(); // EventRequestBody |
var apiKey = apiKey_example; // String |
try {
api_instance.addEvent(eventRequestBody, apiKey);
} catch (e) {
print("Exception when calling EventApi->addEvent: $e\n");
}
Documentation for API Endpoints #
All URIs are relative to https://app.sweephq.com/1.0.0
Class | Method | HTTP request | Description |
---|---|---|---|
EventApi | addEvent | POST /events | Raise an event |
EventApi | getEventById | GET /events/{eventId} | Find raised event by ID |
EventApi | listEvents | GET /events | List all received events |
ListenerApi | addListener | POST /listeners | Create a new Listener |
ListenerApi | addListenerTemplate | POST /listeners/{listenerId}/templates/{templateId} | Associates a Template to a Listener |
ListenerApi | deleteListener | DELETE /listeners/{listenerId} | Deletes a Listener |
ListenerApi | deleteListenerTemplate | DELETE /listeners/{listenerId}/templates/{templateId} | Disassociates a Template from a Listener |
ListenerApi | getListener | GET /listeners/{listenerId} | Get a listener by ID |
ListenerApi | listListenerTemplates | GET /listeners/{listenerId}/templates | List Templates for Listener |
ListenerApi | listListeners | GET /listeners | List all Listeners |
ListenerApi | listMessagesForAction | GET /actions/{listenerActionId}/messages | List all messages |
ListenerApi | updateListener | PUT /listeners/{listenerId} | Updates a Listener |
MessageApi | getMessageById | GET /messages/{messageId} | Find message by ID |
MessageApi | listMessages | GET /messages | List all messages |
OrganizationApi | getOrganizationInfo | GET /organization | Get organization info for the currently authenticated context |
TemplateApi | addTemplate | POST /templates | Create a new Template |
TemplateApi | deleteTemplate | DELETE /templates/{templateId} | Deletes a Template |
TemplateApi | getTemplateById | GET /templates/{templateId} | Find Template by ID |
TemplateApi | listTemplate | GET /templates | List all Templates |
TemplateApi | renderTemplate | POST /templates/{templateId}/render | Renders a template using the provided event parameters |
TemplateApi | updateTemplate | PUT /templates/{templateId} | Update an existing Template |
UserApi | deleteUser | DELETE /user | Delete user |
UserApi | getUserInfo | GET /user | Get user info for the currently authenticated user |
UserApi | loginUser | GET /user/login | Logs user into the system |
UserApi | logoutUser | GET /user/logout | Logs out current logged in user session |
UserApi | updateUser | PUT /user | Updated user |
Documentation For Models #
- BaseMessage
- Event
- EventRequestBody
- Listener
- ListenerAction
- ListenerRequestBody
- ListenerTemplate
- Message
- Organization
- RenderTemplateRequestBody
- Template
- TemplateRequestBody
- User
- UserRequestBody
Documentation For Authorization #
GitHub #
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://github.com/login/oauth/authorize2
- Scopes:
- user:email: access your e-mail address
Google #
- Type: OAuth
- Flow: accessCode
- Authorization URL: https://accounts.google.com/o/oauth2/v2/auth
- Scopes:
- https://www.googleapis.com/auth/userinfo.email: access your e-mail address
api_key #
- Type: API key
- API key parameter name: api_key
- Location: HTTP header