Skip to content

Commit a86f2e5

Browse files
author
olivierapivideo
authored
Add transcript feature
1 parent 6fbc14b commit a86f2e5

File tree

9 files changed

+153
-13
lines changed

9 files changed

+153
-13
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
All changes to this project will be documented in this file.
33

4+
## [1.3.7] - 2024-10-08
5+
- Add transcript feature
6+
47
## [1.3.6] - 2024-04-25
58
- Add API to get rate limiting headers
69

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Add this dependency to your project's POM:
6262
<dependency>
6363
<groupId>video.api</groupId>
6464
<artifactId>android-video-uploader</artifactId>
65-
<version>1.3.6</version>
65+
<version>1.3.7</version>
6666
<scope>compile</scope>
6767
</dependency>
6868
```
@@ -72,7 +72,7 @@ Add this dependency to your project's POM:
7272
Add this dependency to your project's build file:
7373

7474
```groovy
75-
implementation "video.api:android-video-uploader:1.3.6"
75+
implementation "video.api:android-video-uploader:1.3.7"
7676
```
7777

7878
#### Others
@@ -85,7 +85,7 @@ mvn clean package
8585

8686
Then manually install the following JARs:
8787

88-
* `target/android-video-uploader-1.3.6.jar`
88+
* `target/android-video-uploader-1.3.7.jar`
8989
* `target/lib/*.jar`
9090

9191
### Code sample

api/openapi.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ paths:
613613
playerId: pl45KFKdlddgk654dspkze
614614
title: Maths video
615615
description: An amazing video explaining the string theory
616+
language: en
616617
public: false
617618
panoramic: false
618619
tags:
@@ -1049,6 +1050,8 @@ components:
10491050
videoId: vi4k0jvEUuaTdRAEjQ4Jfrgz
10501051
title: Maths video
10511052
description: An amazing video explaining the string theory
1053+
language: en
1054+
languageOrigin: api
10521055
tags:
10531056
- maths
10541057
- string theory
@@ -1120,6 +1123,22 @@ components:
11201123
description: Returns `true` for videos you discarded when you have the Video
11211124
Restore feature enabled. Returns `false` for every other video.
11221125
type: boolean
1126+
language:
1127+
description: Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag)
1128+
format. You can set the language during video creation via the API, otherwise
1129+
it is detected automatically.
1130+
type: string
1131+
languageOrigin:
1132+
description: |-
1133+
Returns the origin of the last update on the video's `language` attribute.
1134+
1135+
- `api` means that the last update was requested from the API.
1136+
- `auto` means that the last update was done automatically by the API.
1137+
enum:
1138+
- api
1139+
- auto
1140+
nullable: true
1141+
type: string
11231142
tags:
11241143
description: "One array of tags (each tag is a string) in order to categorize\
11251144
\ a video. Tags may include spaces. \n"

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ apply plugin: 'maven-publish'
55
apply plugin: 'kotlin-android'
66

77
group = 'video.api'
8-
version = '1.3.6'
8+
version = '1.3.7'
99

1010
buildscript {
1111
repositories {

docs/Video.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Name | Type | Description | Notes
1515
**discardedAt** | **OffsetDateTime** | The date and time the video was discarded. The API populates this field only if you have the Video Restore feature enabled and discard a video. Date and time are provided using ATOM UTC format. | [optional]
1616
**deletesAt** | **OffsetDateTime** | The date and time the video will be permanently deleted. The API populates this field only if you have the Video Restore feature enabled and discard a video. Discarded videos are pemanently deleted after 90 days. Date and time are provided using ATOM UTC format. | [optional]
1717
**discarded** | **Boolean** | Returns &#x60;true&#x60; for videos you discarded when you have the Video Restore feature enabled. Returns &#x60;false&#x60; for every other video. | [optional]
18+
**language** | **String** | Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically. | [optional]
19+
**languageOrigin** | [**LanguageOriginEnum**](#LanguageOriginEnum) | Returns the origin of the last update on the video&#39;s &#x60;language&#x60; attribute. - &#x60;api&#x60; means that the last update was requested from the API. - &#x60;auto&#x60; means that the last update was done automatically by the API. | [optional]
1820
**tags** | **List&lt;String&gt;** | One array of tags (each tag is a string) in order to categorize a video. Tags may include spaces. | [optional]
1921
**metadata** | [**List&lt;Metadata&gt;**](Metadata.md) | Metadata you can use to categorise and filter videos. Metadata is a list of dictionaries, where each dictionary represents a key value pair for categorising a video. | [optional]
2022
**source** | [**VideoSource**](VideoSource.md) | | [optional]
@@ -25,6 +27,15 @@ Name | Type | Description | Notes
2527
**mp4Support** | **Boolean** | This lets you know whether mp4 is supported. If enabled, an mp4 URL will be provided in the response for the video. | [optional]
2628

2729

30+
31+
## Enum: LanguageOriginEnum
32+
33+
Name | Value
34+
---- | -----
35+
API | &quot;api&quot;
36+
AUTO | &quot;auto&quot;
37+
38+
2839
## Implemented Interfaces
2940

3041
* Serializable

maven-push.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ apply plugin: 'maven-publish'
1818
apply plugin: 'signing'
1919

2020
def isReleaseBuild() {
21-
return !"1.3.6".contains("SNAPSHOT")
21+
return !"1.3.7".contains("SNAPSHOT")
2222
}
2323

2424
def getReleaseRepositoryUrl() {
@@ -57,7 +57,7 @@ afterEvaluate {
5757

5858
groupId = "video.api"
5959
artifactId = "android-video-uploader"
60-
version = "1.3.6"
60+
version = "1.3.7"
6161

6262
pom {
6363
name = "video.api:android-video-uploader"

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<artifactId>android-video-uploader</artifactId>
66
<packaging>jar</packaging>
77
<name>${project.groupId}:${project.artifactId}</name>
8-
<version>1.3.6</version>
8+
<version>1.3.7</version>
99
<url>https://github.com/apivideo/api.video-android-uploader</url>
1010
<description>The official Android api.video uploader</description>
1111
<scm>

src/main/java/video/api/uploader/api/ApiClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private OkHttpClient initHttpClient(List<Interceptor> interceptors) {
120120
private void init() {
121121
verifyingSsl = true;
122122
json = new JSON();
123-
addDefaultHeader("AV-Origin-Client", "android-uploader:1.3.6");
123+
addDefaultHeader("AV-Origin-Client", "android-uploader:1.3.7");
124124
}
125125

126126
private boolean isValid(String regex, String field) {

src/main/java/video/api/uploader/api/models/Video.java

Lines changed: 112 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,63 @@ public class Video implements Serializable, DeepObject {
7272
@SerializedName(SERIALIZED_NAME_DISCARDED)
7373
private Boolean discarded;
7474

75+
public static final String SERIALIZED_NAME_LANGUAGE = "language";
76+
@SerializedName(SERIALIZED_NAME_LANGUAGE)
77+
private String language;
78+
79+
/**
80+
* Returns the origin of the last update on the video&#39;s &#x60;language&#x60; attribute. - &#x60;api&#x60; means
81+
* that the last update was requested from the API. - &#x60;auto&#x60; means that the last update was done
82+
* automatically by the API.
83+
*/
84+
@JsonAdapter(LanguageOriginEnum.Adapter.class)
85+
public enum LanguageOriginEnum {
86+
API("api"),
87+
88+
AUTO("auto");
89+
90+
private String value;
91+
92+
LanguageOriginEnum(String value) {
93+
this.value = value;
94+
}
95+
96+
public String getValue() {
97+
return value;
98+
}
99+
100+
@Override
101+
public String toString() {
102+
return String.valueOf(value);
103+
}
104+
105+
public static LanguageOriginEnum fromValue(String value) {
106+
for (LanguageOriginEnum b : LanguageOriginEnum.values()) {
107+
if (b.value.equals(value)) {
108+
return b;
109+
}
110+
}
111+
return null;
112+
}
113+
114+
public static class Adapter extends TypeAdapter<LanguageOriginEnum> {
115+
@Override
116+
public void write(final JsonWriter jsonWriter, final LanguageOriginEnum enumeration) throws IOException {
117+
jsonWriter.value(enumeration.getValue());
118+
}
119+
120+
@Override
121+
public LanguageOriginEnum read(final JsonReader jsonReader) throws IOException {
122+
String value = jsonReader.nextString();
123+
return LanguageOriginEnum.fromValue(value);
124+
}
125+
}
126+
}
127+
128+
public static final String SERIALIZED_NAME_LANGUAGE_ORIGIN = "languageOrigin";
129+
@SerializedName(SERIALIZED_NAME_LANGUAGE_ORIGIN)
130+
private LanguageOriginEnum languageOrigin;
131+
75132
public static final String SERIALIZED_NAME_TAGS = "tags";
76133
@SerializedName(SERIALIZED_NAME_TAGS)
77134
private List<String> tags = null;
@@ -296,6 +353,51 @@ public void setDiscarded(Boolean discarded) {
296353
this.discarded = discarded;
297354
}
298355

