Coder Social home page Coder Social logo

ness70 / programming-quotes-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mudroljub/programming-quotes-api

0.0 1.0 0.0 442 KB

Programming Quotes API for open source projects.

Home Page: https://programming-quotes-api.herokuapp.com/

JavaScript 100.00%

programming-quotes-api's Introduction

Programming Quotes API

Programming Quotes API for open source projects.

Homepage: programming-quotes-api.herokuapp.com

Github repo: github.com/skolakoda/programming-quotes-api

Client app: skolakoda.org/programming-quotes

API Documentation

Suported languages: en, sr.

Public routes

GET /quotes (get all quotes)

GET /quotes/lang/en (get quotes by language)

GET /quotes/page/2 (get quotes by page)

GET /quotes/random (get random quote)

GET /quotes/random/lang/sr (get random quote by language)

GET /quotes/id/5a6ce86f2af929789500e824 (get quote by id)

Protected routes

POST /quotes/vote (post vote)

  • required params: quoteId, newVote (number from 1 to 5)

POST /quotes (for registered user)

  • required params: token, author, en
  • optional: source, sr
  • author name should be from Wikipedia

PUT /quotes (update quote for admin)

  • required params: token, _id, author, en
  • optional: source, sr

DELETE: /quotes (for admin)

  • required params: token, _id

Authentication

GET /auth/{provider} (user login)

  • suported providers: Github, Google
  • opens login page

After successful login, user will be redirected to client app. The client app should handle token on this route: #/auth/{provider}/${token}.

GET /auth/{provider}:token (get user data)

  • returns info on current user

Development

Prerequisites

Start

npm i
npm run dev

See server logs:

heroku logs --app programming-quotes-api

Deploy

Deploy will be done automatically after merge into master branch.

programming-quotes-api's People

Contributors

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