MCPcopy Index your code
hub / github.com/algorithmiaio/algorithmia-python / getJsonHelper

Method getJsonHelper

Algorithmia/client.py:279–295  ·  view source on GitHub ↗
(self, url, **query_parameters)

Source from the content-addressed store, hash-verified

277 return self.requestSession.get(self.apiAddress + url, headers=headers, params=query_parameters)
278
279 def getJsonHelper(self, url, **query_parameters):
280 headers = {}
281 if self.apiKey is not None:
282 headers['Authorization'] = self.apiKey
283 elif self.bearerToken is not None:
284 headers['Authorization'] = 'Bearer ' + self.bearerToken
285 response = self.requestSession.get(self.apiAddress + url, headers=headers, params=query_parameters)
286 if 200 <= response.status_code <= 299:
287 response = response.json()
288 if 'error' in response:
289 raise raiseAlgoApiError(response)
290 else:
291 return response
292 else:
293 if response.content is not None:
294 response = response.json()
295 raise raiseAlgoApiError(response)
296
297 def getStreamHelper(self, url, **query_parameters):
298 headers = {}

Callers 12

scmsMethod · 0.95
get_secret_providersMethod · 0.95
get_algorithm_errorsMethod · 0.95
get_algorithm_idMethod · 0.80
get_secretsMethod · 0.80
get_buildsMethod · 0.80
get_buildMethod · 0.80
get_build_logsMethod · 0.80
get_scm_statusMethod · 0.80
infoMethod · 0.80
existsMethod · 0.80
versionsMethod · 0.80

Calls 2

raiseAlgoApiErrorFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected