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

Feature Request: Add IDs Endpoint #15

Open
obrhoff opened this issue Jan 16, 2021 · 4 comments
Open

Feature Request: Add IDs Endpoint #15

obrhoff opened this issue Jan 16, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@obrhoff
Copy link

obrhoff commented Jan 16, 2021

Feature Request: Add ID's Endpoint

Currently it's not possible to fetch only the Ids of the followers/favorites etc. That makes it really ressource intensive to figure out, which tracks the user has a relationship since we need to page through a lot of data. (the details of the tracks or users are not needed here).

API-v2 is providing this functionality. It would be to see this in the API.

Endpoint(s):

  • GET /users/{id}/followings/ids
  • GET /users/{id}/followers/ids
  • GET /users/{id}/favorites/ids
  • GET /users/{id}/reposts/ids
@rahul-sc
Copy link
Contributor

Hey @DocterD What do you mean by "..which tracks has a relationship.."? What is your actual use case here?

Also, have you checked out the updated API spec here?
https://developers.soundcloud.com/docs/api/explorer/open-api

There's already functionality supporting the retrieval of paginated collection of likes, follows, reposts etc

@rahul-sc rahul-sc added the question Further information is requested label Jan 18, 2021
@obrhoff
Copy link
Author

obrhoff commented Jan 18, 2021

Imagine you got a stream of Tracks and you want to figure out which one are already liked or reposted. Performance wise it makes sense to just retrieve and store the ID's of the favorited/reposted tracks and match these against incoming tracks.

Right now you need to page through the Liked/Reposts endpoint which is quite heavy since we speak about potentially hundreds or thousands of liked tracks.

@rahul-sc
Copy link
Contributor

Thanks for the additional context @DocterD

I suppose the alternative here would be that the server could do that for you and represent the relationship of that entity back to the authenticated user, no? For example, the track response already has "user_favorite": true to indicate if the user liked the track.

@obrhoff
Copy link
Author

obrhoff commented Jan 19, 2021

That might work.

It should be added for the additional states (reposted/following/follower). For consistency It would make sense to move to user_liked instead of user_favorite. It confused me that sometimes the favorite and sometime liked term is used for the same thing.

@rahul-sc rahul-sc added enhancement New feature or request and removed question Further information is requested labels Jan 25, 2021
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
None yet
Development

No branches or pull requests

2 participants