From 21243e6cfb8c185d1c0fb39805d92618e0e053a3 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 16 Jun 2019 15:00:46 +0200 Subject: [PATCH] Document JSON endpoint on index page --- templates/index.rs.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/templates/index.rs.html b/templates/index.rs.html index 366447a..5d23dd2 100644 --- a/templates/index.rs.html +++ b/templates/index.rs.html @@ -45,6 +45,21 @@ would render this badge: alt="example badge" /> +

+You can also request the HoC as JSON by appending /json to the request path. This will return a JSON +object with two fields: count and head with count being the HoC value and head being the +commit ref of HEAD. Requesting +https://@domain/github/vbrandl/hoc/json might return something +along the lines of +

+ +
+{
+    "head" : "05736ee3ba256ec9a7227c436aef2bf43db109ab",
+    "count": 7582
+}
+
+

Badge Generator