42videobricks/php-client

42videobricks is a Video Platform As A Service (VPaaS)

1.2.1 2023-11-24 14:00 UTC

This package is not auto-updated.

Last update: 2024-04-26 16:06:40 UTC


README

42videobricks is a Video Platform As A Service (VPaaS)

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

From packagist.org

composer require 42videobricks/php-client

From github repository

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/42videobricks/42videobricks-php-client"
    }
  ],
  "require": {
    "42videobricks/php-client": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
$config = Api42Vb\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');

$apiInstance = new Api42Vb\Client\Api\VideosApi(
    new GuzzleHttp\Client(),
    $config
);
$limit = 10; // int | Number of elements to return (default=10)
$offset = 0; // int | offset for pagination

try {
    $result = $apiInstance->getVideos($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling VideosApi->getVideos: ', $e->getMessage(), PHP_EOL;
}

API Endpoints

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

Class Method HTTP request Description
DataApi getDataVideoUsage GET /data/videos/usage List Video Usage KPIs
PlaylistsApi addPlaylist POST /playlists Add a new playlist
PlaylistsApi deletePlaylistById DELETE /playlists/{playlistId} Delete a playlist
PlaylistsApi getPlaylistById GET /playlists/{playlistId} Retun a single playlist
PlaylistsApi getPlaylists GET /playlists List playlists
PlaylistsApi updatePlaylistById PUT /playlists/{playlistId} Update an existing playlist
TagsApi getTags GET /tags List Video Tags
VideosApi addAttachmentByVideoId POST /videos/{videoId}/attachments/{attachmentType}/{locale} Upload an attachement
VideosApi addThumbnailByVideoId POST /videos/{videoId}/thumbnail Upload a thumbnail
VideosApi addVideo POST /videos Add a new video
VideosApi deleteAttachmentByVideoId DELETE /videos/{videoId}/attachments/{attachmentType}/{locale} Delete an attachment
VideosApi deleteThumbnailByVideoId DELETE /videos/{videoId}/thumbnail Delete a thumbnail
VideosApi deleteVideoById DELETE /videos/{videoId} Delete a video
VideosApi finalizeMultipartUploadVideoById POST /videos/{videoId}/multipart-upload/finalize Multipart upload finalization
VideosApi finalizeUploadVideoById PUT /videos/{videoId}/upload/finalize Single file upload finalization
VideosApi getAttachmentByVideoId GET /videos/{videoId}/attachments/{attachmentType}/{locale} Get the attachment
VideosApi getAttachmentFileByVideoId GET /videos/{videoId}/attachments/{attachmentType}/{locale}/file Get attachement file
VideosApi getAttachmentsByVideoId GET /videos/{videoId}/attachments List of attachments
VideosApi getVideoById GET /videos/{videoId} Retun a single video
VideosApi getVideoStatusById GET /videos/{videoId}/status Retun the detailed status of the video
VideosApi getVideos GET /videos List videos
VideosApi initMultipartUploadVideoById POST /videos/{videoId}/multipart-upload/init Multipart upload intialization
VideosApi initUploadVideoById GET /videos/{videoId}/upload/init Single file upload intialization
VideosApi updateVideoById PUT /videos/{videoId} Update an existing video
WebhooksApi addWebhook POST /webhooks Add a new webhook
WebhooksApi deleteWebhookById DELETE /webhooks/{webhookId} Delete a webhook
WebhooksApi getWebhookById GET /webhooks/{webhookId} Retun a single webhook
WebhooksApi getWebhooks GET /webhooks List webhooks
WebhooksApi updateWebhookById PUT /webhooks/{webhookId} Update an existing webhook

Models

Authorization

Authentication schemes defined for the API:

api_key

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

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.2
    • Package version: 1.2.1
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen