Documentation ¶
Index ¶
- Constants
- Variables
- func GetTopItemsByMonth(w http.ResponseWriter, r *http.Request)
- type AddMemberRequest
- type AlbumStatsResponse
- type ArtistStatsResponse
- type Controller
- func (*Controller) AddGuest(w http.ResponseWriter, r *http.Request)
- func (*Controller) AddMember(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateRoom(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CreateUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) CurrentUser(w http.ResponseWriter, r *http.Request)
- func (*Controller) DeleteMember(w http.ResponseWriter, r *http.Request)
- func (*Controller) DeleteRoom(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Devices(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetAlbum(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetAlbumStatsByURI(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetAllHistory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetAllStreamsByURI(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetArtist(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetArtistStatsByURI(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetPlayback(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetPlaylist(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetQueue(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetRoom(w http.ResponseWriter, r *http.Request)
- func (*Controller) GetRoomGuestsAndMembers(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetRoomPermissions(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetSpotifyLoginURL(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetToken(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTopAlbumsByMonth(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTopAlbumsByYear(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTopArtistsByMonth(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTopArtistsByYear(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTopTracksByMonth(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTopTracksByYear(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetTrackStatsByURI(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetUserHostedRooms(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetUserJoinedRooms(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetVersion(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Health(w http.ResponseWriter, r *http.Request)
- func (*Controller) JoinRoomAsMember(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Next(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Pause(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Play(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Previous(w http.ResponseWriter, r *http.Request)
- func (c *Controller) PushToQueue(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SearchByUser(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SearchFromRoom(w http.ResponseWriter, r *http.Request)
- func (*Controller) SetModerator(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SetVolume(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SpotifyAuthRedirect(w http.ResponseWriter, r *http.Request)
- func (c *Controller) SuggestedTracks(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UnlinkSpotify(w http.ResponseWriter, r *http.Request)
- func (*Controller) UpdatePassword(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UploadHistory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserHasSpotifyHistory(w http.ResponseWriter, r *http.Request)
- func (c *Controller) UserPlaylists(w http.ResponseWriter, r *http.Request)
- type CreateUserBody
- type CreateUserResponse
- type GetRoomAuthLevelResponse
- type GetRoomGuestsAndMembersResponse
- type GetRoomsResponse
- type GetSpotifyLoginURLResponse
- type HistoryEntry
- type HistoryEntryArtist
- type HistoryResponse
- type MonthRanking
- type PermissionLevel
- type RequestContext
- type SetModeratorRequest
- type Stream
- type TokenResponse
- type TopAlbumsResponse
- type TopArtistsResponse
- type TopTracksResponse
- type TrackStatsResponse
- type UpdatePasswordRequest
Constants ¶
View Source
const ( DEFAULT_MIN_MS_FILTER = 30000 DEFAULT_LIMIT = 50 )
Variables ¶
View Source
var (
SearchMissingError, _ = json.MarshalIndent(requests.ErrorResponse{
Error: "No search term present",
}, "", " ")
)
View Source
var (
SongIDMissingError, _ = json.MarshalIndent(requests.ErrorResponse{
Error: "No song specified",
}, "", " ")
)
Functions ¶
func GetTopItemsByMonth ¶
func GetTopItemsByMonth(w http.ResponseWriter, r *http.Request)
Types ¶
type AddMemberRequest ¶
type AlbumStatsResponse ¶
type AlbumStatsResponse struct { Album *z_spotify.FullAlbum `json:"album"` Streams []*Stream `json:"streams"` Rankings []MonthRanking `json:"rankings"` }
type ArtistStatsResponse ¶
type ArtistStatsResponse struct { Artist *z_spotify.FullArtist `json:"artist"` Streams []*Stream `json:"streams"` Rankings []MonthRanking `json:"rankings"` }
type Controller ¶
type Controller struct{}
func (*Controller) AddGuest ¶
func (*Controller) AddGuest(w http.ResponseWriter, r *http.Request)
func (*Controller) AddMember ¶
func (*Controller) AddMember(w http.ResponseWriter, r *http.Request)
func (*Controller) CreateRoom ¶
func (c *Controller) CreateRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) CreateUser ¶
func (c *Controller) CreateUser(w http.ResponseWriter, r *http.Request)
func (*Controller) CurrentUser ¶
func (c *Controller) CurrentUser(w http.ResponseWriter, r *http.Request)
func (*Controller) DeleteMember ¶
func (*Controller) DeleteMember(w http.ResponseWriter, r *http.Request)
func (*Controller) DeleteRoom ¶
func (*Controller) DeleteRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) Devices ¶
func (c *Controller) Devices(w http.ResponseWriter, r *http.Request)
func (*Controller) GetAlbum ¶
func (c *Controller) GetAlbum(w http.ResponseWriter, r *http.Request)
func (*Controller) GetAlbumStatsByURI ¶
func (c *Controller) GetAlbumStatsByURI(w http.ResponseWriter, r *http.Request)
func (*Controller) GetAllHistory ¶
func (c *Controller) GetAllHistory(w http.ResponseWriter, r *http.Request)
func (*Controller) GetAllStreamsByURI ¶
func (c *Controller) GetAllStreamsByURI(w http.ResponseWriter, r *http.Request)
func (*Controller) GetArtist ¶
func (c *Controller) GetArtist(w http.ResponseWriter, r *http.Request)
func (*Controller) GetArtistStatsByURI ¶
func (c *Controller) GetArtistStatsByURI(w http.ResponseWriter, r *http.Request)
func (*Controller) GetPlayback ¶
func (c *Controller) GetPlayback(w http.ResponseWriter, r *http.Request)
func (*Controller) GetPlaylist ¶
func (c *Controller) GetPlaylist(w http.ResponseWriter, r *http.Request)
func (*Controller) GetQueue ¶
func (c *Controller) GetQueue(w http.ResponseWriter, r *http.Request)
func (*Controller) GetRoom ¶
func (c *Controller) GetRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) GetRoomGuestsAndMembers ¶
func (*Controller) GetRoomGuestsAndMembers(w http.ResponseWriter, r *http.Request)
func (*Controller) GetRoomPermissions ¶
func (c *Controller) GetRoomPermissions(w http.ResponseWriter, r *http.Request)
func (*Controller) GetSpotifyLoginURL ¶
func (c *Controller) GetSpotifyLoginURL(w http.ResponseWriter, r *http.Request)
func (*Controller) GetToken ¶
func (c *Controller) GetToken(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTopAlbumsByMonth ¶
func (c *Controller) GetTopAlbumsByMonth(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTopAlbumsByYear ¶
func (c *Controller) GetTopAlbumsByYear(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTopArtistsByMonth ¶
func (c *Controller) GetTopArtistsByMonth(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTopArtistsByYear ¶
func (c *Controller) GetTopArtistsByYear(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTopTracksByMonth ¶
func (c *Controller) GetTopTracksByMonth(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTopTracksByYear ¶
func (c *Controller) GetTopTracksByYear(w http.ResponseWriter, r *http.Request)
func (*Controller) GetTrackStatsByURI ¶
func (c *Controller) GetTrackStatsByURI(w http.ResponseWriter, r *http.Request)
func (*Controller) GetUserHostedRooms ¶
func (c *Controller) GetUserHostedRooms(w http.ResponseWriter, r *http.Request)
func (*Controller) GetUserJoinedRooms ¶
func (c *Controller) GetUserJoinedRooms(w http.ResponseWriter, r *http.Request)
func (*Controller) GetVersion ¶
func (c *Controller) GetVersion(w http.ResponseWriter, r *http.Request)
func (*Controller) Health ¶
func (c *Controller) Health(w http.ResponseWriter, r *http.Request)
func (*Controller) JoinRoomAsMember ¶
func (*Controller) JoinRoomAsMember(w http.ResponseWriter, r *http.Request)
func (*Controller) Next ¶
func (c *Controller) Next(w http.ResponseWriter, r *http.Request)
func (*Controller) Pause ¶
func (c *Controller) Pause(w http.ResponseWriter, r *http.Request)
func (*Controller) Play ¶
func (c *Controller) Play(w http.ResponseWriter, r *http.Request)
func (*Controller) Previous ¶
func (c *Controller) Previous(w http.ResponseWriter, r *http.Request)
func (*Controller) PushToQueue ¶
func (c *Controller) PushToQueue(w http.ResponseWriter, r *http.Request)
func (*Controller) SearchByUser ¶
func (c *Controller) SearchByUser(w http.ResponseWriter, r *http.Request)
func (*Controller) SearchFromRoom ¶
func (c *Controller) SearchFromRoom(w http.ResponseWriter, r *http.Request)
func (*Controller) SetModerator ¶
func (*Controller) SetModerator(w http.ResponseWriter, r *http.Request)
func (*Controller) SetVolume ¶
func (c *Controller) SetVolume(w http.ResponseWriter, r *http.Request)
func (*Controller) SpotifyAuthRedirect ¶
func (c *Controller) SpotifyAuthRedirect(w http.ResponseWriter, r *http.Request)
func (*Controller) SuggestedTracks ¶
func (c *Controller) SuggestedTracks(w http.ResponseWriter, r *http.Request)
func (*Controller) UnlinkSpotify ¶
func (c *Controller) UnlinkSpotify(w http.ResponseWriter, r *http.Request)
func (*Controller) UpdatePassword ¶
func (*Controller) UpdatePassword(w http.ResponseWriter, r *http.Request)
func (*Controller) UploadHistory ¶
func (c *Controller) UploadHistory(w http.ResponseWriter, r *http.Request)
func (*Controller) UserHasSpotifyHistory ¶
func (c *Controller) UserHasSpotifyHistory(w http.ResponseWriter, r *http.Request)
func (*Controller) UserPlaylists ¶
func (c *Controller) UserPlaylists(w http.ResponseWriter, r *http.Request)
type CreateUserBody ¶
type CreateUserResponse ¶
type GetRoomsResponse ¶
type GetSpotifyLoginURLResponse ¶
type GetSpotifyLoginURLResponse struct {
URL string `json:"url"`
}
type HistoryEntry ¶
type HistoryEntry struct { Timestamp time.Time `json:"timestamp"` TrackName string `json:"track_name"` AlbumName string `json:"album_name"` MsPlayed int32 `json:"ms_played"` SpotifyTrackUri string `json:"spotify_track_uri"` SpotifyAlbumUri string `json:"spotify_album_uri"` ImageURL string `json:"image_url"` Artists []HistoryEntryArtist `json:"artists"` }
type HistoryEntryArtist ¶
type HistoryResponse ¶
type HistoryResponse struct { History []HistoryEntry `json:"history"` LastFetched *time.Time `json:"last_fetched"` }
type MonthRanking ¶
type PermissionLevel ¶
type PermissionLevel int
const ( IncorrectPassword PermissionLevel = iota NotAuthorized Guest Member Moderator Host )
type RequestContext ¶
type RequestContext struct { Room *room.Room UserID string GuestID string PermissionLevel PermissionLevel }
type SetModeratorRequest ¶
type Stream ¶
type Stream struct { Timestamp time.Time `json:"timestamp"` TrackName string `json:"track_name"` ArtistName string `json:"artist_name"` AlbumName string `json:"album_name"` MsPlayed int `json:"ms_played"` SpotifyTrackUri string `json:"spotify_track_uri"` SpotifyArtistUri string `json:"spotify_artist_uri"` SpotifyAlbumUri string `json:"spotify_album_uri"` }
type TokenResponse ¶
type TopAlbumsResponse ¶
type TopAlbumsResponse struct { Rankings []*history.MonthTopAlbums `json:"rankings"` AlbumData map[string]z_spotify.FullAlbum `json:"album_data"` }
type TopArtistsResponse ¶
type TopArtistsResponse struct { Rankings []*history.MonthTopArtists `json:"rankings"` ArtistData map[string]z_spotify.FullArtist `json:"artist_data"` }
type TopTracksResponse ¶
type TopTracksResponse struct { Rankings []*history.MonthTopTracks `json:"rankings"` TrackData map[string]z_spotify.FullTrack `json:"track_data"` }
type TrackStatsResponse ¶
type TrackStatsResponse struct { Track *z_spotify.FullTrack `json:"track"` Streams []*Stream `json:"streams"` Rankings []MonthRanking `json:"rankings"` }
type UpdatePasswordRequest ¶
type UpdatePasswordRequest struct {
NewPassword string `json:"new_password"`
}
Click to show internal directories.
Click to hide internal directories.