92 lines
2.1 KiB
HTML
92 lines
2.1 KiB
HTML
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
html{
|
|
font-family: sans-serif;
|
|
width: 768px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<h1>KJV API</h1>
|
|
<p>KJV accessible via web calls</p>
|
|
|
|
<h2>Quick Search</h2>
|
|
<form action="/find">
|
|
<label for='kw'>Query</label><br>
|
|
<input type="text" name="kw"><br><br>
|
|
<input type="hidden" name="view" value="rich"">
|
|
<input type="submit">
|
|
<form>
|
|
|
|
|
|
<pre>
|
|
<code>
|
|
API ENDPOINT SPECIFICATION v 0.3
|
|
================================
|
|
|
|
<a href="/find">
|
|
/find</a> - Tries to show a verse, if it's not a verse
|
|
it will try to search your query. If it's a
|
|
single query it will try to find a definition
|
|
for the word as well. Only avaliable in "Rich"
|
|
and meant for interactive use/browsing
|
|
<a href="/random">/random</a> - outputs a random verse
|
|
<a href="/votd">/votd</a> - returns verse of the day
|
|
<a href="/search">/search</a> - returns a keyword search result set
|
|
<a href="/show">/show</a> - returns a verse or set of verses by name/location
|
|
<a href="/define">/define</a> - 1828 Noah Webster dictionary search
|
|
|
|
URL PARAMETERS
|
|
==============
|
|
?view=
|
|
- json - json-encoded response
|
|
- plain - plaintext response
|
|
- rich - pretty response with css
|
|
default: json
|
|
|
|
?kw=
|
|
- The keyword(s) of your query.
|
|
|
|
|
|
FEATURES
|
|
========
|
|
- King James Only. (No heretical commentaries or false Bibles)
|
|
- High quality source documents
|
|
- Free
|
|
-
|
|
- Developer hates the sodomites
|
|
|
|
INTERACTIVE ENDPOINTS
|
|
=====================
|
|
The following endpoints will present you with a query box and
|
|
radio selector for choosing your output format.
|
|
- / (same function as /find)
|
|
- /search
|
|
- /define
|
|
- /show
|
|
|
|
|
|
EXAMPLES
|
|
========
|
|
api.tld/random
|
|
api.tld/votd?view=rich
|
|
api.tld/show?kw=john3:16,1john5:7&view=plain
|
|
api.tld/search?kw=faith
|
|
api.tld/search?kw=nimrod&view=rich
|
|
api.tld/define?kw=faith&view=rich
|
|
|
|
INTEGRATION
|
|
===========
|
|
If you want to put the verse of the day into your website, you can use the following example php:
|
|
echo curl_exec(curl_init('https://api.1611.social/votd?view=plain'));
|
|
|
|
BUGS
|
|
====
|
|
Suggestions, bug reports or improvements can be reported to <a href="https://1611.social/@tyler">@tyler@1611.social</a>
|
|
</code>
|
|
</pre>
|
|
</html>
|