Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an endpoint for search tracks, albums, playlists, users, etc. #1

Open
3 tasks
JoseRenan opened this issue Apr 17, 2018 · 0 comments
Open
3 tasks
Labels
enhancement New feature or request
Projects

Comments

@JoseRenan
Copy link
Member

JoseRenan commented Apr 17, 2018

Description

On Musicritic, we have a search page where we can search for tracks, albums, artists and playlists. Currently, we are requesting this data directly from the Spotify API endpoint, but in the near future we will need to search the Musicritic users too, and, therefore, the client would have to make 2 requests to different APIs.
This process would be simplified by creating an endpoint that solves both searches at the same time. One of the benefits of implementing this issue is that the user wouldn't have to be logged in or to have connected Musicritic with Spotify to make searches.

In order to do this, it is required to generate a Spotify token for the server that will make the request from Spotify. As for the users, they can be requested from Firebase Admin SDK.

endpoint example:

  • GET: /search?type=artists%20tracks%20users,

where type is a string with the types of things you want to search (one or more of artists, tracks, playlists, users and albums).
To request more than one type, you could separate the types by a single space, similarly to how it is done by the Spotify Web API.

return data example:

{
     "users": [],
     "tracks": [],
     "artists": []
}

Tasks:

  • Retrieve the Spotify Web API token and save it in the memory;
  • Make the requests to search for tracks, albums, artists and playlists (which is currently done) on Spotify;
  • Add the support to search for Musicritic users by username on the Cloud Firestore.
@JoseRenan JoseRenan added enhancement New feature or request good first issue Good for newcomers labels Apr 17, 2018
@JoseRenan JoseRenan added this to To do in Task board Apr 17, 2018
@JoseRenan JoseRenan removed the good first issue Good for newcomers label Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Task board
  
To do
Development

No branches or pull requests

1 participant