Skip to content

Commit

Permalink
Merge pull request #217 from apivideo/api-rate-limiting-oas
Browse files Browse the repository at this point in the history
Add API rate limiting to the OAS
  • Loading branch information
bot-api-video authored Apr 18, 2024
2 parents b5b12cd + 38656a5 commit 9f0c184
Show file tree
Hide file tree
Showing 50 changed files with 300 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ Method | Description | HTTP request
- [RestreamsResponseObject](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/RestreamsResponseObject.md)
- [TokenCreationPayload](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TokenCreationPayload.md)
- [TokenListResponse](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TokenListResponse.md)
- [TooManyRequests](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/TooManyRequests.md)
- [UploadToken](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/UploadToken.md)
- [Video](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/Video.md)
- [VideoAssets](https://github.com/apivideo/api.video-nodejs-client/blob/main/docs/model/VideoAssets.md)
Expand Down
13 changes: 13 additions & 0 deletions docs/model/TooManyRequests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

# TooManyRequests

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | A link to the error documentation. | [optional]
**title** | **string** | A description of the error that occurred. | [optional]
**status** | **number** | The HTTP status code. | [optional]



2 changes: 2 additions & 0 deletions src/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import RestreamsRequestObject from './model/RestreamsRequestObject';
import RestreamsResponseObject from './model/RestreamsResponseObject';
import TokenCreationPayload from './model/TokenCreationPayload';
import TokenListResponse from './model/TokenListResponse';
import TooManyRequests from './model/TooManyRequests';
import UploadToken from './model/UploadToken';
import Video from './model/Video';
import VideoAssets from './model/VideoAssets';
Expand Down Expand Up @@ -149,6 +150,7 @@ const typeMap: { [index: string]: any } = {
RestreamsResponseObject: RestreamsResponseObject,
TokenCreationPayload: TokenCreationPayload,
TokenListResponse: TokenListResponse,
TooManyRequests: TooManyRequests,
UploadToken: UploadToken,
Video: Video,
VideoAssets: VideoAssets,
Expand Down
54 changes: 54 additions & 0 deletions src/model/TooManyRequests.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/**
* @api.video/nodejs-client
* api.video is an API that encodes on the go to facilitate immediate playback, enhancing viewer streaming experiences across multiple devices and platforms. You can stream live or on-demand online videos within minutes.
*
* The version of the OpenAPI document: 1
*
*
* NOTE: This class is auto generated.
* Do not edit the class manually.
*/

import AttributeType from './AttributeType.js';

export default class TooManyRequests {
/**
* A link to the error documentation.
*/
'type'?: string;
/**
* A description of the error that occurred.
*/
'title'?: string;
/**
* The HTTP status code.
*/
'status'?: number;

static readonly discriminator?: string = undefined;

static readonly attributeTypeMap: Array<AttributeType> = [
{
name: 'type',
baseName: 'type',
type: 'string',
format: '',
},
{
name: 'title',
baseName: 'title',
type: 'string',
format: '',
},
{
name: 'status',
baseName: 'status',
type: 'number',
format: '',
},
];

static getAttributeTypeMap(): Array<AttributeType> {
return TooManyRequests.attributeTypeMap;
}
}
5 changes: 5 additions & 0 deletions test/payloads/analytics/getLiveStreamsPlays/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/analytics/getVideosPlays/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/captions/delete/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/captions/get/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/captions/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/captions/update/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/captions/upload/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/chapters/delete/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/chapters/get/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/chapters/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/chapters/upload/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/create/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/delete/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/deleteThumbnail/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/get/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/update/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/livestreams/uploadThumbnail/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/create/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/delete/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/deleteLogo/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/get/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/update/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/playerthemes/uploadLogo/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/uploadtokens/createToken/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/uploadtokens/deleteToken/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/uploadtokens/getToken/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/uploadtokens/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/create/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/delete/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/get/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/getStatus/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/pickThumbnail/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/update/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/upload/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/uploadThumbnail/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/videos/uploadWithUploadToken/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/watermarks/delete/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/watermarks/list/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/watermarks/upload/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
5 changes: 5 additions & 0 deletions test/payloads/webhooks/create/responses429.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type" : "https://docs.api.video/reference/too-many-requests",
"title" : "Too many requests.",
"status" : 429
}
Loading

0 comments on commit 9f0c184

Please sign in to comment.