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
Suported languages: en, sr.
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)
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
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
- Install Node.js
- Set environment variables
npm i
npm run dev
See server logs:
heroku logs --app programming-quotes-api
Deploy will be done automatically after merge into master branch.