Skip to content

Commit

Permalink
Add video tags endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierapivideo authored Oct 2, 2024
1 parent 96b2b45 commit b542938
Show file tree
Hide file tree
Showing 17 changed files with 1,220 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All changes to this project will be documented in this file.

## [1.6.3] - 2024-09-30
- Add /tags API endpoint

## [1.6.2] - 2024-09-16
- Add discarded video endpoints

Expand Down
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
- [ChaptersApi](#chaptersapi)
- [LiveStreamsApi](#livestreamsapi)
- [PlayerThemesApi](#playerthemesapi)
- [TagsApi](#tagsapi)
- [UploadTokensApi](#uploadtokensapi)
- [VideosApi](#videosapi)
- [WatermarksApi](#watermarksapi)
Expand Down Expand Up @@ -70,7 +71,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>video.api</groupId>
<artifactId>android-api-client</artifactId>
<version>1.6.2</version>
<version>1.6.3</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -80,7 +81,7 @@ Add this dependency to your project's POM:
Add this dependency to your project's build file:

```groovy
implementation "video.api:android-api-client:1.6.2"
implementation "video.api:android-api-client:1.6.3"
```

#### Others
Expand All @@ -93,7 +94,7 @@ mvn clean package

Then manually install the following JARs:

* `target/android-api-client-1.6.2.jar`
* `target/android-api-client-1.6.3.jar`
* `target/lib/*.jar`

### Code sample
Expand Down Expand Up @@ -303,6 +304,24 @@ Method | HTTP request | Description
[**deleteLogo**](https://github.com/apivideo/api.video-android-client/blob/main/docs/PlayerThemesApi.md#deleteLogo) | **DELETE** `/players/{playerId}/logo` | Delete logo


### TagsApi


#### Retrieve an instance of TagsApi:
```kotlin
val client = ApiVideoClient("YOUR_API_KEY")
val tags = client.tags()
```



#### Endpoints

Method | HTTP request | Description
------------- | ------------- | -------------
[**list**](https://github.com/apivideo/api.video-android-client/blob/main/docs/TagsApi.md#list) | **GET** `/tags` | List all video tags


### UploadTokensApi


Expand Down Expand Up @@ -425,6 +444,8 @@ Method | HTTP request | Description
- [FilterBy1](https://github.com/apivideo/api.video-android-client/blob/main/docs/FilterBy1.md)
- [FilterBy2](https://github.com/apivideo/api.video-android-client/blob/main/docs/FilterBy2.md)
- [Link](https://github.com/apivideo/api.video-android-client/blob/main/docs/Link.md)
- [ListTagsResponse](https://github.com/apivideo/api.video-android-client/blob/main/docs/ListTagsResponse.md)
- [ListTagsResponseData](https://github.com/apivideo/api.video-android-client/blob/main/docs/ListTagsResponseData.md)
- [LiveStream](https://github.com/apivideo/api.video-android-client/blob/main/docs/LiveStream.md)
- [LiveStreamAssets](https://github.com/apivideo/api.video-android-client/blob/main/docs/LiveStreamAssets.md)
- [LiveStreamCreationPayload](https://github.com/apivideo/api.video-android-client/blob/main/docs/LiveStreamCreationPayload.md)
Expand Down
205 changes: 205 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -981,6 +981,164 @@ paths:
// Documentation: https://github.com/apivideo/api.video-swift-client/blob/main/docs/VideosAPI.md#create
x-contentType: application/json
x-accepts: application/json
/tags:
get:
description: This endpoint enables you to search for video tags in a project
and see how many videos are tagged with them. If you do not define any query
parameters, the endpoint lists all video tags and the numbers of times they
are used in a project.
operationId: LIST-tags
parameters:
- description: |
Use this parameter to search for specific video tags. The API filters results even on partial values, and ignores accents, uppercase, and lowercase.
explode: true
in: query
name: value
required: false
schema:
type: string
style: form
- description: |
Use this parameter to choose which field the API will use to sort the response data. The default is `value`.

These are the available fields to sort by:

- `value`: Sorts the results based on tag values in alphabetic order.
- `videoCount`: Sorts the results based on the number of times a video tag is used.
example: value
explode: true
in: query
name: sortBy
required: false
schema:
enum:
- value
- videoCount
type: string
style: form
- description: Use this parameter to sort results. `asc` is ascending and sorts
from A to Z. `desc` is descending and sorts from Z to A.
example: asc
explode: true
in: query
name: sortOrder
required: false
schema:
enum:
- asc
- desc
type: string
style: form
- description: 'Choose the number of search results to return per page. Minimum
value: 1'
example: 2
explode: true
in: query
name: currentPage
required: false
schema:
default: 1
type: integer
style: form
- description: Results per page. Allowed values 1-100, default is 25.
example: 30
explode: true
in: query
name: pageSize
required: false
schema:
default: 25
type: integer
style: form
responses:
"200":
content:
application/json:
examples:
response:
value:
data:
- value: maths
videoCount: "33"
- value: tutorials
videoCount: "10"
pagination:
currentPage: 1
pageSize: 25
pagesTotal: 1
itemsTotal: 2
currentPageItems: 2
links:
- rel: self
uri: /tags?currentPage=1&pageSize=25
- rel: first
uri: /tags?currentPage=1&pageSize=25
- rel: last
uri: /tags?currentPage=1&pageSize=25
schema:
$ref: '#/components/schemas/list-tags-response'
description: Success
headers:
X-RateLimit-Limit:
description: The request limit per minute.
explode: false
schema:
type: integer
style: simple
X-RateLimit-Remaining:
description: The number of available requests left for the current time
window.
explode: false
schema:
type: integer
style: simple
X-RateLimit-Retry-After:
description: The number of seconds left until the current rate limit
window resets.
explode: false
schema:
type: integer
style: simple
"429":
content:
application/json:
examples:
Too many requests:
value:
type: https://docs.api.video/reference/too-many-requests
title: Too many requests.
status: 429
schema:
$ref: '#/components/schemas/too-many-requests'
description: Too Many Requests
headers:
X-RateLimit-Limit:
description: The request limit per minute.
explode: false
schema:
type: integer
style: simple
X-RateLimit-Remaining:
description: The number of available requests left for the current time
window.
explode: false
schema:
type: integer
style: simple
X-RateLimit-Retry-After:
description: The number of seconds left until the current rate limit
window resets.
explode: false
schema:
type: integer
style: simple
summary: List all video tags
tags:
- Tags
x-client-action: list
x-group-parameters: true
x-client-paginated: true
x-accepts: application/json
/videos/{videoId}/source:
post:
description: Ingest a video from a source or file.
Expand Down Expand Up @@ -14839,6 +14997,41 @@ components:
- videoId
title: Video
type: object
list-tags-response:
example:
pagination:
itemsTotal: 123
pagesTotal: 7
pageSize: 20
currentPage: 3
currentPageItems: 20
links:
first:
rel: first
uri: /videos/search?currentPage=1&pageSize=20
previous:
rel: previous
uri: /videos/search?currentPage=2&pageSize=20
next:
rel: next
uri: /videos/search?currentPage=4&pageSize=20
last:
rel: last
uri: /videos/search?currentPage=6&pageSize=20
data:
- videoCount: 0
value: value
- videoCount: 0
value: value
properties:
data:
items:
$ref: '#/components/schemas/list_tags_response_data'
type: array
pagination:
$ref: '#/components/schemas/pagination'
title: Tags
type: object
watermark:
example:
watermarkId: watermark_1BWr2L5MTQwxGkuxKjzh6i
Expand Down Expand Up @@ -16977,6 +17170,18 @@ components:
type: string
type: object
x-is-deep-object: true
list_tags_response_data:
example:
videoCount: 0
value: value
properties:
value:
description: Returns the value of a video tag used in your project.
type: string
videoCount:
description: Returns the number of times a video tag is used.
type: integer
type: object
player_theme_assets:
example:
link: path/to/my/logo/mylogo.jpg
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'maven-publish'
apply plugin: 'kotlin-android'

group = 'video.api'
version = '1.6.2'
version = '1.6.3'

buildscript {
repositories {
Expand Down
18 changes: 18 additions & 0 deletions docs/ListTagsResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


# ListTagsResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**data** | [**List&lt;ListTagsResponseData&gt;**](ListTagsResponseData.md) | | [optional]
**pagination** | [**Pagination**](Pagination.md) | | [optional]


## Implemented Interfaces

* Serializable
* DeepObject


18 changes: 18 additions & 0 deletions docs/ListTagsResponseData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@


# ListTagsResponseData

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **String** | Returns the value of a video tag used in your project. | [optional]
**videoCount** | **Integer** | Returns the number of times a video tag is used. | [optional]


## Implemented Interfaces

* Serializable
* DeepObject


Loading

0 comments on commit b542938

Please sign in to comment.