Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Made the basic app which takes fetches the data from the api when the bearer token is active. But the only problem is that I am not able to update the values when the API bearer token is active so I manually copied the data from when the api was active and pasted it as a variable which will be returned from the try and catch block if the try part (fetching from api) fails i.e. when the bearer token expires.
TODO : Make changes so that the data gets automatically updated when the API OAuth token is active.
EDIT : I was unable to integrate the data updation so instead of trying to store data I have decided to fetch the data every time the user clicks on "solution" , but it had its own problem i.e. the Spotify bearer token expires every hour so I had to create a new token every time a user opens the "solution" . I chose to use authorization code flow where I created a "refresh_token" which I used to request a new bearer token from Spotify. It took a while to get the refresh token as everything needs to be copied correctly and even if I miss a single character or space it wont work. Then I used the refresh token every time the page is opened which removed the need to store data. But the only problem with it is that it needs an active internet connection to work. I even added a button which will redirect the user to the playlist in an external browser.
SCREEN RECORDINGS:(Also available in the git repository)
Recording.mp4
Recording.New.Feature.mp4