https://github.com/make-school-labs/rails-top-tracks-api
🎧 [BEW 1.3] Day 7: Spotify API Starter Pack
https://github.com/make-school-labs/rails-top-tracks-api
gem rails rails-scaffold ruby ruby-on-rails spotify-web-api starter-kit
Last synced: 11 months ago
JSON representation
🎧 [BEW 1.3] Day 7: Spotify API Starter Pack
- Host: GitHub
- URL: https://github.com/make-school-labs/rails-top-tracks-api
- Owner: Make-School-Labs
- License: mit
- Created: 2018-11-08T20:09:27.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T09:44:06.000Z (over 3 years ago)
- Last Synced: 2024-04-14T10:07:38.189Z (about 2 years ago)
- Topics: gem, rails, rails-scaffold, ruby, ruby-on-rails, spotify-web-api, starter-kit
- Language: Ruby
- Homepage:
- Size: 28.6 MB
- Stars: 0
- Watchers: 1
- Forks: 9
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🛤️ rails-top-tracks-api
**Today's deliverable is a link to your GitHub repository with at least one fully implemented `GET` and `POST` action in `app/controllers/top_tracks_controller.rb`.**
## Getting Started: Step by Step
1. Fork this GitHub Repo.
1. Clone your new fork locally and navigate to it in your shell.
1. Run `rails db:migrate` to apply initial migrations.
1. Run `rails server` and navigate to the [http://localhost:3000/top_tracks][http://localhost:3000/top_tracks] page.
1. Click the `Sign in with Spotify` button to authenticate with OAuth.
1. Open `app/controllers/top_tracks_controller.rb`. All changes should be made in this file!
1. [Review the `rspotify` documentation](https://www.rubydoc.info/github/guilhermesad/rspotify/master) and consider how you would fill in the actions in your controller. For example, can you create an action that would find information about a certain track?
1. Create the API! It can return either a JSON response, or a Rails view containing the data.
1. Add, commit, and push your changeset to GitHub.
1. If you finish early, add more features! Example stretch challenge: can you create an action that returns recommendations based on the already provided track data?
## Important Notes
* You must run this locally and serve the website over port `3000` to ensure access to the Spotify Web API.
## Additional Resources
* [DigitalOcean: How To Use Array Methods in Ruby](https://www.digitalocean.com/community/tutorials/how-to-use-array-methods-in-ruby)
* [rspotify Documentation](https://www.rubydoc.info/github/guilhermesad/rspotify/master)