Add discogs api key

This commit is contained in:
qilinz 2023-02-03 18:29:51 +01:00 committed by Henri Dickson
parent 9b89f0d5f3
commit f4a501e34e
2 changed files with 5 additions and 1 deletions

View file

@ -310,6 +310,10 @@ TMDB_API3_KEY = "***REMOVED***"
# Google Books API Key
GOOGLE_API_KEY = "***REMOVED***"
# Discogs API Key
# How to get: a personal access token from https://www.discogs.com/settings/developers
DISCOGS_API_KEY = "***REMOVED***"
# IGDB
IGDB_CLIENT_ID = "deadbeef"
IGDB_CLIENT_SECRET = "deadbeef"

View file

@ -122,7 +122,7 @@ def get_discogs_data(data_type: str, discogs_id):
if data_type not in ("releases", "masters"):
raise ValueError("data_type can only be in ('releases' or masters')")
user_agent_string = "Neodb/0.1"
user_token = settings.DISCOGS_TOKEN
user_token = settings.DISCOGS_API_KEY
headers = {
"User-Agent": user_agent_string,
"Authorization": f"Discogs token={user_token}",