def jama(): """API intake to pass off dynamic dialog data to Slack. Passes json payload off to route_handler, otherwise an error is thrown. Args: None Returns: Response Class object """ if not rt_handle.verify_req(request): return make_response("", 401) return rt_handle.resolve_jama_req(base_url, request)
def jama_dialog(): """API intake for dialog submissions from Slack. Passes json payload off to route_handler, otherwise an error is thrown. Args: None Returns: Response Class object """ if not rt_handle.verify_req(request): return make_response("", 401) try: submit_payload = json.loads(request.form['payload']) return rt_handle.resolve_dialog_submit(base_url, submit_payload) except Exception as err: print(err) return make_response("", 500)
def jama_bot(): """API intake to pass off slackbot data to Slack. Passes json payload off to route_handler, otherwise an error is thrown. Args: None Returns: Response Class object """ if not rt_handle.verify_req(request): return make_response("", 401) print("BOT") try: submit_payload = request.get_json() return rt_handle.resolve_bot_req(base_url, submit_payload) except Exception as err: print(err) return make_response("", 500)
def jama_menu(): """API intake to pass off dynamic dialog data to Slack. Passes json payload off to route_handler, otherwise an error is thrown. Args: None Returns: Response Class object """ if not rt_handle.verify_req(request): return make_response("", 401) print("MENU") try: submit_payload = json.loads(request.form["payload"]) return rt_handle.resolve_menu_req(base_url, submit_payload) except Exception as err: print(err) return make_response("", 500)