Reorganized votd and random and integrated rich responses for those
This commit is contained in:
+35
-15
@@ -5,10 +5,7 @@
|
||||
<style>
|
||||
html{
|
||||
font-family: sans-serif;
|
||||
height: 100%;
|
||||
width: 768px;
|
||||
overflow: hidden;
|
||||
display: table;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
@@ -20,9 +17,7 @@ html{
|
||||
<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/t/random">/t/random</a> - a random plaintext 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/t/votd">/t/votd</a> - plaintext 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>
|
||||
@@ -48,18 +43,43 @@ 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/t/votd'));</p>
|
||||
<p>echo curl_exec(curl_init('https://api.1611.social/votd?view=plain'));</p>
|
||||
|
||||
<p>You can see this work here:</p>
|
||||
<b>
|
||||
<?php echo curl_exec(curl_init('https://api.1611.social/t/votd')); ?>
|
||||
</b>
|
||||
<pre>
|
||||
<code>
|
||||
FUTURE ENDPOINT SPECIFICATION
|
||||
======================
|
||||
|
||||
<h3>Examples</h3>
|
||||
<p><a href="https://api.1611.social/p/John3:16">https://api.1611.social/p/John3:16</a></p>
|
||||
<p><a href="https://api.1611.social/s/faith">https://api.1611.social/s/faith</a></p>
|
||||
<p><a href="https://api.1611.social/sp/hell">https://api.1611.social/sp/hell</a></p>
|
||||
<p><a href="https://api.1611.social/spl/reprobate">https://api.1611.social/spl/reprobate</a></p>
|
||||
/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
|
||||
|
||||
?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
|
||||
</code>
|
||||
</pre>
|
||||
|
||||
|
||||
<h3>Bugs</h3>
|
||||
|
||||
Reference in New Issue
Block a user