-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvideo.ex
74 lines (69 loc) · 1.78 KB
/
video.ex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
defmodule Holodex.Model.Video do
@moduledoc false
alias Holodex.Model
defstruct [
:id,
:title,
:type,
:topic_id,
:published_at,
:available_at,
:duration,
:status,
:live_tl_count,
:start_scheduled,
:start_actual,
:end_actual,
:live_viewers,
:description,
:songcount,
:channel_id,
:channel,
:clips,
:sources,
:refers,
:simulcasts,
:mentions,
:songs,
:comments,
:recommendations
]
@typedoc """
`Video` resource type definition. A map of atom keys and mostly UTF-8 binary values.
Can optionally contain a `channel` bare map.
"""
@type t() :: %__MODULE__{
id: String.t(),
title: String.t(),
type: String.t(),
topic_id: String.t(),
published_at: String.t(),
available_at: String.t(),
duration: pos_integer(),
status: String.t(),
live_tl_count: LiveTLCount.t(),
start_scheduled: String.t(),
start_actual: String.t(),
end_actual: String.t(),
live_viewers: pos_integer(),
description: String.t(),
songcount: pos_integer(),
channel_id: String.t(),
channel: Model.Channel.t() | nil,
clips: [Model.Video.t()] | nil,
sources: [Model.Video.t()] | nil,
refers: [Model.Video.t()] | nil,
simulcasts: [Model.Video.t()] | nil,
mentions: [Model.Channel.t()] | nil,
songs: number() | nil,
comments: [Model.Comment.t()] | nil,
recommendations: [Model.Video.t()] | nil
}
defmodule LiveTLCount do
@moduledoc """
Struct containing translation counts per language.
"""
defstruct [:es, :en, :ko, :ja, :ru]
@type t :: map() | nil | %{}
end
end