Skip to content

REST API using express + netlify lambda functions + serverless

License

Notifications You must be signed in to change notification settings

EzequielCaballero/api-quote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API - Today's quote


Hosted by Netlify and using Express + Netlify-lambda functions + serverless-http, this API will return as response a different author-quote per day. Which quote you are going to get by default is defined by the current day (n° 1 to 31) of the month (ART time zone).

Total quotes: 31 (one per day) - available languages: English / Spanish


SAMPLE | Get today's quote

Request

https://eac-api-quote.netlify.com/.netlify/functions/api/quote

Response

"quote": {
            "en": {
                "author": "Jean-Paul Sartre",
                "text": "We are our choices"
            },
            "es": {
                "author": "Jean-Paul Sartre",
                "text": "Somos nuestras elecciones"
            }
        }

GET | Available options

Considering the following url https://eac-api-quote.netlify.com/ .netlify/functions/api/value-to-be-change

  1. Get today's quote (en/es)
    Request: api/quote
    
  2. Get today's quote only in English or Spanish language
    Request: api/quote/en
             api/quote/es
    
  3. Get all the quotes
    Request: api/quotes
    
  4. Get a random quote
    Request: api/quotes/random
    
  5. Get a random quote only in English or Spanish language
    Request: api/quotes/random/en
             api/quotes/random/es
    

Provides a quick 5' minutes explanation on how to deploy an express.js app on Netlify using the option Netlify functions.

About

REST API using express + netlify lambda functions + serverless

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published