Skip to content

denverdevelopments/tea_me_api

Repository files navigation



Tea Me. Uniting teas and me.

Issues Stargazers Forks Build Badge


Contributors

Kevin Nguyen | |

Table of Contents

Links
Tools Used
Setup
Database Schema
Wireframes

Tools Used

Develop / Test Development Testing Deployment

Setup

This project requires Ruby 2.7.2.

  • Fork this repository
  • From the command line, install gems and set up your DB:
    • bundle install && bundle update
    • rails db:{create,migrate,seed}
  • Run the test suite with bundle exec rspec -fd
  • Run your development server with rails s to see the app in action.

Project Configurations

  • Ruby version

    $ ruby -v
    ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
  • System dependencies

    $ rails -v
    Rails 5.2.6
  • Database creation

    $ rails db:{drop,create,migrate,seed}
    Created database 'back-end_development'
    Created database 'back-end_test'
    $ bundle install
  • How to run the test suite

    $ bundle exec rspec -fd
  • Local Deployment, for testing

    $ rails s
    => Booting Puma
    => Rails 5.2.6 application starting in development
    => Run `rails server -h` for more startup options
    Puma starting in single mode...
    * Version 3.12.6 (ruby 2.7.2-p137)
    * Min threads: 5, max threads: 5
    * Environment: development
    * Listening on tcp://localhost:3000
    Use Ctrl-C to stop

Database Schema.v1

API Endpoints

The following section displays the api endpoints.

Teas

  • GET /api/v1/teas

Get the list of all teas in the app

Customers

  • GET /api/v1/customers

Get the list of all customers in the db

  • GET /api/v1/customers/:id

Get a customer details by id -- PATH PARAMETERS - :id (integer) REQUIRED

  • GET /api/v1/customers/:id/subscriptions

Get the list of all subscriptions of a customer -- PATH PARAMETERS - :id (integer) REQUIRED

Subscriptions

  • POST /api/v1/customers/:customer_id/subscriptions

Create a subscription -- PATH PARAMETERS - :customer_id (integer) REQUIRED

  • PATCH /api/v1/customers/:customer_id/subscriptions/:id

Update a section of a subscriptions details by customer id -- PATH PARAMETERS - :customer_id (integer) REQUIRED

  • PUT /api/v1/customers/:customer_id/subscriptions/:id

Update a subscriptions details by id -- PATH PARAMETERS - :customer_id (integer) REQUIRED

  • DELETE /api/v1/customers/:customer_id/subscriptions/:id

Remove a subscription by id -- PATH PARAMETERS - :customer_id (integer) & :id (integer) REQUIRED

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published