Giter Club home page Giter Club logo

tea_time's Introduction

README

Tea Time

Tea Time is an API built with Ruby on Rails. It is the final project in Mod 4 of Turing School. It is a take home challenge for interview practice and is to be completed in 5-8 hours. This app follows RESTful API conventions.

Learning Goals

The learning goals of this project were to

  • show a strong understanding of rails
  • ability to create restful routes
  • demonstration of well organized code that follows OOP
  • TDD
  • clear documentation

Setup

  1. fork and clone repo
  2. install gem packages bundle install
  3. run rails db:{create,migrate,seed}
  4. check schema

![Alt text](schema.jpg) ## Endpoints ``` - POST 'api/v1/customer_subscriptions?customer_id=1&subscription_id=1' - PATCH 'api/v1/customer_subscriptions?customer_id=1&subscription_id=1' - GET 'api/v1/customers?id=1' ``` ## JSON Responses (in order of the endpoints) ### POST Status 200: ``` { "message": "Subscription created" } ``` Status 400: ``` { "message": "Subscription already active" } ``` Status 400: ``` { "message": "Subscription not created" } ``` ### GET Status 200: ``` { "data": { "id": "1", "type": "customer", "attributes": { "name": "Barry Whyte", "email": "[email protected]", "password": "test123", "active_subscriptions": [ { "id": 1, "title": "Crack", "price": 10.99, "frequency": 1 }, { "id": 3, "title": "English", "price": 30.99, "frequency": 3 } ], "inactive_subscriptions": [ { "id": 2, "title": "Chill", "price": 20.99, "frequency": 2 } ] } } } ``` Status 400: ``` { "error": "Customer not found" } ``` ### Versions - Ruby 3.2.2 - Rails 7.0.8

Built With

  • Ruby
  • Rails
  • Visual Studio Code
  • Postman Badge

Project Requirements and Prompt

Take Home Challenge

Author

  • Crow Rising

GitHub LinkedIn

tea_time's People

Contributors

crowrising avatar

Watchers

 avatar

tea_time's Issues

user story 1

show all of customers subscriptions active and inactive

create schema

make tables for database
customers
teas
subscriptions
and join tables for tea_subscriptions and customer_subscriptions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.