Documentation
¶
Index ¶
Constants ¶
View Source
const IMVDB_API_HOST = "https://imvdb.com/api/v1"
View Source
const SONG_BPM_API = "https://api.getsongbpm.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExternalAPI ¶
type ExternalAPI struct { Spotify *spotify.Client Imvdb *resty.Client SongBPM *resty.Client Firestore *firestore.Client YouTube *youtube.Client }
func InitializeSources ¶
func InitializeSources() ExternalAPI
func (*ExternalAPI) FindTrack ¶
func (api *ExternalAPI) FindTrack(ctx *gin.Context, artist string, title string) SongFlongTrack
func (*ExternalAPI) GetTrack ¶
func (api *ExternalAPI) GetTrack(ctx *gin.Context, id spotify.ID) (SongFlongTrack, error)
Gets the SongFlongTrack for the given Spotify ID
type MusicVideoID ¶
type MusicVideoID = int // ID used by IMVDB
type SongFlongTrack ¶
type SongFlongTrack struct { Track Tempo int `json:"tempo"` ExternalIDs map[string]string `json:"external_ids"` }
func (*SongFlongTrack) GetYouTubeID ¶
func (track *SongFlongTrack) GetYouTubeID() string
type SourceData ¶
type Track ¶
type Track struct { Artists []Artist `json:"artists"` ID spotify.ID `json:"id"` Name string `json:"name"` Album Album `json:"album"` }
func MapToTrack ¶
type VideoSearchResults ¶
type VideoSearchResults struct { Results []struct { Id int `json:"id"` } `json:"results"` }
Click to show internal directories.
Click to hide internal directories.