-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
715 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# NotehubJs.GetRouteLogsByRoute200ResponseInner | ||
|
||
## Properties | ||
|
||
| Name | Type | Description | Notes | | ||
| ------------ | ----------- | ------------------------------------- | ---------- | | ||
| **date** | **String** | The date of the logs. | [optional] | | ||
| **routeUID** | **String** | The route UID. | [optional] | | ||
| **eventUID** | **String** | The event UID. | [optional] | | ||
| **attn** | **Boolean** | Whether the event was routed in error | [optional] | | ||
| **status** | **String** | The status of the event. | [optional] | | ||
| **text** | **String** | The response body of the route. | [optional] | | ||
| **url** | **String** | The URL of the route. | [optional] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
# NotehubJs.RouteLogsApi | ||
|
||
All URIs are relative to *https://api.notefile.net* | ||
|
||
| Method | HTTP request | Description | | ||
| -------------------------------------------------------------- | -------------------------------------------------------------- | ----------- | | ||
| [**getRouteLogsByEvent**](RouteLogsApi.md#getRouteLogsByEvent) | **GET** /v1/projects/{projectUID}/events/{eventUID}/route-logs | | ||
| [**getRouteLogsByRoute**](RouteLogsApi.md#getRouteLogsByRoute) | **GET** /v1/projects/{projectUID}/routes/{routeUID}/route-logs | | ||
|
||
## getRouteLogsByEvent | ||
|
||
> [GetRouteLogsByRoute200ResponseInner] getRouteLogsByEvent(projectUID, eventUID) | ||
Get Route Logs by Event UID | ||
|
||
### Example | ||
|
||
```javascript | ||
import * as NotehubJs from '@blues-inc/notehub-js'; | ||
let defaultClient = NotehubJs.ApiClient.instance; | ||
// Configure API key authorization: api_key | ||
let api_key = defaultClient.authentications['api_key']; | ||
api_key.apiKey = 'YOUR API KEY'; | ||
|
||
let apiInstance = new NotehubJs.RouteLogsApi(); | ||
let projectUID = app:2606f411-dea6-44a0-9743-1130f57d77d8; // String | | ||
let eventUID = 4506f411-dea6-44a0-9743-1130f57d7747; // String | | ||
apiInstance.getRouteLogsByEvent(projectUID, eventUID).then((data) => { | ||
console.log('API called successfully. Returned data: ' + JSON.stringify(data)); | ||
}, (error) => { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
| Name | Type | Description | Notes | | ||
| -------------- | ---------- | ----------- | ----- | | ||
| **projectUID** | **String** | | | ||
| **eventUID** | **String** | | | ||
|
||
### Return type | ||
|
||
[**[GetRouteLogsByRoute200ResponseInner]**](GetRouteLogsByRoute200ResponseInner.md) | ||
|
||
### Authorization | ||
|
||
[api_key](../README.md#api_key) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: application/json | ||
|
||
## getRouteLogsByRoute | ||
|
||
> [GetRouteLogsByRoute200ResponseInner] getRouteLogsByRoute(projectUID, routeUID, opts) | ||
Get Route Logs by Route UID | ||
|
||
### Example | ||
|
||
```javascript | ||
import * as NotehubJs from '@blues-inc/notehub-js'; | ||
let defaultClient = NotehubJs.ApiClient.instance; | ||
// Configure API key authorization: api_key | ||
let api_key = defaultClient.authentications['api_key']; | ||
api_key.apiKey = 'YOUR API KEY'; | ||
|
||
let apiInstance = new NotehubJs.RouteLogsApi(); | ||
let projectUID = app:2606f411-dea6-44a0-9743-1130f57d77d8; // String | | ||
let routeUID = route:cbd20093cba58392c9f9bbdd0cdeb1a0; // String | | ||
let opts = { | ||
'pageSize': 50, // Number | | ||
'pageNum': 1, // Number | | ||
'deviceUID': "deviceUID_example", // String | A Device UID. | ||
'sortBy': "'captured'", // String | | ||
'sortOrder': "'asc'", // String | | ||
'startDate': 1628631763, // Number | Unix timestamp | ||
'endDate': 1657894210, // Number | Unix timestamp | ||
'systemFilesOnly': true, // Boolean | | ||
'files': _health.qo, data.qo // String | | ||
}; | ||
apiInstance.getRouteLogsByRoute(projectUID, routeUID, opts).then((data) => { | ||
console.log('API called successfully. Returned data: ' + JSON.stringify(data)); | ||
}, (error) => { | ||
console.error(error); | ||
}); | ||
|
||
``` | ||
|
||
### Parameters | ||
|
||
| Name | Type | Description | Notes | | ||
| ------------------- | ----------- | -------------- | ------------------------------------------ | | ||
| **projectUID** | **String** | | | ||
| **routeUID** | **String** | | | ||
| **pageSize** | **Number** | | [optional] [default to 50] | | ||
| **pageNum** | **Number** | | [optional] [default to 1] | | ||
| **deviceUID** | **String** | A Device UID. | [optional] | | ||
| **sortBy** | **String** | | [optional] [default to 'captured'] | | ||
| **sortOrder** | **String** | | [optional] [default to 'asc'] | | ||
| **startDate** | **Number** | Unix timestamp | [optional] | | ||
| **endDate** | **Number** | Unix timestamp | [optional] | | ||
| **systemFilesOnly** | **Boolean** | | [optional] | | ||
| **files** | **String** | | [optional] | | ||
|
||
### Return type | ||
|
||
[**[GetRouteLogsByRoute200ResponseInner]**](GetRouteLogsByRoute200ResponseInner.md) | ||
|
||
### Authorization | ||
|
||
[api_key](../README.md#api_key) | ||
|
||
### HTTP request headers | ||
|
||
- **Content-Type**: Not defined | ||
- **Accept**: application/json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
/** | ||
* Notehub API | ||
* The OpenAPI definition for the Notehub.io API. | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* Contact: engineering@blues.io | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
* | ||
*/ | ||
|
||
import ApiClient from "../ApiClient"; | ||
import Error from "../model/Error"; | ||
import GetRouteLogsByRoute200ResponseInner from "../model/GetRouteLogsByRoute200ResponseInner"; | ||
|
||
/** | ||
* RouteLogs service. | ||
* @module api/RouteLogsApi | ||
* @version 1.0.14 | ||
*/ | ||
export default class RouteLogsApi { | ||
/** | ||
* Constructs a new RouteLogsApi. | ||
* @alias module:api/RouteLogsApi | ||
* @class | ||
* @param {module:ApiClient} [apiClient] Optional API client implementation to use, | ||
* default to {@link module:ApiClient#instance} if unspecified. | ||
*/ | ||
constructor(apiClient) { | ||
this.apiClient = apiClient || ApiClient.instance; | ||
} | ||
|
||
/** | ||
* Get Route Logs by Event UID | ||
* @param {String} projectUID | ||
* @param {String} eventUID | ||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/GetRouteLogsByRoute200ResponseInner>} and HTTP response | ||
*/ | ||
getRouteLogsByEventWithHttpInfo(projectUID, eventUID) { | ||
let postBody = null; | ||
// verify the required parameter 'projectUID' is set | ||
if (projectUID === undefined || projectUID === null) { | ||
throw new Error( | ||
"Missing the required parameter 'projectUID' when calling getRouteLogsByEvent" | ||
); | ||
} | ||
// verify the required parameter 'eventUID' is set | ||
if (eventUID === undefined || eventUID === null) { | ||
throw new Error( | ||
"Missing the required parameter 'eventUID' when calling getRouteLogsByEvent" | ||
); | ||
} | ||
|
||
let pathParams = { | ||
projectUID: projectUID, | ||
eventUID: eventUID, | ||
}; | ||
let queryParams = {}; | ||
let headerParams = {}; | ||
let formParams = {}; | ||
|
||
let authNames = ["api_key"]; | ||
let contentTypes = []; | ||
let accepts = ["application/json"]; | ||
let returnType = [GetRouteLogsByRoute200ResponseInner]; | ||
return this.apiClient.callApi( | ||
"/v1/projects/{projectUID}/events/{eventUID}/route-logs", | ||
"GET", | ||
pathParams, | ||
queryParams, | ||
headerParams, | ||
formParams, | ||
postBody, | ||
authNames, | ||
contentTypes, | ||
accepts, | ||
returnType, | ||
null | ||
); | ||
} | ||
|
||
/** | ||
* Get Route Logs by Event UID | ||
* @param {String} projectUID | ||
* @param {String} eventUID | ||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/GetRouteLogsByRoute200ResponseInner>} | ||
*/ | ||
getRouteLogsByEvent(projectUID, eventUID) { | ||
return this.getRouteLogsByEventWithHttpInfo(projectUID, eventUID).then( | ||
function (response_and_data) { | ||
return response_and_data.data; | ||
} | ||
); | ||
} | ||
|
||
/** | ||
* Get Route Logs by Route UID | ||
* @param {String} projectUID | ||
* @param {String} routeUID | ||
* @param {Object} opts Optional parameters | ||
* @param {Number} opts.pageSize (default to 50) | ||
* @param {Number} opts.pageNum (default to 1) | ||
* @param {String} opts.deviceUID A Device UID. | ||
* @param {module:model/String} opts.sortBy (default to 'captured') | ||
* @param {module:model/String} opts.sortOrder (default to 'asc') | ||
* @param {Number} opts.startDate Unix timestamp | ||
* @param {Number} opts.endDate Unix timestamp | ||
* @param {Boolean} opts.systemFilesOnly | ||
* @param {String} opts.files | ||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.<module:model/GetRouteLogsByRoute200ResponseInner>} and HTTP response | ||
*/ | ||
getRouteLogsByRouteWithHttpInfo(projectUID, routeUID, opts) { | ||
opts = opts || {}; | ||
let postBody = null; | ||
// verify the required parameter 'projectUID' is set | ||
if (projectUID === undefined || projectUID === null) { | ||
throw new Error( | ||
"Missing the required parameter 'projectUID' when calling getRouteLogsByRoute" | ||
); | ||
} | ||
// verify the required parameter 'routeUID' is set | ||
if (routeUID === undefined || routeUID === null) { | ||
throw new Error( | ||
"Missing the required parameter 'routeUID' when calling getRouteLogsByRoute" | ||
); | ||
} | ||
|
||
let pathParams = { | ||
projectUID: projectUID, | ||
routeUID: routeUID, | ||
}; | ||
let queryParams = { | ||
pageSize: opts["pageSize"], | ||
pageNum: opts["pageNum"], | ||
deviceUID: opts["deviceUID"], | ||
sortBy: opts["sortBy"], | ||
sortOrder: opts["sortOrder"], | ||
startDate: opts["startDate"], | ||
endDate: opts["endDate"], | ||
systemFilesOnly: opts["systemFilesOnly"], | ||
files: opts["files"], | ||
}; | ||
let headerParams = {}; | ||
let formParams = {}; | ||
|
||
let authNames = ["api_key"]; | ||
let contentTypes = []; | ||
let accepts = ["application/json"]; | ||
let returnType = [GetRouteLogsByRoute200ResponseInner]; | ||
return this.apiClient.callApi( | ||
"/v1/projects/{projectUID}/routes/{routeUID}/route-logs", | ||
"GET", | ||
pathParams, | ||
queryParams, | ||
headerParams, | ||
formParams, | ||
postBody, | ||
authNames, | ||
contentTypes, | ||
accepts, | ||
returnType, | ||
null | ||
); | ||
} | ||
|
||
/** | ||
* Get Route Logs by Route UID | ||
* @param {String} projectUID | ||
* @param {String} routeUID | ||
* @param {Object} opts Optional parameters | ||
* @param {Number} opts.pageSize (default to 50) | ||
* @param {Number} opts.pageNum (default to 1) | ||
* @param {String} opts.deviceUID A Device UID. | ||
* @param {module:model/String} opts.sortBy (default to 'captured') | ||
* @param {module:model/String} opts.sortOrder (default to 'asc') | ||
* @param {Number} opts.startDate Unix timestamp | ||
* @param {Number} opts.endDate Unix timestamp | ||
* @param {Boolean} opts.systemFilesOnly | ||
* @param {String} opts.files | ||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.<module:model/GetRouteLogsByRoute200ResponseInner>} | ||
*/ | ||
getRouteLogsByRoute(projectUID, routeUID, opts) { | ||
return this.getRouteLogsByRouteWithHttpInfo( | ||
projectUID, | ||
routeUID, | ||
opts | ||
).then(function (response_and_data) { | ||
return response_and_data.data; | ||
}); | ||
} | ||
} |
Oops, something went wrong.