sane file structure
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
|
||||
<!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 verse from the KJV</li>
|
||||
<li><a href="https://api.1611.social/votd">/votd</a> - A random verse that changes from day-to-day.</li>
|
||||
<li><a href="https://api.1611.social/search">/search</a> - Search keywords</li>
|
||||
<li><a href="https://api.1611.social/show?kw=John3:16">/show</a> - Show a set of verses</li>
|
||||
<li><a href="https://api.1611.social/define">/define</a> - Search the Dictionary</li>
|
||||
</ul>
|
||||
|
||||
<h3>Verse searching</h3>
|
||||
<p>'/show?kw=' will try to match single verses and verse ranges. (not sets) For example:</p>
|
||||
<pre>
|
||||
<code>
|
||||
/show?kw=john3:16
|
||||
/show?kw=1 John 3:3- (gets the whole rest of the chapter)
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
<h3>Keyword searching</h3>
|
||||
<p>'/search?kw=keyword' accepts a search word, and will return any verses matching the query. For example:</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>
|
||||
API ENDPOINT SPECIFICATION v 0.2
|
||||
================================
|
||||
|
||||
/random - outputs a random verse
|
||||
/votd - returns verse of the day
|
||||
/search - returns a keyword search result set (no args is a landing page)
|
||||
/show - returns a verse or set of verses by name/location
|
||||
/define - 1828 Noah Webster dictionary (no args is a landing page)
|
||||
|
||||
URL PARAMETERS
|
||||
==============
|
||||
?view=
|
||||
- json - json-encoded response
|
||||
- plain - plaintext response
|
||||
- rich - pretty response with css
|
||||
default: json
|
||||
|
||||
?kw=
|
||||
- comma-delimited keyword search for /search
|
||||
|
||||
|
||||
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
|
||||
</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>
|
||||
Reference in New Issue
Block a user