def get_languages():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    url = f"{base_api_uri}/v1/dictionary/languages"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for languages: url {url}, headers {headers}")
    return response.text
Esempio n. 2
0
def get_metadata_by_id():
    headers = TokenService.get_headers()
    conference_id = dict.get('conferences.conferenceId')
    base_api_uri = dict.get('base.api.uri')
    url = f"{base_api_uri}/v1/conferences/{conference_id}/metadata"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for metadata of conference by id: url {url}, headers {headers}")
    logging.info(f"Params: conferenceId = {conference_id}")
    return response.text
Esempio n. 3
0
def get_metadata_by_polon_uid():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    uid = dict.get('institution.polon.uid')
    url = f"{base_api_uri}/v1/institutions/polon/uid/{uid}"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for metadata of institution by POLON UID: url {url}, headers {headers}")
    logging.info(f"Params: uid = {uid}")
    return response.text
def get_metadata_by_version():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    version = dict.get('publishers.version')
    url = f"{base_api_uri}/v1/publishers/version/{version}"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for metadata of publisher by version: url {url}, headers {headers}")
    logging.info(f"Params: version = {version}")
    return response.text
def get_metadata_by_id():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    publisher_id = dict.get('publishers.publisherId')
    url = f"{base_api_uri}/v1/publishers/{publisher_id}/metadata"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for metadata of publisher by id: url {url}, headers {headers}")
    logging.info(f"Params: publisherId = {publisher_id}")
    return response.text
Esempio n. 6
0
def get_metadata_by_id():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    institution_id = dict.get('institution.id')
    url = f"{base_api_uri}/v1/institutions/{institution_id}/metadata"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for metadata of institution by id: url {url}, headers {headers}")
    logging.info(f"Params: id = {institution_id}")
    return response.text
def add_or_edit_single_publication(publication):
    headers = TokenService.get_headers_with_user_token()
    base_api_uri = dict.get('base.api.uri')
    url = f"{base_api_uri}/v1/publications"
    response = requests.post(url=url, headers=headers, json=publication)
    logging.info(
        f"Sending POST request to add or edit publication: url {url}, headers {headers}"
    )
    return response.text
def get_page_mnisw_year_list():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    page = dict.get('publishers.page')
    size = dict.get('publishers.size')
    url = f"{base_api_uri}/v1/publishers/mnisw/page/yearlist?page={page}&size={size}"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for page of MNiSW publishers with points: url {url}, headers {headers}")
    logging.info(f"Query params: page = {page}, size = {size}")
    return response.text
Esempio n. 9
0
def get_page_polon():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    page = dict.get('institution.page')
    size = dict.get('institution.size')
    url = f"{base_api_uri}/v1/institutions/polon/page?page={page}&size={size}"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for page of POLON institutions: url {url}, headers {headers}")
    logging.info(f"Query params: page = {page}, size = {size}")
    return response.text
Esempio n. 10
0
def get_page_mnisw():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    page = dict.get('conferences.page')
    size = dict.get('conferences.size')
    url = f"{base_api_uri}/v1/conferences/mnisw/page?page={page}&size={size}"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for page of MNiSW conferences: url {url}, headers {headers}")
    logging.info(f"Query params: page = {page}, size = {size}")
    return response.text
def get_metadata_by_doi():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    doi = dict.get('publications.doi')
    url = f"{base_api_uri}/v1/publications/doi?doi={doi}"
    response = requests.get(url=url, headers=headers)
    logging.info(
        f"Sending GET request for metadata of publication by doi: url {url}, headers {headers}"
    )
    logging.info(f"Params: doi = {doi}")
    return response.text
def get_page_by_status():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    page = dict.get('publishers.page')
    size = dict.get('publishers.size')
    status = dict.get('publishers.status')
    url = f"{base_api_uri}/v1/publishers/page?page={page}&size={size}&status={status}"
    response = requests.get(url=url, headers=headers)
    logging.info(f"Sending GET request for page of publishers: url {url}, headers {headers}")
    logging.info(f"Query params: page = {page}, size = {size}, status = {status}")
    return response.text
Esempio n. 13
0
def get_metadata_by_id():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    journal_id = dict.get('journals.journalId')
    url = f"{base_api_uri}/v1/journals/{journal_id}/metadata"
    response = requests.get(url=url, headers=headers)
    logging.info(
        f"Sending GET request for metadata of journal by id: url {url}, headers {headers}"
    )
    logging.info(f"Query params: journalId = {journal_id}")
    return response.text
Esempio n. 14
0
def get_metadata_natural_by_id():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    natural_id = dict.get('person.natural.id')
    url = f"{base_api_uri}/v1/person/natural/{natural_id}"
    response = requests.get(url=url, headers=headers)
    logging.info(
        f"Sending GET request for metadata of person by natural id: url {url}, headers {headers}"
    )
    logging.info(f"Params: id = {natural_id}")
    return response.text
Esempio n. 15
0
def get_extended_metadata_by_id():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    person_id = dict.get('person.id')
    url = f"{base_api_uri}/v1/person/{person_id}"
    response = requests.get(url=url, headers=headers)
    logging.info(
        f"Sending GET request for extended metadata of person by id: url {url}, headers {headers}"
    )
    logging.info(f"Params: id = {person_id}")
    return response.text
Esempio n. 16
0
def get_profile_by_id():
    headers = TokenService.get_headers()
    base_api_uri = dict.get('base.api.uri')
    author_id = dict.get('author.profile.id')
    url = base_api_uri + '/v1/author/' + author_id
    response = requests.get(url=url, headers=headers)
    logging.info(
        f"Sending GET request for author profile by id: url {url}, headers {headers}"
    )
    logging.info(f"Params: id = {author_id}")
    return response.text
Esempio n. 17
0
def get_statements_page():
    headers = TokenService.get_headers_with_user_token()
    base_api_uri = dict.get('base.api.uri')
    page = dict.get('institution.profile.page')
    size = dict.get('institution.profile.size')
    url = f"{base_api_uri}/v1/institutionProfile/publications/page/statements?page={page}&size={size}"
    response = requests.get(url=url, headers=headers)
    logging.info(
        f"Sending GET request for page of statements from institution's profile: url {url}, headers {headers}"
    )
    logging.info(f"Query params: page = {page}, size = {size}")
    return response.text