def handle_integration_installation(request): """ Follow the user from the account of @pep8speaks on GitHub """ user = request.json["sender"]["login"] helpers.follow_user(user) response_object = {"message": "Followed @{}".format(user)} return utils.Response(response_object)
def handle_integration_installation(request): # Follow user data = {"user": request.json["sender"]["login"]} helpers.follow_user(data["user"]) status_code = 200 js = json.dumps(data) return Response(js, status=status_code, mimetype='application/json')
def handle_integration_installation(request): """ Follow the user from the account of @pep8speaks on GitHub """ user = request.json["sender"]["login"] query_response = helpers.follow_user(user).content.decode("utf-8") response_object = { "message": f"Followed @{user}", "query_response": query_response } return utils.Response(response_object)