Giter Club home page Giter Club logo

rails_week4's Introduction

README

Project details:

Building an API Project

You've completed a few projects at the dev agency where you work and you've been given more autonomy to choose which project you'd like to work on next. The agency currently has three new back-end contracts to build APIs for their clients. Take your pick! Since this is the first time you've been given free rein on a project, take this opportunity to showcase your versatility for the project manager. This week, your goal is to have the best custom endpoint. Usefulness, creativity and conciseness of code will all be considered.

Building an API For your final code review, you’ll build one of the three APIs below:

Animal Shelter: Create an API for a local animal shelter. The API will list the available cats and dogs at the shelter. Local Business Lookup: Create an API for a local business lookup. The API will list restaurants and shops in town. Parks Lookup: Create an API for state and national parks. The API will list state and national parks. You have the freedom to build out your APIs as you wish. At the very least, your API should include the following:

Endpoints for GET (all and by id), POST, PUT and DELETE. A RANDOM endpoint that randomly returns a park/business/animal. A second custom endpoint that accepts parameters (example: a SEARCH route that allows users to search by specific park names). Model scopes should be used to process parameters from API calls. At least one of the objectives from Monday's Further Exploration lesson (such as versioning, token authentication, or serialization). Thorough exception handling. Complete testing with request specs. Randomized data with Faker or your own custom seed code. A README that thoroughly documents all endpoints, including parameters that can be passed in. Further Exploration Once you complete the requirements for the code review, consider adding other functionality from Monday’s Further Exploration. Get creative and add other custom routes, scopes and functionality as well!

Planning:

[X] Build API for business to showcase in a given area. GET (all and by id), POST, PUT and DELETE [X] Use Postman for testing API calls [X] Version the API v1. [X] Add Random endpoint which returns random data from our db. [X] Search API method - second API endpoint [X] Complete testing with request specs. [X] Randomized data with Faker or your own custom seed code. [X] A README that thoroughly documents all endpoints, including parameters that can be passed in [X] exception handling

Installation


cd rails_week4

  • You must install gems:

bundle install

  • Start postgres in another terminal tab (Cmd + T):

postgres

  • Create databases:

`` rails db:create db:migrate db:seed

``

  • Start the webserver:

rails s

Navigate to localhost:3000

routes:

Get & post: http://localhost:3000/api/v1/shops Get by ID: http://localhost:3000/api/v1/shops/:5 Patch, delete, put : http://localhost:3000/api/v1/shops/:id

Known Bugs

none

Technologies Used

Ruby on Rails

License

MIT

Copyright (c) 2017 Zach Beecher

rails_week4's People

Contributors

ziggity avatar

Watchers

 avatar

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.