Ringobot / SpotifyApi.NetCore

Lightweight .NET Core wrapper for the Spotify Web API
MIT License
37 stars 16 forks source link

Very much need the /me endpoint covered for at minimum the alphanumeric UserName #26

Closed akshays2112 closed 4 years ago

akshays2112 commented 4 years ago

Hi,

Right now since I cannot automatically get the UserName which is a complex string of alphanumerics I have to go to Spotify Account and copy-paste it for the code to use to list the playlists and tracks inside each playlist.

Desperately need the User Profile for a minimum of the UserName so do not need this manually supplied.

Thanks for your patience and time.

Best Regards,

Akshay Srinivasan

DanielLarsenNZ commented 4 years ago

Hey @akshays2112 - give me a couple of days to get this into a release.

akshays2112 commented 4 years ago

Thanks a lot @DanielLarsenNZ !! I know its very hard work ♥♥

DanielLarsenNZ commented 4 years ago

Hey @akshays2112 this is release in 3.2.0. The username is in property User.Id. Let me know how you get on :)

Install-Package SpotifyApi.NetCore -Version 3.2.0
akshays2112 commented 4 years ago

Will work on it immediately. Thanks for the heads up got in my Outlook email just now.

akshays2112 commented 4 years ago

Hi Daniel Larsen,

First step passed. Upgraded the package and existing code works fine. Connecting to Spotify Authentication to display list of playlists+songs.

Working on code now to automate User.Id and remove the hardcoded Spotify alphanumeric Username value.

Will keep you posted as soon as I am done.

Thanks a lot for this.

Thanks for your patience and time.

Best Regards,

Akshay Srinivasan

akshays2112 commented 4 years ago

Hi Daniel Larsen,

Swapped in the new UsersProfileApi singleton service and hardcoded Spotify Username removed and User.Id swapped in. Worked first time smooth as a charm.

Amazing job. Very very easy to use your API once I understood it. This was my first time using a Cloud Authentication/Authorization service and Web API.

Thanks a lot @DanielLarsenNZ . Looking forward to the rest of the Web API to be covered when you get the time. Meantime I am going to try and understand your code and try and give a helping hand. Will learn something new I am sure even if I don't succeed fully.

Thanks for your time and patience.

Best Regards,

Akshay Srinivasan

DanielLarsenNZ commented 4 years ago

Nice work @akshays2112 ! 😀

akshays2112 commented 4 years ago

Hi Daniel Larsen,

I just got some time to look into how your code works. Nice code by the way. I figured it out quickly and added another endpoint. I want you to check my code and give me some guidance as to if I have done everything ok. I have tested my code out and it works in my main Spotify Blazor Server-side App project.

https://github.com/akshays2112/SpotifyApi.NetCore/blob/master/src/SpotifyApi.NetCore/FollowApi.cs

Thanks for your patience and time.

Best Regards,

Akshay Srinivasan

DanielLarsenNZ commented 4 years ago

Hey @akshays2112, this is great! 😃 There is a new way of constructing the URI which uses a UriBuilder object and a bunch of helpers I wrote in UriBuilderExtensions including AppendToQueryAsCsv which you should use instead of your internal helper.

There is a good example of this usage here: https://github.com/Ringobot/SpotifyApi.NetCore/blob/master/src/SpotifyApi.NetCore/BrowseApi.cs#L403

Please open a Pull Request for your code so that I can comment on your changes. I won't merge the PR until we are both happy with the code 😊

akshays2112 commented 4 years ago

Hey Daniel,

Thank you so much for the quick reply. I will work on figuring this out. I am new to this part of GitHub. I have never done pull requests etc. or contributed to any other repositor before. Will work on it as soon as possible.

Thanks for your patience and time.

Best Regards,

Akshay Srinivasan

From: Daniel Larsen notifications@github.com Sent: Tuesday, June 23, 2020 9:04 PM To: Ringobot/SpotifyApi.NetCore SpotifyApi.NetCore@noreply.github.com Cc: Akshay Srinivasan akshays2112@gmail.com; Mention mention@noreply.github.com Subject: Re: [Ringobot/SpotifyApi.NetCore] Very much need the /me endpoint covered for at minimum the alphanumeric UserName (#26)

Hey @akshays2112 https://github.com/akshays2112 , this is great! 😃 There is a new way of constructing the URI which uses a UriBuilder object and a bunch of helpers I wrote in UriBuilderExtensions including AppendToQueryAsCsv which you should use instead of your internal helper.

There is a good example of this usage here: https://github.com/Ringobot/SpotifyApi.NetCore/blob/master/src/SpotifyApi.NetCore/BrowseApi.cs#L403

Please open a Pull Request for your code so that I can comment on your changes. I won't merge the PR until we are both happy with the code 😊

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ringobot/SpotifyApi.NetCore/issues/26#issuecomment-648241325 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRJIGQZK27NW7FSP6A5Q2LRYDDMXANCNFSM4N4IKQ5A . https://github.com/notifications/beacon/AIRJIGRMJLX2LD3U7GLFJQDRYDDMXA5CNFSM4N4IKQ5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE2RWBLI.gif

akshays2112 commented 4 years ago

Hi Daniel,

Ok my friend the deed is done. Pull request created. Hope I did it right. Now looking into making changes as you told me to.

Thanks for your patience and time.

Best Regards,

Akshay Srinivasan

From: Daniel Larsen notifications@github.com Sent: Tuesday, June 23, 2020 9:04 PM To: Ringobot/SpotifyApi.NetCore SpotifyApi.NetCore@noreply.github.com Cc: Akshay Srinivasan akshays2112@gmail.com; Mention mention@noreply.github.com Subject: Re: [Ringobot/SpotifyApi.NetCore] Very much need the /me endpoint covered for at minimum the alphanumeric UserName (#26)

Hey @akshays2112 https://github.com/akshays2112 , this is great! 😃 There is a new way of constructing the URI which uses a UriBuilder object and a bunch of helpers I wrote in UriBuilderExtensions including AppendToQueryAsCsv which you should use instead of your internal helper.

There is a good example of this usage here: https://github.com/Ringobot/SpotifyApi.NetCore/blob/master/src/SpotifyApi.NetCore/BrowseApi.cs#L403

Please open a Pull Request for your code so that I can comment on your changes. I won't merge the PR until we are both happy with the code 😊

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ringobot/SpotifyApi.NetCore/issues/26#issuecomment-648241325 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRJIGQZK27NW7FSP6A5Q2LRYDDMXANCNFSM4N4IKQ5A . https://github.com/notifications/beacon/AIRJIGRMJLX2LD3U7GLFJQDRYDDMXA5CNFSM4N4IKQ5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE2RWBLI.gif

akshays2112 commented 4 years ago

Hi Daniel,

Ok the change is done. It is using UriBuilder. I have created a new pull request.

Thanks for your patience and time.

Best Regards,

Akshay Srinivasan

From: Daniel Larsen notifications@github.com Sent: Tuesday, June 23, 2020 9:04 PM To: Ringobot/SpotifyApi.NetCore SpotifyApi.NetCore@noreply.github.com Cc: Akshay Srinivasan akshays2112@gmail.com; Mention mention@noreply.github.com Subject: Re: [Ringobot/SpotifyApi.NetCore] Very much need the /me endpoint covered for at minimum the alphanumeric UserName (#26)

Hey @akshays2112 https://github.com/akshays2112 , this is great! 😃 There is a new way of constructing the URI which uses a UriBuilder object and a bunch of helpers I wrote in UriBuilderExtensions including AppendToQueryAsCsv which you should use instead of your internal helper.

There is a good example of this usage here: https://github.com/Ringobot/SpotifyApi.NetCore/blob/master/src/SpotifyApi.NetCore/BrowseApi.cs#L403

Please open a Pull Request for your code so that I can comment on your changes. I won't merge the PR until we are both happy with the code 😊

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Ringobot/SpotifyApi.NetCore/issues/26#issuecomment-648241325 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRJIGQZK27NW7FSP6A5Q2LRYDDMXANCNFSM4N4IKQ5A . https://github.com/notifications/beacon/AIRJIGRMJLX2LD3U7GLFJQDRYDDMXA5CNFSM4N4IKQ5KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOE2RWBLI.gif