Skip to content

An api made with rails and postrgres database, all back-end, for Chalamet quotes and pics.

Notifications You must be signed in to change notification settings

mellowmorgan/timothee-chalamet-api

Repository files navigation

Timothee Chalamet API

Rails API for Timothee Chalamet

Created By: Morgan Waites

Technologies Used

  • Ruby
  • Gems
  • Bundler
  • Postgres
  • SQL
  • Rails
  • ActiveRecord
  • Postman
  • Heroku

Description

This API uses a database with tables for quotes and pictures of famous beautiful actor Timothee Chalamet It has full CRUD functionality. All users can post, update, delete, and retrieve the endpoints of the API.

Hosted on Heroku at https://timothee-chalamet-api.herokuapp.com/. The front end to this app is built with React, the repo can be found here. And hosted here with Netlify.

System Requirements

  • Ruby v2.6.5 recommended
  • Postgres 12.9
  • Postman (for testing API endpoints and creating new data in API) (Note: Ruby gem dependencies will be installed automatically by Bundler.)

Setup/Installation Requirements

  • Clone the GitHub repository: https://github.com/mellowmorgan/timothee-chalamet-api.git
  • From the main project directory, enter bundle install in the terminal to populate gems.
  • To create a database, type in your terminal: rake db:setup
  • Run rails s -p 3001 to start server.
  • Can use Postman to access endpoints, outlined below.

Endpoints Quotes

Usage METHOD URL Params
See all quotes GET localhost:3001/quotes
See a specific quote GET localhost:3001/quotes/:id
See a random quote GET localhost:3001/quotes/random
Add/create a quote POST localhost:3001/quotes content
Update a quote PUT localhost:3001/quotes/:id?content=QUOTE content
Delete a quote DELETE localhost:3001/quotes/:id

Endpoints Photos

Usage METHOD URL Params
See all photos GET localhost:3001/photos
See a specific photo GET localhost:3001/photos/:id
See a random photo GET localhost:3001/photos/random
Add/create a photo POST localhost:3001/photos file_path
Update a photo PUT localhost:3001/photos/:id?file_path=URL file_path
Delete a quote DELETE localhost:3001/photos/:id

Known Bugs

  • None at this time.

License

MIT Copyright (c) 2022 Morgan Waites

About

An api made with rails and postrgres database, all back-end, for Chalamet quotes and pics.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published