Giter Site home page Giter Site logo

quotes-api's Introduction

quotes-api

redis/csv/in memory quote database with an expressive REST API.

Firing it up

npm start

Building docker image

docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t <username>/<image-name>:<tag> --push .

HTTP API

GET /quotes/random

Response - HTTP 200

{
      "total": 1,
      "id": 1,
      "quote": "<Chuck> guys, I know kung fu"
}

GET /quotes/random?type=re&query=(yeah)

Response - HTTP 200

{
      "total": 2,
      "quote": "<Reese> geez, try not to die <Fusco> yeah i love you too"
}

GET /quotes/:id

Response - HTTP 200

{
    "quote": "<piehdd> thats stupid <frw> so's your face man"
}

GET /quotes/:id/info

Response - HTTP 200

{
    "nickname": "Ferdi",
    "timestamp": "2016-09-23T14:55:00.000Z",
    "channel": "#support"
}

POST /quotes

Request

{
      "nickname": "kate",
      "channel": "#lostandfound",
      "mask": "[email protected]",
      "quote": "<jack_ass> we have to go back"
}

Response - HTTP 200

{
      "id": "3"
}

PATCH /quotes/:id

Request

{
      "quote": "<jack_ass> we have to go back... <jack_ass> back to the future!",
      "update_by": "Emmett Brown"
}

Response - HTTP 200

{
      "success": true
}

DELETE /quotes/:id

Response - HTTP 200

{
    "success": true
}

quotes-api's People

Contributors

francescorw avatar pietro210 avatar

Stargazers

 avatar

Watchers

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