Giter VIP home page Giter VIP logo

books-api-search's Introduction

Books API Search

This project contains an API that exposes an open source books API, provided by Penguin Random House.

Requirements

  • Ruby 2.5
  • PostgreSQL 12.4

Installation

git clone https://github.com/kaydanzie/books-api-search.git
cd books-api-search
bundle install
bundle exec rails db:setup

To start the server locally:

bundle exec rails s

Usage

These are the endpoints provided by this API:

/api/v1/books

Query Parameters

See the Penguin Random House API documentation for more optional fields related to this endpoint.

  • search (Required): A string containing either a title or author you'd like to search by.
  • fields (Optional): A string containing comma-separated values that specify the fields you would like to be returned. Must be one of the fields listed in the documentation.

Example Request and Response

$ curl "localhost:5000/api/v1/books?search=Rowling&fields=titleweb,workid"
{"works":{"work":[{"titleweb":"Harry Potter and the Chamber of Secrets","workid":"158321"},{"titleweb":"Harry Potter and the Deathly Hallows","workid":"158322"},{"titleweb":"Harry Potter \u0026 the Goblet of Fire","workid":"158324"},{"titleweb":"Harry Potter and the Half-Blood Prince","workid":"158325"},{"titleweb":"Harry Potter and the Order of the Phoenix","workid":"158326"},{"titleweb":"Harry Potter \u0026 the Prisoner of Azkaban","workid":"158327"},{"titleweb":"Harry Potter and the Sorcerer's Stone","workid":"158330"},{"titleweb":"Harry Potter 1-7 Audio Collection","workid":"225957"},{"titleweb":"Who Is J.K. Rowling?","workid":"311154"},{"titleweb":"Life in Medieval Times","workid":"336673"}],"uri":"https://reststop.randomhouse.com/resources/works?search=Rowling"}}

books-api-search's People

Contributors

kaydanzie 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.