Skip to content

iamkaushal/one-liners

Repository files navigation

one-liners

A Flask RESTful API to get random one liners

forthebadge forthebadge

What is the one-liners-api?

The one-liners RESTful API lets you fetch a random one liner for use in all sorts of applications.

Why the one-liners-api?

The one-liners api is for any developer needing some random oneliner in their life or application.

URL

GET: https://one-liners.herokuapp.com/api

Usage

Just do a GET request on the API URL.

GET: https://one-liners.herokuapp.com/api

Examples

cURL

curl -X GET \
'https://one-liners.herokuapp.com/api'

Python

import requests

requests.get('https://one-liners.herokuapp.com/api')

Node.js (es6)

var request = require('request');

let options = {
    url: 'https://one-liners.herokuapp.com/api',
    method: 'GET'
}

request(options, (err, response, body) => {
    if(!err && response.statusCode == 200)
        console.log(body)
});

Any browser

visit the url: https://one-liners.herokuapp.com/api to get a joke. Press refresh button for more jokes.

License

MIT

Contact

Contact me here: [email protected]

About

Random One liners REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages