Exemplo n.º 1
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            // get a track
            var output = await SpotifyWebAPI.Track.GetTrack("0eGsygTp906u18L0Oimnem");

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 2
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            // get search for alter bridge albums
            var output = await SpotifyWebAPI.Album.Search("Blackbird", "Alter Bridge");

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 3
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            // get alter bridge's blackbird album
            var output = await SpotifyWebAPI.Album.GetAlbum("0Fk4lWAADmFMmuW6jp6xyE");

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 4
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            // get alter bridge
            var output = await SpotifyWebAPI.Artist.GetArtist("4DWX7u8BV0vZIQSpJQQDWU");

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 5
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected async void userGetCurrentUserProfile_Click(object sender, EventArgs e)
        {
            // get the user you just logged in with
            SpotifyWebAPI.User user = await SpotifyWebAPI.User.GetCurrentUserProfile(this.AuthenticationToken);

            output.Text = VarDump.Dump(user, 0);
        }
Exemplo n.º 6
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected async void userGetUser_Click(object sender, EventArgs e)
        {
            // get my profile, returns a basic profile
            SpotifyWebAPI.User user = await SpotifyWebAPI.User.GetUser("tinyioda");

            output.Text = VarDump.Dump(user, 0);
        }
Exemplo n.º 7
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            List <string> artists = new List <string>();

            artists.Add("4DWX7u8BV0vZIQSpJQQDWU"); // alter bridge

            var output = await SpotifyWebAPI.Artist.GetArtists(artists);

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 8
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected async void userCreatePlaylist_Click(object sender, EventArgs e)
        {
            // get the user
            SpotifyWebAPI.User user = await SpotifyWebAPI.User.GetCurrentUserProfile(this.AuthenticationToken);

            // create the playlist, this method also returns the playlist
            var newPlaylist = await SpotifyWebAPI.Playlist.CreatePlaylist(user.Id, "test", true, this.AuthenticationToken);

            output.Text = VarDump.Dump(newPlaylist, 0);
        }
Exemplo n.º 9
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected async void userGetPlaylists_Click(object sender, EventArgs e)
        {
            // get the user you just logged in with
            SpotifyWebAPI.User user = await SpotifyWebAPI.User.GetCurrentUserProfile(this.AuthenticationToken);

            // get this persons playlists
            SpotifyWebAPI.Page <Playlist> playlists = await user.GetPlaylists(this.AuthenticationToken);

            output.Text = VarDump.Dump(playlists, 0);
        }
Exemplo n.º 10
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            List <string> tracks = new List <string>();

            tracks.Add("0eGsygTp906u18L0Oimnem");
            tracks.Add("1lDWb6b6ieDQ2xT7ewTC3G");

            // get a track
            var output = await SpotifyWebAPI.Track.GetTracks(tracks);

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 11
0
        protected async void Page_Load(object sender, EventArgs e)
        {
            var albums = new List <string>();

            albums.Add("0Fk4lWAADmFMmuW6jp6xyE"); // blackbird
            albums.Add("14XXkmq6rjlKTxRkelMtZx"); // fortress
            albums.Add("0ocWLhnTiUKSq8Ksa3FX4Z"); // AB III

            var output = await SpotifyWebAPI.Album.GetAlbums(albums);

            ((Literal)this.Master.FindControl("output")).Text = VarDump.Dump(output, 0);
        }
Exemplo n.º 12
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected async void userGetPlaylist_Click(object sender, EventArgs e)
        {
            // get the user you just logged in with
            SpotifyWebAPI.User user = await SpotifyWebAPI.User.GetCurrentUserProfile(this.AuthenticationToken);

            // get all the playlists
            SpotifyWebAPI.Page <Playlist> playlists = await user.GetPlaylists(this.AuthenticationToken);

            // get the first playlist in the list
            // yes i know this is redundant but i am testing the method GetPlaylist()
            SpotifyWebAPI.Playlist playlist = await SpotifyWebAPI.Playlist.GetPlaylist(user, playlists.Items.FirstOrDefault().Id, this.AuthenticationToken);

            output.Text += VarDump.Dump(playlist, 0);

            // get the tracks
            // not by using GetPlaylist() in the previous command you already get the tracks, i'm just doing more testing here.
            SpotifyWebAPI.Page <PlaylistTrack> tracks = await playlist.GetPlaylistTracks(this.AuthenticationToken);

            output.Text += VarDump.Dump(tracks, 0);
        }