def make_api_call(self, method, url, json_params=None):
url = self.BRANCH_BASE_URI+url<EOL>if self.verbose is True:<EOL><INDENT>print("<STR_LIT>".format(url))<EOL><DEDENT>if json_params is not None:<EOL><INDENT>encoded_params = json.dumps(json_params)<EOL>headers = {'<STR_LIT:Content-Type>': '<STR_LIT:application/json>'}<EOL><DEDENT>else:<EOL><INDENT>encoded_params = None<EOL>headers = {}<EOL><DEDENT>if encoded_params is not None and self.verbose is True:<EOL><INDENT>print("<STR_LIT>".format(encoded_params))<EOL><DEDENT>request = Request(url, encoded_params.encode('<STR_LIT:utf-8>'), headers)<EOL>request.get_method = lambda: method<EOL>response = urlopen(request).read()<EOL>return json.loads(response.decode('<STR_LIT:utf-8>'))<EOL>
Accesses the branch API
:param method: The HTTP method
:param url: The URL
:param json_params: JSON parameters
:return: The parsed response