Unified search bar, initial styling
This commit is contained in:
+48
-39
@@ -13,43 +13,36 @@ html{
|
||||
<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="/salvation">/salvation</a> - Learn what you have to do to go to heaven.</li>
|
||||
<li><a href="/random">/random</a> - A random verse from the KJV</li>
|
||||
<li><a href="/votd">/votd</a> - A random verse that changes from day-to-day.</li>
|
||||
<li><a href="/search">/search</a> - Search keywords. No arguments = landing page.</li>
|
||||
<li><a href="/show">/show</a> - Show a set of verses. No arguments = landing page.</li>
|
||||
<li><a href="/define">/define</a> - Search the Dictionary. No arguments = landing page.</li>
|
||||
</ul>
|
||||
<h2>Quick Search</h2>
|
||||
<form action="/find">
|
||||
<label for='kw'>Query</label><br>
|
||||
<input type="text" name="kw"><br><br>
|
||||
|
||||
<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>
|
||||
<label for='view'>View<label><br>
|
||||
<input type="radio" name="view" value="rich" checked="checked">Rich<br>
|
||||
<input type="radio" name="view" value="plain">Plain<br>
|
||||
<input type="radio" name="view" value="json">JSON<br>
|
||||
|
||||
<h3>Keyword searching</h3>
|
||||
<p>'/search?kw=keyword' accepts a search word, and will return any verses matching the query. For example:</p>
|
||||
<input type="submit">
|
||||
<form>
|
||||
|
||||
<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
|
||||
API ENDPOINT SPECIFICATION v 0.3
|
||||
================================
|
||||
|
||||
/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
|
||||
/define - 1828 Noah Webster dictionary
|
||||
<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
|
||||
==============
|
||||
@@ -60,14 +53,26 @@ URL PARAMETERS
|
||||
default: json
|
||||
|
||||
?kw=
|
||||
- comma-delimited keyword search for /search
|
||||
- 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
|
||||
=====================
|
||||
/search and /define will show you a landing page where you can
|
||||
use HTML forms to complete your search. Both of these will
|
||||
offer you spelling suggestions if it can't find the right word.
|
||||
This will only offer words that are actually in the Bible.
|
||||
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
|
||||
========
|
||||
@@ -77,11 +82,15 @@ 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>
|
||||
|
||||
|
||||
<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