示例#1
0
def current_user_top_tracks():
    '''
        Get the current user's top tracks
    '''
    try:
        return endpoint_response(User.current_user_top_tracks())
    except Exception as e:
        return error_endpoint_response(e)
示例#2
0
def current_user_playlists():
    '''
        Get current user playlists without getting their profile parameters
    '''
    try:
        return endpoint_response(User.current_user_playlists())
    except Exception as e:
        return error_endpoint_response(e)
示例#3
0
def create_user_playlist_with_tracks():
    '''
        Creates a playlist with the given tracks
    '''
    try:
        return endpoint_response(Playlist.create_user_playlist_with_tracks())
    except Exception as e:
        return error_endpoint_response(e)
示例#4
0
def get_track_data():
    '''
        Get audio features for one or multiple tracks based on their Spotify IDs
    '''
    try:
        return endpoint_response(Track.get_track_data())
    except Exception as e:
        return error_endpoint_response(e)
示例#5
0
def user_playlist_follow_playlist():
    '''
        Add the current authenticated user as a follower of a playlist
    '''
    try:
        return endpoint_response(Playlist.user_playlist_follow_playlist())
    except Exception as e:
        return error_endpoint_response(e)
示例#6
0
def get_tracks_from_attributes():
    '''
        Gets track URIs for tracks that match the attributes
    '''
    try:
        return endpoint_response(Playlist.get_tracks_from_attributes())
    except Exception as e:
        return error_endpoint_response(e)
示例#7
0
def user_playlist_unfollow():
    '''
        Unfollows a playlist for a user
    '''
    try:
        return endpoint_response(Playlist.user_playlist_unfollow())
    except Exception as e:
        return error_endpoint_response(e)
示例#8
0
def add_tracks_to_playlist():
    '''
        Adds a track to an existing playlist
    '''
    try:
        return endpoint_response(Playlist.add_tracks_to_playlist())
    except Exception as e:
        return error_endpoint_response(e)
示例#9
0
def playlist_statistics():
    '''
        Get full details of the tracks of a playlist owned by a user
    '''
    try:
        return endpoint_response(Playlist.playlist_statistics())
    except Exception as e:
        return error_endpoint_response(e)
示例#10
0
def playlist_details():
    '''
        Get playlist details of a user
    '''
    try:
        return endpoint_response(Playlist.playlist_details())
    except Exception as e:
        return error_endpoint_response(e)
示例#11
0
def user_personal_playlists():
    '''
        Get current user playlists without requred getting their profile
    '''
    try:
        return endpoint_response(Playlist.user_personal_playlists())
    except Exception as e:
        return error_endpoint_response(e)
示例#12
0
def user_profile_data():
    '''
        Get details profile information about the current user. If this is the user's first
        time logging onto our system, create a User entry with their spotify ID
    '''
    try:
        return endpoint_response(User.user_profile_data())
    except Exception as e:
        return error_endpoint_response(e)