356+
public Video language(String language) {
357+
this.language = language;
358+
return this;
359+
}
360+
361+
/**
362+
* Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.
363+
* You can set the language during video creation via the API, otherwise it is detected automatically.
364+
*
365+
* @return language
366+
**/
367+
@javax.annotation.Nullable
368+
@ApiModelProperty(value = "Returns the language of a video in [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format. You can set the language during video creation via the API, otherwise it is detected automatically.")
369+
370+
public String getLanguage() {
371+
return language;
372+
}
373+
374+
public void setLanguage(String language) {
375+
this.language = language;
376+
}
377+
378+
public Video languageOrigin(LanguageOriginEnum languageOrigin) {
379+
this.languageOrigin = languageOrigin;
380+
return this;
381+
}
382+
383+
/**
384+
* Returns the origin of the last update on the video&#39;s &#x60;language&#x60; attribute. - &#x60;api&#x60; means
385+
* that the last update was requested from the API. - &#x60;auto&#x60; means that the last update was done
386+
* automatically by the API.
387+
*
388+
* @return languageOrigin
389+
**/
390+
@javax.annotation.Nullable
391+
@ApiModelProperty(value = "Returns the origin of the last update on the video's `language` attribute. - `api` means that the last update was requested from the API. - `auto` means that the last update was done automatically by the API.")
392+
393+
public LanguageOriginEnum getLanguageOrigin() {
394+
return languageOrigin;
395+
}
396+
397+
public void setLanguageOrigin(LanguageOriginEnum languageOrigin) {
398+
this.languageOrigin = languageOrigin;
399+
}
400+
299401
public Video tags(List<String> tags) {
300402
this.tags = tags;
301403
return this;
@@ -498,16 +600,19 @@ public boolean equals(Object o) {
498600
&& Objects.equals(this.updatedAt, video.updatedAt)
499601
&& Objects.equals(this.discardedAt, video.discardedAt)
500602
&& Objects.equals(this.deletesAt, video.deletesAt) && Objects.equals(this.discarded, video.discarded)
501-
&& Objects.equals(this.tags, video.tags) && Objects.equals(this.metadata, video.metadata)
502-
&& Objects.equals(this.source, video.source) && Objects.equals(this.assets, video.assets)
503-
&& Objects.equals(this.playerId, video.playerId) && Objects.equals(this._public, video._public)
504-
&& Objects.equals(this.panoramic, video.panoramic) && Objects.equals(this.mp4Support, video.mp4Support);
603+
&& Objects.equals(this.language, video.language)
604+
&& Objects.equals(this.languageOrigin, video.languageOrigin) && Objects.equals(this.tags, video.tags)
605+
&& Objects.equals(this.metadata, video.metadata) && Objects.equals(this.source, video.source)
606+
&& Objects.equals(this.assets, video.assets) && Objects.equals(this.playerId, video.playerId)
607+
&& Objects.equals(this._public, video._public) && Objects.equals(this.panoramic, video.panoramic)
608+
&& Objects.equals(this.mp4Support, video.mp4Support);
505609
}
506610

507611
@Override
508612
public int hashCode() {
509613
return Objects.hash(videoId, createdAt, title, description, publishedAt, updatedAt, discardedAt, deletesAt,
510-
discarded, tags, metadata, source, assets, playerId, _public, panoramic, mp4Support);
614+
discarded, language, languageOrigin, tags, metadata, source, assets, playerId, _public, panoramic,
615+
mp4Support);
511616
}
512617

513618
@Override
@@ -523,6 +628,8 @@ public String toString() {
523628
sb.append(" discardedAt: ").append(toIndentedString(discardedAt)).append("\n");
524629
sb.append(" deletesAt: ").append(toIndentedString(deletesAt)).append("\n");
525630
sb.append(" discarded: ").append(toIndentedString(discarded)).append("\n");
631+
sb.append(" language: ").append(toIndentedString(language)).append("\n");
632+
sb.append(" languageOrigin: ").append(toIndentedString(languageOrigin)).append("\n");
526633
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
527634
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
528635
sb.append(" source: ").append(toIndentedString(source)).append("\n");

0 commit comments

Comments
 (0)