1.2.0 • Published 6 months ago

@42videobricks/nodejs-client v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

@42videobricks/nodejs-client

Api42Vb - JavaScript client for @42videobricks/nodejs-client 42videobricks is a Video Platform As A Service (VPaaS) This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.2
  • Package version: 1.2.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @42videobricks/nodejs-client --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @42videobricks/nodejs-client from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install 42videobricks/42videobricks-nodejs-client --save

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var Api42Vb = require('@42videobricks/nodejs-client');

var defaultClient = Api42Vb.ApiClient.instance;
// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = "YOUR API KEY"
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.apiKeyPrefix['x-api-key'] = "Token"

var api = new Api42Vb.VideosApi()
var opts = {
  'limit': 10, // {Number} Number of elements to return (default=10)
  'offset': 0 // {Number} offset for pagination
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getVideos(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://api-sbx.42videobricks.com

ClassMethodHTTP requestDescription
Api42Vb.DataApigetDataVideoUsageGET /data/videos/usageList Video Usage KPIs
Api42Vb.PlaylistsApiaddPlaylistPOST /playlistsAdd a new playlist
Api42Vb.PlaylistsApideletePlaylistByIdDELETE /playlists/{playlistId}Delete a playlist
Api42Vb.PlaylistsApigetPlaylistByIdGET /playlists/{playlistId}Retun a single playlist
Api42Vb.PlaylistsApigetPlaylistsGET /playlistsList playlists
Api42Vb.PlaylistsApiupdatePlaylistByIdPUT /playlists/{playlistId}Update an existing playlist
Api42Vb.TagsApigetTagsGET /tagsList Video Tags
Api42Vb.VideosApiaddAttachmentByVideoIdPOST /videos/{videoId}/attachments/{attachmentType}/{locale}Upload an attachement
Api42Vb.VideosApiaddThumbnailByVideoIdPOST /videos/{videoId}/thumbnailUpload a thumbnail
Api42Vb.VideosApiaddVideoPOST /videosAdd a new video
Api42Vb.VideosApideleteAttachmentByVideoIdDELETE /videos/{videoId}/attachments/{attachmentType}/{locale}Delete an attachment
Api42Vb.VideosApideleteThumbnailByVideoIdDELETE /videos/{videoId}/thumbnailDelete a thumbnail
Api42Vb.VideosApideleteVideoByIdDELETE /videos/{videoId}Delete a video
Api42Vb.VideosApifinalizeMultipartUploadVideoByIdPOST /videos/{videoId}/multipart-upload/finalizeMultipart upload finalization
Api42Vb.VideosApifinalizeUploadVideoByIdPUT /videos/{videoId}/upload/finalizeSingle file upload finalization
Api42Vb.VideosApigetAttachmentByVideoIdGET /videos/{videoId}/attachments/{attachmentType}/{locale}Get the attachment
Api42Vb.VideosApigetAttachmentFileByVideoIdGET /videos/{videoId}/attachments/{attachmentType}/{locale}/fileGet attachement file
Api42Vb.VideosApigetAttachmentsByVideoIdGET /videos/{videoId}/attachmentsList of attachments
Api42Vb.VideosApigetVideoByIdGET /videos/{videoId}Retun a single video
Api42Vb.VideosApigetVideoStatusByIdGET /videos/{videoId}/statusRetun the detailed status of the video
Api42Vb.VideosApigetVideosGET /videosList videos
Api42Vb.VideosApiinitMultipartUploadVideoByIdPOST /videos/{videoId}/multipart-upload/initMultipart upload intialization
Api42Vb.VideosApiinitUploadVideoByIdGET /videos/{videoId}/upload/initSingle file upload intialization
Api42Vb.VideosApiupdateVideoByIdPUT /videos/{videoId}Update an existing video
Api42Vb.WebhooksApiaddWebhookPOST /webhooksAdd a new webhook
Api42Vb.WebhooksApideleteWebhookByIdDELETE /webhooks/{webhookId}Delete a webhook
Api42Vb.WebhooksApigetWebhookByIdGET /webhooks/{webhookId}Retun a single webhook
Api42Vb.WebhooksApigetWebhooksGET /webhooksList webhooks
Api42Vb.WebhooksApiupdateWebhookByIdPUT /webhooks/{webhookId}Update an existing webhook

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

api_key

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header
1.2.0

6 months ago

1.1.2

7 months ago

1.1.1

7 months ago