cjam / react-native-spotify-remote

React Native wrapper around the Spotify Remote SDK
MIT License
257 stars 101 forks source link

expose a sendRequest function #21

Open lucasgismondi opened 4 years ago

lucasgismondi commented 4 years ago

First off thank you for making this!

Not sure if this is part of your upcoming roadmap but would it be possible to expose a function that would allow us to search for tracks, get specific tracks, get specific albums etc etc? (Similar to lufinkey's react-native-spotify library)

As a quick fix we could manually put in the endpoint we need instead of having to create separate functions for each endpoint within the library. Just something to help create a request would be a nice addition to this library.

cjam commented 4 years ago

this is a nice idea.

I feel like the ideal scenario would be that one of those web api libraries could be used from within React Native. Not sure what that would involve, but I suspect that this libraries token could be used for making web requests.

But a simple sendRequest where you need to provide endpoints etc could be added for sure. As far as the roadmap goes, I'm currently working on getting the library to SDK 1.2 and making the example application into a "kitchen sink" of the functionality so that it's easier to test and develop new features.

lucasgismondi commented 4 years ago

Ah you're right! Forgot I could use the token myself. Thanks

kuabhish commented 3 years ago

Hey @lucasgismondi @cjam

Can you please explain how to write the search? Because I want to implement that.

I am very new to this.

But I want to know what URL (maybe something like this: https://api.spotify.com/v1/search) to call how to pass the string and get a playable URI in return.

kuabhish commented 3 years ago

Hey, I was looking for search so I found these spotipy search code and Spotify Search Page.

cjam commented 3 years ago

@kuabhish you should be able to use the item Uri to play items using this library. If you're having problems. Provide some code that you have and perhaps someone can help you. If we can't see what you're trying to do it's hard to help.