Created
May 19, 2020 00:49
-
-
Save Sytten/331fbffe33ea8d40c397301778f8ad0a to your computer and use it in GitHub Desktop.
failing-revenge-api-call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _api(endpoint): | |
high_school_uri = _get_school_uri() | |
if high_school_uri: | |
from frontend import legacy_http | |
req = legacy_http.request(request.method, f'{high_school_uri}{endpoint}') | |
ans = json.loads(req.output) | |
_err_handle(ans) | |
return (ans) | |
else: | |
return {'status':'err', | |
'description':'Can\'t locate school API!'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment