Update documentation for the JSON endpoint

This commit is contained in:
Valentin Brandl 2019-07-07 13:36:14 +02:00
parent a239a3f80b
commit c5bbd14a05
No known key found for this signature in database
GPG Key ID: 30D341DD34118D7D

View File

@ -46,17 +46,18 @@ alt="example badge" /></a>
</pre> </pre>
<p> <p>
You can also request the HoC as JSON by appending <code>/json</code> to the request path. This will return a JSON You can also request the HoC as JSON by appending <code>/json</code> to the request path. This will return a JSON object
object with two fields: <code>count</code> and <code>head</code> with count being the HoC value and head being the with three fields: <code>count</code> (the HoC value), <code>commits</code> (the number of commits) and
commit ref of <code>HEAD</code>. Requesting <code>head</code> (the commit ref of HEAD). Requesting <a
<a href="https://@domain/github/vbrandl/hoc/json">https://@domain/github/vbrandl/hoc/json</a> might return something href="https://@domain/github/vbrandl/hoc/json">https://@domain/github/vbrandl/hoc/json</a> might return something along
along the lines of the lines of
</p> </p>
<pre> <pre>
&#123; &#123;
"head" : "05736ee3ba256ec9a7227c436aef2bf43db109ab", "head": "1f01c3b964b018fb0c0c2c5b572bf4ace2968546",
"count": 7582 "count": 8324,
"commits": 223
&#125; &#125;
</pre> </pre>