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

Devices API #36

Merged
merged 10 commits into from
Apr 21, 2020
Merged

Devices API #36

merged 10 commits into from
Apr 21, 2020

Conversation

hayribakici
Copy link
Collaborator

@hayribakici hayribakici commented Mar 30, 2020

This PR allows users to get a list of available devices.

In order to properly test the API I extended the example.dart file to allow access user specific data with Spotify's authorization code flow. This is done quite primitively by requesting the user to call an url and paste the redirect url back to the terminal. Currenly only currentlyPlaying() and devices() are called.

The devices() method now properly propagates an error object when the request fails.
Also, each time this file gets run with pub run the authorization code flow needs to be redone. I am not sure if that is a security issue when running this file many times.

Thank you for @LeviHassel and @roisnir for the solutions and help.

- adds new Device class for storing user's visible devices information
@hayribakici hayribakici changed the title Devices API [don't merge] Devices API Mar 30, 2020
@hayribakici
Copy link
Collaborator Author

hayribakici commented Mar 30, 2020

@rinukkusu please don't merge, yet until tests are through. See #37. Thank you.

@hayribakici hayribakici mentioned this pull request Apr 4, 2020
- Example uses Spotifiy's Authorization Code flow to access user specific data
- Only calling currentlyPlaying and available devices Api
- Authorization code flow is done quite primitively by requesting user
to call url and past the redirect url back to the terminal
- allows to properly propagate error object when request fails
@hayribakici hayribakici changed the title [don't merge] Devices API Devices API Apr 6, 2020
example/example.dart Outdated Show resolved Hide resolved
@rinukkusu
Copy link
Owner

LGTM

@rinukkusu rinukkusu merged commit f6670ae into rinukkusu:master Apr 21, 2020
@hayribakici hayribakici deleted the spotify_devices branch April 21, 2020 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants