Coder Social home page Coder Social logo

library's Introduction

##LIBRARY

This is a Rails 5 app.

Documentation

This README describes the purpose of this repository and how to set up a development environment. Other sources of documentation are as follows:

Prerequisites

This project requires:

  • Ruby 2.5.3, preferably managed using [rbenv]
  • Rails 5.2.3
  • PostgreSQL must be installed and accepting connections

Getting started

Please follow the steps to setup:

1.) Install ruby version 2.5.1 2.) Install rails version 5.2.0 3.) Install postgresql 4.) On the project root directory: a.) Run bundle install b.) rename database.yml.example to database.yml c.) Run rake db:create d.) run rake db:migrate 5.) run rails s

bin/setup

Run the bin/setup script. This script will:

  • Check you have the required Ruby version
  • Install gems using Bundler
  • Create local copies of .env and database.yml
  • Create, migrate, and seed the database

API endpoints

  1. Fetch External Books

Request-> GET /api/v1/external-books

  1. To Create a Book In Development Database

Request-> POST /api/v1/books params -> { "notebook": { "name": "Testname", "isbn": "Testisbn", "authors": ["TestAuthor1", "TestAuthor2"], "country": "India", "number_of_pages": 20, "publisher": "Testpublisher" } }

  1. READ from Database

Request-> GET /api/v1/books

  1. READ a particular Record

Request-> GET /api/v1/books/:id

  1. Update a Record In Database

Request-> PATCH /api/v1/books/:id POST /api/v1/books/:id/update

params -> { "notebook": { "name": "Testname", "isbn": "Testisbn", "authors": ["TestAuthor1", "TestAuthor2"], "country": "India", "number_of_pages": 20, "publisher": "Testpublisher" } }

  1. Delete a Record

Request-> DELETE /api/v1/books/:id POST /api/v1/books/:id/delete

library's People

Contributors

dguptaruby avatar

Watchers

James Cloos 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.