fulltext/routes.py
def start_extraction(id_type: str, identifier: str) -> Response:
    """Handle requests for fulltext extraction."""
    payload: Optional[dict] = request.get_json()
    force: bool = payload.get('force', False) if payload is not None else False
    token = request.environ['token']

    # Authorization is required to work with submissions.
    authorizer: Optional[Authorizer] = None
    if id_type == SupportedBuckets.SUBMISSION:
        authorizer = make_authorizer(scopes.READ_COMPILE)

    data, code, headers = \
        controllers.start_extraction(id_type, identifier, token, force=force,
                                     authorizer=authorizer)
    response: Response = make_response(jsonify(data), code, headers)
    return response
Handle requests for fulltext extraction.
Handle requests for fulltext extraction.
Handle requests for fulltext extraction .
def start_extraction(id_type: str, identifier: str) -> Response:
    payload: Optional[dict] = request.get_json()
    force: bool = payload.get('force', False) if payload is not None else False
    token = request.environ['token']
    authorizer: Optional[Authorizer] = None
    if id_type == SupportedBuckets.SUBMISSION:
        authorizer = make_authorizer(scopes.READ_COMPILE)
    data, code, headers = \
        controllers.start_extraction(id_type, identifier, token, force=force,
                                     authorizer=authorizer)
    response: Response = make_response(jsonify(data), code, headers)
    return response
def start_extraction ( id_type : str , identifier : str ) -> Response : payload : Optional [ dict ] = request . get_json ( ) force : bool = payload . get ( 'force' , False ) if payload is not None else False token = request . environ [ 'token' ] authorizer : Optional [ Authorizer ] = None if id_type == SupportedBuckets . SUBMISSION : authorizer = make_authorizer ( scopes . READ_COMPILE ) data , code , headers = controllers . start_extraction ( id_type , identifier , token , force = force , authorizer = authorizer ) response : Response = make_response ( jsonify ( data ) , code , headers ) return response
Handle requests for fulltext extraction.
Handle requests for fulltext extraction .
"""Handle requests for fulltext extraction.""" # Authorization is required to work with submissions.
id_type
str
identifier
str