Skip to content

Latest commit

 

History

History
220 lines (168 loc) · 9.3 KB

WatermarksApi.md

File metadata and controls

220 lines (168 loc) · 9.3 KB

ApiVideo.Api.WatermarksApi

All URIs are relative to https://ws.api.video

Method HTTP request Description
upload POST /watermarks Upload a watermark
delete DELETE /watermarks/{watermarkId} Delete a watermark
list GET /watermarks List all watermarks

upload

Watermark upload (System.IO.Stream file)

Upload a watermark

Create a new watermark by uploading a JPG or a PNG image.

Example

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class uploadExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var file = BINARY_DATA_HERE;  // System.IO.Stream | The `.jpg` or `.png` image to be added as a watermark.
            var apiWatermarksInstance = apiInstance.Watermarks();
            try
            {
                // Upload a watermark
                Watermark result = apiWatermarksInstance.upload(file);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WatermarksApi.upload: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
file System.IO.Stream****System.IO.Stream The `.jpg` or `.png` image to be added as a watermark.

Return type

Watermark

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
400 Bad Request * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete

void delete (string watermarkId)

Delete a watermark

Delete a watermark.

Example

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class deleteExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var watermarkId = watermark_1BWr2L5MTQwxGkuxKjzh6i;  // string | The watermark ID for the watermark you want to delete.
            var apiWatermarksInstance = apiInstance.Watermarks();
            try
            {
                // Delete a watermark
                apiWatermarksInstance.delete(watermarkId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WatermarksApi.delete: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
watermarkId string The watermark ID for the watermark you want to delete.

Return type

void (empty response body)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
204 No Content * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
404 Not Found * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list

WatermarksListResponse list (string sortBy = null, string sortOrder = null, int? currentPage = null, int? pageSize = null)

List all watermarks

List all watermarks associated with your workspace.

Example

using System.Diagnostics;
using ApiVideo.Client;

namespace Example
{
    public class listExample
    {
        public static void Main()
        {
            var basePath = ApiVideoClient.Client.Environment.SANDBOX;
            var apiKey = "YOUR_API_KEY";

            var apiInstance = new ApiVideoClient(apiKey,basePath);

            var sortBy = createdAt;  // string | Allowed: createdAt. You can search by the time watermark were created at. (optional) 
            var sortOrder = asc;  // string | Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. (optional) 
            var currentPage = 2;  // int? | Choose the number of search results to return per page. Minimum value: 1 (optional)  (default to 1)
            var pageSize = 30;  // int? | Results per page. Allowed values 1-100, default is 25. (optional)  (default to 25)
            var apiWatermarksInstance = apiInstance.Watermarks();
            try
            {
                // List all watermarks
                WatermarksListResponse result = apiWatermarksInstance.list(sortBy, sortOrder, currentPage, pageSize);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling WatermarksApi.list: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
sortBy string Allowed: createdAt. You can search by the time watermark were created at. [optional]
sortOrder string Allowed: asc, desc. asc is ascending and sorts from A to Z. desc is descending and sorts from Z to A. [optional]
currentPage int? Choose the number of search results to return per page. Minimum value: 1 [optional] [default to 1]
pageSize int? Results per page. Allowed values 1-100, default is 25. [optional] [default to 25]

Return type

WatermarksListResponse

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
400 Bad Request * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.
429 Too Many Requests * X-RateLimit-Limit - The request limit per minute.
* X-RateLimit-Remaining - The number of available requests left for the current time window.
* X-RateLimit-Retry-After - The number of seconds left until the current rate limit window resets.

[Back to top] [Back to API list] [Back to Model list] [Back to README]