96 lines
3.2 KiB
HTML
96 lines
3.2 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>
|
|
|
|
<h3>Usage</h3>
|
|
<p>URL Root: <a href="https://api.1611.social/">https://api.1611.social/<a> (you are here)</p>
|
|
<ul>
|
|
<li><a href="https://api.1611.social/random">/random</a> - a random JSON-encoded verse. Different every time.</li>
|
|
<li><a href="https://api.1611.social/votd">/votd</a> - json-encoded verse changes from day-to-day.</li>
|
|
<li><a href="https://api.1611.social/p/john3:16">/p/someverse</a> - will attempt to parse and return the Bible requested in plaintext (pretty, with escape characters)</li>
|
|
<li><a href="https://api.1611.social/John3:16">/someverse</a> - will attempt to parse and return the Bible requested in plaintext, with no escape characters. Newlines are encoded as "/n" - for you to handle.</li>
|
|
<li><a href="https://api.1611.social/s/faith">/s/keyword</a> - will return any verses containing keyword in a JSON list</li>
|
|
<li><a href="https://api.1611.social/sp/faith">/sp/keyword</a> - will return any verses containing keyword in a newline (html break) delimited list</li>
|
|
<li><a href="https://api.1611.social/sl/faith">/sl/keyword</a> - will return all searched references and the scripture in JSON</li>
|
|
<li><a href="https://api.1611.social/spl/faith">/spl/keyword</a> - will return all searched references and the scripture in text delmied by a newline</li>
|
|
|
|
</ul>
|
|
|
|
<h3>Verse searching</h3>
|
|
<p>'/someverse' accepts verse references in a variety of forms, including single verses and verse ranges. For
|
|
example:</p>
|
|
|
|
<li>Jn3:16, john3:16,17 ps1:1-6</li>
|
|
<p>
|
|
Most recognizable abbreviations are allowed, and spelling errors are ignored if the book can be made
|
|
out in the first few characters. No distinction is made between upper and lower case. Multiple
|
|
references may be provided on an input line, delimited by spaces or commas.
|
|
</p>
|
|
|
|
<h3>Keyword searching</h3>
|
|
<p>'/s*/keyword' accepts a search word, and will return any verses matching the query</p>
|
|
|
|
<h3>Integration</h3>
|
|
<p>If you want to put the verse of the day into your website, you can use the following example php:</p>
|
|
<p>echo curl_exec(curl_init('https://api.1611.social/votd?view=plain'));</p>
|
|
|
|
<pre>
|
|
<code>
|
|
FUTURE ENDPOINT SPECIFICATION
|
|
======================
|
|
|
|
/random - outputs a random verse
|
|
/votd - returns verse of the day
|
|
/search - returns a keyword search result set
|
|
/show - returns a verse or set of verses by name/location
|
|
|
|
URL PARAMETERS
|
|
==============
|
|
?view=
|
|
- json - json-encoded response
|
|
- plain - plaintext response
|
|
- rich - pretty response with css
|
|
default: json
|
|
|
|
?kw=
|
|
- comma-delimited keyword search for /search
|
|
search default: faith
|
|
show default: john3:16
|
|
|
|
?op=
|
|
- Multi-keyword search operator
|
|
- and - both keywords must be in verse
|
|
- any - any keyword must be in a verse
|
|
search default: any
|
|
|
|
?fz=
|
|
- on - fuzzy search on
|
|
default: off
|
|
|
|
EXAMPLES
|
|
========
|
|
api.tld/random?view=json
|
|
api.tld/votd?view=human
|
|
api.tld/show?kw=john3:16,1john5:7&view=plain
|
|
api.tld/search?kw=faith
|
|
api.tld/search?kw=nimrod&view=rich
|
|
</code>
|
|
</pre>
|
|
|
|
|
|
<h3>Bugs</h3>
|
|
<p>Suggestions, bug reports or improvements can be reported to <a href="https://1611.social/@tyler">@tyler@1611.social</a></p>
|
|
|
|
</html>
|