"So I was thinking about names for my new tea shop… how about… the Jasmine Dragon? It’s dramatic, poetic… has a nice ring to it." --Uncle Iroh, "Avatar: The Last Airbender"
A REST API webservice built to facilitate subscriptions to a tea-delivery service. Tea information is provided to the mock-front end via consumption of an external API found here
This project is a technical challenge presented by the Turing School of Software and Design. Original specs and requirements may be found here
At a minimum, the following functionality must be built:
- An endpoint to subscribe a customer to a tea subscription
- An endpoint to cancel a customer’s tea subscription
- An endpoint to see all of a customer’s subsciptions (active and cancelled)
Additional Endpoints Created:
- GET All teas.
- GET A single tea.
- PATCH Update a users' subscription frequency or status.
- DELETE Delete a subscription.
Additional Functionality implimented:
- Consumed external API for tea data, seralized and exposed two endpoints for said data.
- Created dynamic pricing for subscriptions based on frequency.
- Prepped to handle User data storage via Bcrypt encryption.
Click here to see the documentation related to this API, including example request and response payloads.
- Fork and Clone the repo
- Install gem packages:
$ bundle install
- Setup the database:
$ rails db:{drop,create,migrate,seed}
- Run
$ bundle exec rspec
to run the full test suite. note If there is an error when running the test suite related toVCR Cassettes
, navigate to thespec
directory and delete thefixtures
directory found within. This should alleviate any issues related to theVCR
API mock-calls. - Open a server with
$ rails s
- Ruby 2.7.2
- Rails 5.2.5
- Ruby
- OOP
- TDD
- MVC
- REST