mediahelpers

package module
Version: v1.0.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchSpotifyAuthToken

func FetchSpotifyAuthToken(firestoreClient firestore.Client) (*firebase.FirestoreSpotifyAuthToken, error)

FetchSpotifyAuthToken takes in a firestoreClient and returns a SpotifyAuthToken

func GetMediaFromFirestore

func GetMediaFromFirestore(firestoreClient firestore.Client, mediaProvider string, mediaID string) (*firebase.FirestoreMedia, error)

GetMediaFromFirestore takes in a firestoreClient, mediaProvider and the mediaId and checks to see if the media exists

Types

type SpotifyAlbumData

type SpotifyAlbumData struct {
	ID           string                  `json:"id"`
	Name         string                  `json:"name"`
	Type         string                  `json:"type"`
	Artists      []SpotifyArtistData     `json:"artists"`
	Images       []firebase.SpotifyImage `json:"images"`
	ExternalURLs struct {
		Spotify string `json:"spotify"`
	} `json:"external_urls"`
}

SpotifyAlbumData includes the response from an album in Spotify

type SpotifyArtistData

type SpotifyArtistData struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Type         string `json:"type"`
	ExternalURLs struct {
		Spotify string `json:"spotify"`
	} `json:"external_urls"`
}

SpotifyArtistData includes the response from an artist in Spotify

type SpotifyTrackData

type SpotifyTrackData struct {
	ID           string              `json:"id"`
	Name         string              `json:"name"`
	Artists      []SpotifyArtistData `json:"artists"`
	Type         string              `json:"type"`
	Album        SpotifyAlbumData    `json:"album"`
	ExternalURLs struct {
		Spotify string `json:"spotify"`
	} `json:"external_urls"`
}

SpotifyTrackData includes the reponse from a track in Spotify

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL