feature/share-libs
ts 57 lines 1.18 KB
Raw
1 import { AudioFile } from "./audio-file"
2
3 export interface SongResponse {
4 code: number,
5 message: string,
6 name: string,
7 album_name: string,
8 images: ProviderImage[],
9 items: SongProvider[]
10 }
11
12 export interface SongProvider {
13 id: number,
14 name: string,
15 provider_id: string,
16 provider_type: ProviderType,
17 image_url: string | null,
18 audio_file: AudioFile | null
19 }
20
21 enum ProviderType {
22 YOUTUBE = 'youtube',
23 SPOTIFY = 'spotify'
24 }
25
26 export interface ProviderImage {
27 height: number,
28 url: string,
29 width: number
30 }
31
32 // Type definitions for Youtube API v3
33 export interface YoutubeVideo {
34 etag: string,
35 snippet: YoutubeVideoSnippet
36 }
37 export interface YoutubeVideoSnippet {
38 videoId: string,
39 publishedAt: string,
40 channelId: string,
41 title: string,
42 description: string,
43 thumbnails: YoutubeVideoThumbnails,
44 channelTitle: string,
45 liveBroadcastContent: string,
46 publishTime: string
47 }
48 export interface YoutubeVideoThumbnails {
49 default: YoutubeVideoThumbnail,
50 medium: YoutubeVideoThumbnail,
51 high: YoutubeVideoThumbnail
52 }
53 export interface YoutubeVideoThumbnail {
54 url: string,
55 width: number,
56 height: number
57 }