The Google App Engine cloud app that supports the Click Counter.
The technical specification is available here.
Serve static files in /static
without authentication.
save the domain data, setup the domain with clicks 0, status 0 and money to 0 if the domain config exist already override it.
request:
URL: /config/{domain}
method: POST
headers:
Authorization: Basic OnNvbWVzZWNyZXQ= // equivalent to Base64(":somesecret")
body: what_ever_content
response:
headers:
content-type: text/plain
code: 204
body:
return the data about the domain name.
request:
URL: /config/{domainname}
method: GET
headers:
Authorization: Basic OnNvbWVzZWNyZXQ= // equivalent to Base64(":somesecret")
body:
response:
headers:
content-type: text/plain
code: 200
body: what_ever_content
request:
URL: /config/{domainname}
method: DELELTE
headers:
Authorization: Basic OnNvbWVzZWNyZXQ= // equivalent to Base64(":somesecret")
body:
response:
headers:
code: 204
body:
increment the number of visit for the domain and populate domain configuration.
request:
URL: /c
method: POST
headers:
query variables:
{
domain: "domainname",
from: "inside/outside",
pt: "" or integer,
ct: integer
}
response:
headers:
content-type: application/json
code: 200
body: …
See #5 for an explanation of the request parameters.
See click-counter's demo.json for an example response.
This returns the global click count of all .hiv domains as an integer value
request:
URL: /stats/clickcount
method: GET
response:
headers:
content-type: text/plain
code: 200
body: 123456789
We provide a ruleset file which list redirects from regular domains to their .hiv equivalent.
request:
URL: /redirects
method: GET
headers:
Accept: application/json
response:
headers:
Code: 200
Content-type: application/json
body: …
You can query this endpoint live:
curl -H "Accept: application/json" https://dothiv-registry.appspot.com/redirects
There is also the reverse version of this list, mapping hiv domain to redirect as a CSV list:
request:
URL: /redirects
method: GET
headers:
Accept: text/csv
response:
headers:
Code: 200
Content-type: text/csv
body:
beratung.hiv,http://www.aidshilfe-beratung.de
sixt.hiv,http://www.sixt.de
…
You can query this endpoint live:
curl -H "Accept: text/csv" https://dothiv-registry.appspot.com/redirects
Configuration updating endpoints are protected with basic auth. The password is generated on the first access
of the endpoint and can be changed via the AppEngine Console's DataStore Viewer. Look for a Config
entity with the
key auth_secret
.