You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
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:
Tasks:
The text was updated successfully, but these errors were encountered: