# # Copyright 2015 (c) Anna Schumaker # import json from urllib import request __SLACK_SERVER = "https://slack.com/api" def call(method, **kwargs): args = "&&".join("%s=%s" % x for x in kwargs.items()) with request.urlopen("%s/%s?%s" % (__SLACK_SERVER, method, args)) as req: return json.loads(req.read().decode()) return {"ok" : False} def test(): return call("api.test")["ok"]