From 64177bce67123de534a4212691d12bf950fbcc44 Mon Sep 17 00:00:00 2001 From: olivierapivideo Date: Mon, 28 Mar 2022 15:00:54 +0000 Subject: [PATCH] Livestream creation doc --- doc/api/CaptionsApi.md | 10 +++++----- doc/api/ChaptersApi.md | 8 ++++---- doc/api/LiveStreamsApi.md | 40 ++++++++++++++----------------------- doc/api/PlayerThemesApi.md | 14 ++++++------- doc/api/RawStatisticsApi.md | 6 +++--- doc/api/UploadTokensApi.md | 8 ++++---- doc/api/VideosApi.md | 20 +++++++++---------- doc/api/WatermarksApi.md | 6 +++--- doc/api/WebhooksApi.md | 8 ++++---- 9 files changed, 55 insertions(+), 65 deletions(-) diff --git a/doc/api/CaptionsApi.md b/doc/api/CaptionsApi.md index a9329ba..1d3afbf 100644 --- a/doc/api/CaptionsApi.md +++ b/doc/api/CaptionsApi.md @@ -37,7 +37,7 @@ Promise<[**void**](../model/.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklgc'; // The unique identifier for the video you want to delete a caption from. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. @@ -89,7 +89,7 @@ Promise<[**CaptionsListResponse**](../model/CaptionsListResponse.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation @@ -141,7 +141,7 @@ Promise<[**Caption**](../model/Caption.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want captions for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation @@ -193,7 +193,7 @@ Promise<[**Caption**](../model/Caption.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to have automatic captions for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. @@ -250,7 +250,7 @@ Promise<[**Caption**](../model/Caption.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to add a caption to. const language = 'en'; // A valid BCP 47 language representation. diff --git a/doc/api/ChaptersApi.md b/doc/api/ChaptersApi.md index af5a2df..41b0daa 100644 --- a/doc/api/ChaptersApi.md +++ b/doc/api/ChaptersApi.md @@ -34,7 +34,7 @@ Promise<[**void**](../model/.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to delete a chapter from. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. @@ -86,7 +86,7 @@ Promise<[**ChaptersListResponse**](../model/ChaptersListResponse.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to show a chapter for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. @@ -137,7 +137,7 @@ Promise<[**Chapter**](../model/Chapter.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to show a chapter for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. @@ -189,7 +189,7 @@ Promise<[**Chapter**](../model/Chapter.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want to upload a chapter for. const language = 'en'; // A valid [BCP 47](https://github.com/libyal/libfwnt/wiki/Language-Code-identifiers) language representation. diff --git a/doc/api/LiveStreamsApi.md b/doc/api/LiveStreamsApi.md index 2ab72dc..554d327 100644 --- a/doc/api/LiveStreamsApi.md +++ b/doc/api/LiveStreamsApi.md @@ -36,7 +36,7 @@ Promise<[**void**](../model/.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream that you want to remove. @@ -84,7 +84,7 @@ Promise<[**LiveStream**](../model/LiveStream.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique identifier for the live stream you want to delete. @@ -138,7 +138,7 @@ Promise<[**LiveStreamListResponse**](../model/LiveStreamListResponse.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const streamKey = '30087931-229e-42cf-b5f9-e91bcc1f7332'; // The unique stream key that allows you to stream videos. const name = 'My Video'; // You can filter live streams by their name or a part of their name. @@ -191,7 +191,7 @@ Promise<[**LiveStream**](../model/LiveStream.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream you want to watch. @@ -240,7 +240,7 @@ Promise<[**LiveStream**](../model/LiveStream.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const liveStreamId = 'li400mYKSgQ6xs7taUeSaEKr'; // The unique ID for the live stream that you want to update information for such as player details, or whether you want the recording on or off. const liveStreamUpdatePayload = { @@ -291,27 +291,17 @@ Promise<[**LiveStream**](../model/LiveStream.md)>. ### Example ```js -//install the module with npm or yarn -//npm install @api.video/nodejs-client --save -//yarn add @api.video/nodejs-client -(async () => { - try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +// instantiate the client +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); - const liveStreamCreationPayload = { - name: "My Live Stream Video", // Add a name for your live stream here. - record: true, // Whether you are recording or not. True for record, false for not record. - _public: true, // BETA FEATURE Please limit all public = false ("private") livestreams to 3,000 users. Whether your video can be viewed by everyone, or requires authentication to see it. A setting of false will require a unique token for each view. - playerId: "pl4f4ferf5erfr5zed4fsdd", // The unique identifier for the player. - }; +const liveStreamCreationPayload = { + record: false, // Whether you are recording or not. True for record, false for not record. + name: "My Live Stream", // Add a name for your live stream here. + _public: true, // Whether your video can be viewed by everyone, or requires authentication to see it. + playerId: "pl4f4ferf5erfr5zed4fsdd", // The unique identifier for the player. +}; - // LiveStream - const result = await client.liveStreams.create(liveStreamCreationPayload); - console.log(result); - } catch (e) { - console.error(e); - } -})(); +const liveStream = await client.liveStreams.create(liveStreamCreationPayload); ``` @@ -351,7 +341,7 @@ Promise<[**LiveStream**](../model/LiveStream.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique ID for the live stream you want to upload. const file = 'BINARY_DATA_HERE'; // The image to be added as a thumbnail. diff --git a/doc/api/PlayerThemesApi.md b/doc/api/PlayerThemesApi.md index 90b322d..5f52b8d 100644 --- a/doc/api/PlayerThemesApi.md +++ b/doc/api/PlayerThemesApi.md @@ -38,7 +38,7 @@ Promise<[**void**](../model/.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to delete. @@ -85,7 +85,7 @@ Promise<[**void**](../model/.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const playerId = 'pl14Db6oMJRH6SRVoOwORacK'; // The unique identifier for the player. @@ -138,7 +138,7 @@ Promise<[**PlayerThemesListResponse**](../model/PlayerThemesListResponse.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const sortBy = 'createdAt'; // createdAt is the time the player was created. updatedAt is the time the player was last updated. The time is presented in ISO-8601 format. const sortOrder = 'asc'; // Allowed: asc, desc. Ascending for date and time means that earlier values precede later ones. Descending means that later values preced earlier ones. @@ -190,7 +190,7 @@ Promise<[**PlayerTheme**](../model/PlayerTheme.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player you want to retrieve. @@ -240,7 +240,7 @@ Promise<[**PlayerTheme**](../model/PlayerTheme.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const playerId = 'pl45d5vFFGrfdsdsd156dGhh'; // The unique identifier for the player. const playerThemeUpdatePayload = { @@ -305,7 +305,7 @@ Promise<[**PlayerTheme**](../model/PlayerTheme.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const playerThemeCreationPayload = { text: "text_example", // RGBA color for timer text. Default: rgba(255, 255, 255, 1) @@ -370,7 +370,7 @@ Promise<[**PlayerTheme**](../model/PlayerTheme.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const playerId = 'pl14Db6oMJRH6SRVoOwORacK'; // The unique identifier for the player. const file = 'BINARY_DATA_HERE'; // The name of the file you want to use for your logo. diff --git a/doc/api/RawStatisticsApi.md b/doc/api/RawStatisticsApi.md index 3d52fe3..d92ba59 100644 --- a/doc/api/RawStatisticsApi.md +++ b/doc/api/RawStatisticsApi.md @@ -35,7 +35,7 @@ Promise<[**RawStatisticsListLiveStreamAnalyticsResponse**](../model/RawStatistic //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const liveStreamId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the live stream you want to retrieve analytics for. const period = '2019-01-01'; // Period must have one of the following formats: - For a day : "2018-01-01", - For a week: "2018-W01", - For a month: "2018-01" - For a year: "2018" For a range period: - Date range: "2018-01-01/2018-01-15" @@ -89,7 +89,7 @@ Promise<[**RawStatisticsListPlayerSessionEventsResponse**](../model/RawStatistic //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const sessionId = 'psEmFwGQUAXR2lFHj5nDOpy'; // A unique identifier you can use to reference and track a session with. const currentPage = '2'; // Choose the number of search results to return per page. Minimum value: 1 @@ -144,7 +144,7 @@ Promise<[**RawStatisticsListSessionsResponse**](../model/RawStatisticsListSessio //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Prklg'; // The unique identifier for the video you want to retrieve session information for. const period = 'period_example'; // Period must have one of the following formats: - For a day : 2018-01-01, - For a week: 2018-W01, - For a month: 2018-01 - For a year: 2018 For a range period: - Date range: 2018-01-01/2018-01-15 diff --git a/doc/api/UploadTokensApi.md b/doc/api/UploadTokensApi.md index 684a4bd..3d47280 100644 --- a/doc/api/UploadTokensApi.md +++ b/doc/api/UploadTokensApi.md @@ -31,7 +31,7 @@ Promise<[**void**](../model/.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const uploadToken = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the upload token you want to delete. Deleting a token will make it so the token can no longer be used for authentication. @@ -74,7 +74,7 @@ Promise<[**TokenListResponse**](../model/TokenListResponse.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const uploadTokens = await client.uploadTokens.list(); @@ -111,7 +111,7 @@ Promise<[**UploadToken**](../model/UploadToken.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const uploadTokenId = 'to1tcmSFHeYY5KzyhOqVKMKb'; // The unique identifier for the token you want information about. @@ -150,7 +150,7 @@ Promise<[**UploadToken**](../model/UploadToken.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const tokenCreationPayload = { ttl: 56, // Time in seconds that the token will be active. A value of 0 means that the token has no expiration date. The default is to have no expiration. diff --git a/doc/api/VideosApi.md b/doc/api/VideosApi.md index c8fc32f..f0b9107 100644 --- a/doc/api/VideosApi.md +++ b/doc/api/VideosApi.md @@ -37,7 +37,7 @@ Promise<[**void**](../model/.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // the id of the video to delete await client.videos.delete(videoId); @@ -75,7 +75,7 @@ Promise<[**Video**](../model/Video.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for. const result = await client.videos.getStatus(videoId); @@ -113,7 +113,7 @@ Promise<[**VideoStatus**](../model/VideoStatus.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The unique identifier for the video you want the status for. const result = await client.videos.getStatus(videoId); @@ -159,7 +159,7 @@ Promise<[**VideosListResponse**](../model/VideosListResponse.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); // list all videos (all pages) let allVideos = []; @@ -214,7 +214,7 @@ Promise<[**Video**](../model/Video.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // The video ID for the video you want to update. @@ -273,7 +273,7 @@ Promise<[**Video**](../model/Video.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Unique identifier of the video you want to add a thumbnail to, where you use a section of your video as the thumbnail. const videoThumbnailPickPayload = { @@ -319,7 +319,7 @@ Promise<[**Video**](../model/Video.md)>. // The following example show how to do it from the backend, but you should rather use the standard upload method in this case. // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const token = 'to4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter the unique identifier for the token you want to use to upload a video. const file = './my-video.mp4'; // The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video. @@ -396,7 +396,7 @@ Promise<[**Video**](../model/Video.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); // create a simple video const video = await client.videos.create({ title: "Maths video" }); @@ -470,7 +470,7 @@ Promise<[**Video**](../model/Video.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'vi4k0jvEUuaTdRAEjQ4Jfrgz'; // Enter the videoId you want to use to upload your video. const file = './my-video.mp4'; // The path to the video you would like to upload. The path must be local. If you want to use a video from an online source, you must use the "/videos" endpoint and add the "source" parameter when you create a new video. @@ -557,7 +557,7 @@ Promise<[**Video**](../model/Video.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const videoId = 'videoId_example'; // Unique identifier of the chosen video const file = './thumbnail.jpg'; // The image to be added as a thumbnail. diff --git a/doc/api/WatermarksApi.md b/doc/api/WatermarksApi.md index 8edaaec..e0f19f6 100644 --- a/doc/api/WatermarksApi.md +++ b/doc/api/WatermarksApi.md @@ -30,7 +30,7 @@ Promise<[**void**](../model/.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const watermarkId = 'watermark_1Bji68oeAAwR44dAb5ZhML'; // The watermark ID for the watermark you want to delete. @@ -72,7 +72,7 @@ Promise<[**WatermarksListResponse**](../model/WatermarksListResponse.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); // retrieve the first page of all watermarks const watermarks = await client.watermarks.list({}); @@ -114,7 +114,7 @@ Promise<[**Watermark**](../model/Watermark.md)>. ### Example ```js // instantiate the client -const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); +const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); // Upload a watermark const watermark = await client.watermarks.upload('test/data/test.jpg'); diff --git a/doc/api/WebhooksApi.md b/doc/api/WebhooksApi.md index 678bdc4..992df62 100644 --- a/doc/api/WebhooksApi.md +++ b/doc/api/WebhooksApi.md @@ -35,7 +35,7 @@ Promise<[**void**](../model/.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const webhookId = 'webhookId_example'; // The webhook you wish to delete. @@ -84,7 +84,7 @@ Promise<[**Webhook**](../model/Webhook.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const webhookId = 'webhookId_example'; // The unique webhook you wish to retreive details on. @@ -134,7 +134,7 @@ Promise<[**WebhooksListResponse**](../model/WebhooksListResponse.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const events = 'video.encoding.quality.completed'; // The webhook event that you wish to filter on. const currentPage = '2'; // Choose the number of search results to return per page. Minimum value: 1 @@ -188,7 +188,7 @@ Promise<[**Webhook**](../model/Webhook.md)>. //yarn add @api.video/nodejs-client (async () => { try { - const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" }); + const client = new ApiVideoClient({ apiKey: "YOUR_API_KEY" }); const webhooksCreationPayload = { events: ["video.encoding.quality.completed"], // A list of the webhooks that you are subscribing to. There are Currently four webhook options: * ```video.encoding.quality.completed``` Occurs when a new video is uploaded into your account, it will be encoded into several different HLS and mp4 qualities. When each version is encoded, your webhook will get a notification. It will look like ```{ "type": "video.encoding.quality.completed", "emittedAt": "2021-01-29T16:46:25.217+01:00", "videoId": "viXXXXXXXX", "encoding": "hls", "quality": "720p"} ```. This request says that the 720p HLS encoding was completed. * ```live-stream.broadcast.started``` When a lives tream begins broadcasting, the broadcasting parameter changes from false to true, and this webhook fires. * ```live-stream.broadcast.ended``` This event fires when the live stream has finished broadcasting, and the broadcasting parameter flips from false to true. * ```video.source.recorded``` Occurs when a live stream is recorded and submitted for encoding.