diff --git a/folioclient/FolioClient.py b/folioclient/FolioClient.py index 8b88e02..a7a0dce 100644 --- a/folioclient/FolioClient.py +++ b/folioclient/FolioClient.py @@ -28,6 +28,7 @@ RAML_UTIL_URL = "https://raw.githubusercontent.com/folio-org/raml/raml1.0" +USER_AGENT_STRING = "Folio Client (https://github.com/FOLIO-FSE/FolioClient)" class FolioClient: """handles communication and getting values from FOLIO""" @@ -444,7 +445,7 @@ def get_latest_from_github( ): # noqa: S107 github_headers = { "content-type": CONTENT_TYPE_JSON, - "User-Agent": "Folio Client (https://github.com/FOLIO-FSE/FolioClient)", + "User-Agent": USER_AGENT_STRING,", } if personal_access_token: github_headers["authorization"] = f"token {personal_access_token}" @@ -487,7 +488,7 @@ def get_from_github( version = self.get_module_version(repo) github_headers = { "content-type": CONTENT_TYPE_JSON, - "User-Agent": "Folio Client (https://github.com/FOLIO-FSE/FolioClient)", + "User-Agent": USER_AGENT_STRING, } if personal_access_token: github_headers["authorization"] = f"token {personal_access_token}" @@ -535,7 +536,7 @@ def fetch_github_schema(schema_url): """ github_headers = { "content-type": CONTENT_TYPE_JSON, - "User-Agent": "Folio Client (https://github.com/FOLIO-FSE/FolioClient)", + "User-Agent": USER_AGENT_STRING, "Authorization": f"token {os.environ.get('GITHUB_TOKEN', '')}", } schema_response = httpx.get(