diff --git a/CHANGELOG.md b/CHANGELOG.md index befcd6b7..001b514a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ Change Log ========== +Version 3.12.0 *(2022-07-07)* +---------------------------- +- Added `LiveEvent` data support. +- Added `VimeoApiClient.fetchLiveEvent` + Version 3.11.0 *(2022-07-07)* ---------------------------- - Updated `UploadQuotaPeriodType` to match new values. diff --git a/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt b/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt index 8c70127c..3a00daf7 100644 --- a/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt +++ b/api-core/src/main/java/com/vimeo/networking2/ApiConstants.kt @@ -33,7 +33,7 @@ object ApiConstants { const val SSL_URL_PATTERN = "*.vimeo.com" - const val SDK_VERSION = "3.11.0" + const val SDK_VERSION = "3.12.0" const val NONE = -1 diff --git a/gradle.properties b/gradle.properties index 7d2ce20c..bc35a367 100644 --- a/gradle.properties +++ b/gradle.properties @@ -19,7 +19,7 @@ org.gradle.parallel=true org.gradle.daemon=true org.gradle.jvmargs=-Xmx4096M -version=3.11.0 +version=3.12.0 android.useAndroidX=true android.enableJetifier=true diff --git a/models/src/main/java/com/vimeo/networking2/LiveEvent.kt b/models/src/main/java/com/vimeo/networking2/LiveEvent.kt new file mode 100644 index 00000000..0e307b02 --- /dev/null +++ b/models/src/main/java/com/vimeo/networking2/LiveEvent.kt @@ -0,0 +1,180 @@ +package com.vimeo.networking2 + +import com.squareup.moshi.Json +import com.squareup.moshi.JsonClass +import com.vimeo.networking2.common.Entity +import com.vimeo.networking2.enums.PlaylistSortType +import com.vimeo.networking2.enums.asEnum +import java.util.Date + +/** + * Live Event data. + * @param autoCCKeywords A comma-separated list of keywords for enhancing the speech detection of automated closed + * captions. + * @param autoCCLanguage The language of the Automated Closed Captions. + * @param autoCCRemaining The amount of time remaining to the user to access the Automated Closed Captions feature. + * @param contentRating The event's granular content ratings. Current values are: + * - 'unrated' - The event hasn't been rated. + * - 'safe' - The event is safe for all audiences. + * - 'advertisement' - The event contains advertisements. + * - 'drugs' - The event contains drug or alcohol use. + * - 'language' - The event contains profanity or sexually suggestive content. + * - 'nudity' - The event contains nudity. + * - 'violence' - The event contains violence. + * @param createdTime The time in ISO 8601 format when the live event was created. + * @param dashLink The upstream MPEG-DASH link. To create a live video on the event, send your live content + * to this link. + * @param embed The live event's embed data. + * @param firstVideoInPlaylist The first video to be played in the playlist. + * @param isAutoCCEnabled Whether the Automated Closed Captions feature is enabled. + * @param isChatEnabled Whether to display live chat on the event page on Vimeo. + * @param isFromShowcase Whether the live event was created from a showcase. + * @param isFromWebinar Whether the live event was created from a webinar. + * @param isLowLatencyEnabled Whether the low latency feature is enabled. + * @param isUnlimitedStreamingEnabled Whether 24/7 streaming is enabled for the event. + * @param link The URI to access the live event on Vimeo. + * @param liveClips A list of videos belonging to the live event, including their video IDs and dates streamed. + * @param metadata Metadata about the live event. + * @param nextOccurrenceTime The ISO 8601 date on which the next occurrence of the event is expected to be live. + * @param parentFolder Information about the folder that contains the event. + * @param pictures The active thumbnail image of the live event. + * @param playlistSort The order in which the videos inside the live event appear in the playlist. + * @param rtmpLink The upstream RTMP link. Send your live content to this link to create a live video on the event. + * @param rtmpsLink The upstream RTMPS link. Send your live content to this link to create a live video on the event. + * @param shouldAutomaticallyTitleStream When the value of this field is true, the title for the next video in the event + * is generated based on the time of the stream and the title field of the event. + * @param shouldIgnoreAutoCCTimeLimit Whether to ignore the time limit of the Automated Closed Captions feature. + * @param streamDescription The description of the next video streamed to the event. + * @param streamKey The stream key used in conjunction with the RTMP and RTMPS links. + * @param streamPassword Anyone with the password can access the videos generated by streaming to the event. + * @param streamPrivacy The initial privacy settings of videos generated by streaming to the event + * as well as the embed privacy of the entire collection. + * @param streamTitle The title of the next video streamed to the event. + * This field applies only when [shouldAutomaticallyTitleStream] is `false`. + * @param streamableVideo The live event's video. A recurring live event always has a video, + * which is either in a pre-live state (ready to be streamed to) or in a live state + * (which is currently being streamed to). + * @param timeZone The time zone used in resolving the timestamps included in auto-generated video titles. + * @param title The title of the live event. This field is also optionally used as the base title for videos + * created by streaming to the event. + * @param uri The live event's canonical relative URI. + * @param user The owner of the live event. + */ +@JsonClass(generateAdapter = true) +data class LiveEvent( + + @Json(name = "auto_cc_keywords") + val autoCCKeywords: String? = null, + + @Json(name = "auto_cc_language") + val autoCCLanguage: String? = null, + + @Json(name = "auto_cc_remaining") + val autoCCRemaining: Double? = null, + + @Json(name = "content_rating") + val contentRating: List? = null, + + @Json(name = "created_time") + val createdTime: Date? = null, + + @Json(name = "dash_link") + val dashLink: String? = null, + + @Json(name = "embed") + val embed: LiveEventEmbed? = null, + + @Json(name = "head_clip") + val firstVideoInPlaylist: Video? = null, + + @Json(name = "auto_cc_enabled") + val isAutoCCEnabled: Boolean? = null, + + @Json(name = "chat_enabled") + val isChatEnabled: Boolean? = null, + + @Json(name = "from_showcase") + val isFromShowcase: Boolean? = null, + + @Json(name = "from_webinar") + val isFromWebinar: Boolean? = null, + + @Json(name = "low_latency") + val isLowLatencyEnabled: Boolean? = null, + + @Json(name = "unlimited_duration") + val isUnlimitedStreamingEnabled: Boolean? = null, + + @Json(name = "link") + val link: String? = null, + + @Json(name = "live_clips") + val liveClips: List