Skip to content

A simple API that returns a random quote from the book Omniscient Reader's Viewpoint.

Notifications You must be signed in to change notification settings

Marcus5408/orv-quote-api

Repository files navigation

Omniscient Reader's Viewpoint Quotes API

Google App Engine Deployment CodeQL Scan

This is a simple API that returns a random quote from the book Omniscient Reader's Viewpoint.

Usage

Send a HTTP GET request to https://orv-quote-api.uk.r.appspot.com with one of the following endpoints:

  • / - Basic information about the API.
  • /quote - Returns a random quote, regardless of size.
  • /shortquote - Returns a random quote that is less than 100 characters long.
  • /longquote - Returns a random quote that is more than 100 characters long.

Example usage in Python:

import requests
import json

# get json response from api
response = requests.get("https://orv-quote-api.uk.r.appspot.com/quote").json()

# print the quote
print(f"\"{response['quote']}\"\n - {response['author']}")
$ python example.py
"Get lost, Kim Dokja."
 - Yoo Joonghyuk

Contributing

Quotes

To add new quotes to the API, either:

  1. Create a GitHub issue under the quote request label with the quote and the person saying it/ main person in the scene.
  2. Make a pull request with your quote added to the correct quotes file. They can be found in the quotes folder.
  3. Contact me through some other means.

Code

To add new code, make a pull request with your changes.