Giter Site home page Giter Site logo

fotiemconstant / geek-quote-api Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 8.0 117 KB

An API for retrieving random geeky/programming-related quotes for use in all sorts of applications.

Home Page: https://geek-quote-api.vercel.app/v1/quote

License: GNU General Public License v3.0

JavaScript 94.41% HTML 5.59%
geek-quote-api geek-api quote-api quote-generator nodejs express api expressjs javascript

geek-quote-api's Introduction

geek-quote-api logo

geek-quote-api

An API for retrieving random geeky quotes

Apps built on geek-quote-api

Production host

🚨 Update 2023!

The production host which was initially hosted on heroku was moved to vercel due to the fact that heroku no longer supports free tier.

The Access-Control-Allow-Origin header is set to * so that you can make requests from any domain.

APIs

GET /v1/quote

Returns an object with one quote:

{
  "quote":"Microsoft: You’ve got questions. We’ve got dancing paperclips.",
  "author":"Unknown Author"
}

GET /v1/quotes/

Returns an array of all quotes

[
 {
  "quote":"There is no place like 127.0.0.1",
  "author": "Unknown Author",
 },
 {
  "quote":"Girls are like Internet Domain names; the ones I like are already taken.",
  "author": "Unknown Author",
 },
]

GET /v1/quote/<count> e.g GET /v1/quote/4

Returns an array of the number of quotes specified

[
 {
  "quote":"Girls are like Internet Domain names; the ones I like are already taken.",
  "author": "Unknown Author",
 },
 {"quote":"Never argue with the data.",
 "author":"Unknown Author"
 },
 {
 "quote":"Passwords are like underwear. You shouldn’t leave them out where people can see them. You should change them regularly. And you shouldn’t loan them out to strangers.","author":"Unknown Author"
 },
 {
 "quote":"JUST SHUT UP AND REBOOT!!",
 "author":"Unknown Author"
 }
]

GET /v1/quote/filter/known

Returns a ramdom object with quote of known author:

{
  "quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
  "author": "Some Author"
}

GET /v1/quote/filter/known/<count> e.g GET /v1/quote/filter/known/1

Returns an array of number of quotes of known author:

{
  "quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
  "author": "Some Author"
}

GET /v1/quote/filter/{{keyword}} e.g GET /v1/quote/filter/code

Returns an object with first quote with the searched keyword:

{
  "quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
  "author": "Unknown Author"
}

GET /v1/quote/filter/all/{{keyword}} e.g GET /v1/quote/filter/all/code

Returns an array with all quotes with the searched keyword:

[
  {
    "quote": "Every SQL statement that Chuck Norris codes has an implicit 'COMMIT' in its end.",
    "author": "Unknown Author"
  },
  {
    "quote": "Talk is cheap. Show me the code.",
    "author": "Linus Torwards"
  }
]

Local development

Once you've cloned this repo, run npm install to install the dependencies.

Then you can run:

  • npm start: runs the compiled server
  • npm run serve: runs the server with hot code replacement

Context

https://www.youtube.com/watch?v=zEsAf88zpg4

geek-quote-api's People

Contributors

bennet237 avatar fotiemconstant avatar mrtimeey avatar quiet-programmer avatar rishabh-malhotraa avatar ronaldcolyar avatar xaerru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

geek-quote-api's Issues

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.