fetch-statuspage
Version:
42 lines (41 loc) • 3.19 kB
JavaScript
// tslint:disable
/**
* Statuspage API
* # Code of Conduct Please don\'t abuse the API, and please report all feature requests and issues to https://help.statuspage.io/help/contact-us-30 # Rate Limiting Each API token is limited to 1 request / second as measured on a 60 second rolling window. To get this limit increased or lifted, please contact us at https://help.statuspage.io/help/contact-us-30 # Basics ## HTTPS It\'s required ## URL Prefix In order to maintain version integrity into the future, the API is versioned. All calls currently begin with the following prefix: https://api.statuspage.io/v1/ ## RESTful Interface Wherever possible, the API seeks to implement repeatable patterns with logical, representative URLs and descriptive HTTP verbs. Below are some examples and conventions you will see throughout the documentation. * Collections are buckets: https://api.statuspage.io/v1/pages/asdf123/incidents.json * Elements have unique IDs: https://api.statuspage.io/v1/pages/asdf123/incidents/jklm456.json * GET will retrieve information about a collection/element * POST will create an element in a collection * PATCH will update a single element * PUT will replace a single element in a collection (rarely used) * DELETE will destroy a single element ## Sending Data Information can be sent in the body as form urlencoded or JSON, but make sure the Content-Type header matches the body structure or the server gremlins will be angry. All examples are provided in JSON format, however they can easily be converted to form encoding if required. Some examples of how to convert things are below: // JSON { \"incident\": { \"name\": \"test incident\", \"components\": [\"8kbf7d35c070\", \"vtnh60py4yd7\"] } } // Form Encoded (using curl as an example): curl -X POST https://api.statuspage.io/v1/example \\ -d \"incident[name]=test incident\" \\ -d \"incident[components][]=8kbf7d35c070\" \\ -d \"incident[components][]=vtnh60py4yd7\" # Authentication <!-- ReDoc-Inject: <security-definitions> -->
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
const runtime_1 = require("../runtime");
const _1 = require("./");
function PatchPagesFromJSON(json) {
return PatchPagesFromJSONTyped(json, false);
}
exports.PatchPagesFromJSON = PatchPagesFromJSON;
function PatchPagesFromJSONTyped(json, ignoreDiscriminator) {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'page': !runtime_1.exists(json, 'page') ? undefined : _1.PatchPagesPageFromJSON(json['page']),
};
}
exports.PatchPagesFromJSONTyped = PatchPagesFromJSONTyped;
function PatchPagesToJSON(value) {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'page': _1.PatchPagesPageToJSON(value.page),
};
}
exports.PatchPagesToJSON = PatchPagesToJSON;
;