IEEE-VIT / playtify

Playtify is a flutter app that recommends a playlist based on your mood!
MIT License
11 stars 16 forks source link

Implement SpotifyAPI Playlist Retrieval based on Category #23

Closed RitwikSingh28 closed 10 months ago

RitwikSingh28 commented 10 months ago

Resolve #12

Problem Statement

This PR addresses the integration of the SpotifyAPI into the Playtify app, enabling the retrieval of playlists from specific categories, such as "Pop," "Rock," or "Chill." This integration enhances the app's functionality by granting access to and displaying Spotify playlists within the selected category.

Changes Made

Approach

Important Note

RitwikSingh28 commented 10 months ago

@dk-a-dev Please review the PR, and let me know if anything needs to be cleared up or modified.

Thank you!

dk-a-dev commented 10 months ago

@RitwikSingh28 Since I need to test the app, can u add my Gmail as a contributor or a user to the Spotify dev portal for this project, no need to transfer ownership for now, just give me access so that I can generate the client ID and token to review app image

RitwikSingh28 commented 10 months ago

Sure @dk-a-dev Please provide me your email address and I will add you as a user too.

Although please keep in mind that I have written the logic for the backend, and have not integrated it with the application. In case you want me to provide snapshots of the results of the function calls, I can add them to the PR description.

dk-a-dev commented 10 months ago

Have u added any way a user can authenticate

Sure @dk-a-dev Please provide me your email address and I will add you as a user too.

Although please keep in mind that I have written the logic for the backend, and have not integrated it with the application. In case you want me to provide snapshots of the results of the function calls, I can add them to the PR description.

yup here it is dev.keshwani345@gmail.com yup plz add snapshots, once I review the backend I will create an issue to make the auth screen and also integrate existing functions with frontend of app

RitwikSingh28 commented 10 months ago

The Spotify API Authorization will take care of the login aspect from Spotify account. I will add unit tests in the subsequent commits to this PR, so that you may see the tests yourself.

Since I am travelling, I will be able to update it by tomorrow evening.

RitwikSingh28 commented 10 months ago

@dk-a-dev It seems that User Management feature of the Spotify SDK will allow you to only add users that can authenticate directly. It won't add other people as collaborators for the project.

Since I have created the project using my own spotify-account, let me provide you the steps that will let you have your own API keys.

Steps

  1. Create a Web API Project, and add Project Name and Project Description
  2. Go to Settings
  3. There you will find your CLIENT_ID and CLIENT_SECRET which you will need to store in .env file, and using flutter_dotenv package, access it in your code base
  4. Scroll to the bottom of Basic Information tab, and click on Edit
  5. Add the following Redirect URI: com.example.playtify://
  6. In Android Packages, add the Package Name: com.example.playtify and fill in the SHA1 fingerprint signature of the app
  7. Click on Save, and you're done

I am adding the Unit Tests in the meanwhile, and will push them in the subsequent commits. I urge you to follow the above steps and try to work it out. In case you feel stuck, please reach out to me.

dk-a-dev commented 10 months ago

@shubhbansal9 can u please review this one I am having some trouble with my build gradle, so I am unable to get SHA-1 retrieve the fingerprint