-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrackclass.py
More file actions
124 lines (93 loc) · 1.94 KB
/
trackclass.py
File metadata and controls
124 lines (93 loc) · 1.94 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
from __future__ import annotations
from typing import Any, List, Optional
from pydantic import BaseModel
import ujson
class ExternalUrls(BaseModel):
spotify: str
class AddedBy(BaseModel):
external_urls: ExternalUrls
href: str
id: str
type: str
uri: str
class ExternalUrls1(BaseModel):
spotify: str
class Artist(BaseModel):
external_urls: ExternalUrls1
href: str
id: str
name: str
type: str
uri: str
class ExternalUrls2(BaseModel):
spotify: str
class Image(BaseModel):
height: int
url: str
width: int
class Album(BaseModel):
album_type: str
artists: List[Artist]
available_markets: List[str]
external_urls: ExternalUrls2
href: str
id: str
images: List[Image]
name: str
release_date: str
release_date_precision: str
total_tracks: int
type: str
uri: str
class ExternalUrls3(BaseModel):
spotify: str
class Artist1(BaseModel):
external_urls: ExternalUrls3
href: str
id: str
name: str
type: str
uri: str
class ExternalIds(BaseModel):
isrc: str
class ExternalUrls4(BaseModel):
spotify: str
class Track(BaseModel):
album: Album
artists: List[Artist1]
available_markets: List[str]
disc_number: int
duration_ms: int
episode: bool
explicit: bool
external_ids: ExternalIds
external_urls: ExternalUrls4
href: str
id: str
is_local: bool
name: str
popularity: int
preview_url: Optional[str]
track: bool
track_number: int
type: str
uri: str
class VideoThumbnail(BaseModel):
url: Any
class Item(BaseModel):
added_at: str
added_by: AddedBy
is_local: bool
primary_color: Any
track: Track
video_thumbnail: VideoThumbnail
class TrackClass(BaseModel):
href: str
items: List[Item]
limit: int
next: Any
offset: int
previous: Any
total: int
class Config:
json_loads = ujson.loads