add IGDB token refresh in configuration

This commit is contained in:
Te Llamas 2022-11-02 06:23:41 +00:00
parent 0aca28304d
commit 7329638567

View file

@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
import requests
import psycopg2.extensions
from git import Repo
@ -299,7 +300,8 @@ GOOGLE_API_KEY = 'deadbeef-deadbeef-deadbeef'
# IGDB
IGDB_CLIENT_ID = 'deadbeef'
IGDB_ACCESS_TOKEN = 'deadbeef'
IGDB_CLIENT_SECRET = 'deadbeef'
IGDB_ACCESS_TOKEN = requests.post(f'https://id.twitch.tv/oauth2/token?client_id={IGDB_CLIENT_ID}&client_secret={IGDB_CLIENT_SECRET}&grant_type=client_credentials').json()['access_token']
# Thumbnail setting
# It is possible to optimize the image size even more: https://easy-thumbnails.readthedocs.io/en/latest/ref/optimize/