Documentation
¶
Index ¶
- Variables
- func Analytics(startDate, endDate, endpoint string) (interface{}, error)
- func GetDataAPI(startDate, endDate, endpoint string) ([]byte, error)
- func GetSpotifyAccessToken() string
- func SpotifyStreams(startDate, endDate string)
- func TimeAnalytics(startDate, endDate string, endpoints []string) (map[string][]data.DailyAnalytics, error)
- type DetailedStreamsData
- type ListenersData
- type ResponseData
Constants ¶
This section is empty.
Variables ¶
View Source
var SpotifyDetailedStreams struct { SpotifyStreamsElement []struct { Date string `json:"date"` Starts int `json:"starts"` Streams int `json:"streams"` } `json:"detailedStreams"` }
SPOTIFY json types ========================
View Source
var SpotifyListeners struct { SpotifyListenersElement []struct { Date string `json:"date"` Count int `json:"streams"` } `json:"counts"` }
Functions ¶
func GetDataAPI ¶
func GetDataAPI (startDate, endDate, endpoint string) (map[string]interface{}, error) {
func GetSpotifyAccessToken ¶
func GetSpotifyAccessToken() string
func SpotifyStreams ¶
func SpotifyStreams(startDate, endDate string)
func TimeAnalytics ¶
Types ¶
type DetailedStreamsData ¶
type DetailedStreamsData struct {
Date string `json:"date"`
Starts int `json:"starts"`
Streams int `json:"streams"`
}
Data structure for detailedStreams endpoint
type ListenersData ¶
Data structure for listeners endpoint
type ResponseData ¶
type ResponseData struct {
Counts []ListenersData `json:"counts"`
DetailedStreams []DetailedStreamsData `json:"detailedStreams"`
}
Define a struct to match the API response format
Click to show internal directories.
Click to hide internal directories.