def call(method, data, post=False):
url = "<STR_LIT>" % ('<STR_LIT>', method)<EOL>if post:<EOL><INDENT>url += "<STR_LIT:/>"<EOL>data = urlencode(data)<EOL><DEDENT>else:<EOL><INDENT>url += "<STR_LIT>" % urlencode(data)<EOL>data = '<STR_LIT>'<EOL><DEDENT>res = json.load(urlopen(url, data))<EOL>if not res['<STR_LIT>']:<EOL><INDENT>raise CommandError("<STR_LIT>" % (method, res['<STR_LIT:code>'], data))<EOL><DEDENT>return res['<STR_LIT:message>']<EOL>
Calls `method` from the DISQUS API with data either in POST or GET.
Returns deserialized JSON response.