-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CXAN-187 Add chapters models and endpoint (#626)
Co-authored-by: Alexander Baltser <[email protected]>
- Loading branch information
1 parent
07a5971
commit f2a5c8d
Showing
8 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.vimeo.networking2 | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
|
||
/** | ||
* Chapter data. | ||
* | ||
* @param uri The relative URI of the chapter. | ||
* @param title The title of the chapter. | ||
* @param timeCode The timecode of the chapter in seconds from the start of the video. | ||
*/ | ||
@JsonClass(generateAdapter = true) | ||
data class Chapter( | ||
|
||
@Json(name = "uri") | ||
val uri: String? = null, | ||
|
||
@Json(name = "title") | ||
val title: String? = null, | ||
|
||
@Json(name = "timecode") | ||
val timeCode: Long? = null | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.vimeo.networking2 | ||
|
||
import com.squareup.moshi.Json | ||
import com.squareup.moshi.JsonClass | ||
import com.vimeo.networking2.common.Page | ||
|
||
/** | ||
* List of chapters that are pageable. | ||
*/ | ||
@JsonClass(generateAdapter = true) | ||
data class ChapterList( | ||
|
||
@Json(name = "total") | ||
override val total: Int? = null, | ||
|
||
@Json(name = "filtered_total") | ||
override val filteredTotal: Int? = null, | ||
|
||
@Json(name = "data") | ||
override val data: List<Chapter>? = null | ||
) : Page<Chapter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters