OCamlPro / ows

A service to analyse the state of the opam repository w.r.t. all available version of the OCaml compiler.
http://ows.irill.org/latest/today/index.html
Other
5 stars 3 forks source link

ows rest api #16

Closed abate closed 9 years ago

abate commented 9 years ago

I've added a simple form to query ows and check the differences between any two known commits http://ows.irill.org/compare/form and a json inteface to query ows using curl :

#!/bin/bash

commit=$1
patchfile=$2
patch64=$(base64 -w 0 ${patchfile})

tempfile=$(mktemp)
cat<<EOF > ${tempfile}
{"commit1": "${commit}",
 "patch": "${patch64}"}
EOF

curl -H "Content-Type: application/json" --data @${tempfile} http://ows.irill.org/compare/api

rm ${tempfile}

I'm going to add a caching layer to speedup the computation and few sanity check on the webform. The backend server uses ngnix + wusgi + python-bottle . This is just a preview and not production ready.

abate commented 9 years ago

This is done. In the ows repository, there are two scripts (curlsend and cursend2) that can be used to query the system.