From e7f179e5f3067ea47d1e34db7d220d1d3d534548 Mon Sep 17 00:00:00 2001 From: josef Date: Mon, 9 Nov 2015 16:44:53 +0100 Subject: data gathering for niklas --- monitor/josef_lib2.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 monitor/josef_lib2.py (limited to 'monitor/josef_lib2.py') diff --git a/monitor/josef_lib2.py b/monitor/josef_lib2.py new file mode 100644 index 0000000..5af6490 --- /dev/null +++ b/monitor/josef_lib2.py @@ -0,0 +1,34 @@ +# The intent is that this lib will eventually contain code for using the CT v2 API + +import urllib2 +import json + + +def get_sth_v1(baseurl): + result = urllib2.urlopen(baseurl + "ct/v1/get-sth").read() + return json.loads(result) + +def get_sth_v2(baseurl): + result = urllib2.urlopen(baseurl + "ct/v2/get-sth").read() + return json.loads(result) + +def add_chain_v2(baseurl): + pass + +def add_prechain_v2(baseurl): + pass + +def get_consistency_v2(baseurl): + pass + +def get_proof_by_hash_v2(baseurl): + pass + +def get_all_by_hash_v2(baseurl): + pass + +def get_entries_v2(baseurl): + pass + +def get_roots_v2(baseurl): + pass -- cgit v1.1