igdb: auto-refresh twitch token; category -> game_type filter
Static app tokens expire after ~60 days -> every lookup failed with 401. With igdb-client-secret set, the bot fetches the token via client-credentials OAuth itself, refreshes a day before expiry and retries once on 401; a static igdb-access-token still works. IGDB renamed games.category to game_type: the category = 0 filter in search_games silently matched nothing even with a valid token. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ class TestIGDBIntegration(unittest.IsolatedAsyncioTestCase):
|
||||
|
||||
responder = OpenAIResponder(self.config_with_igdb)
|
||||
|
||||
mock_igdb.assert_called_once_with("test_client", "test_token")
|
||||
mock_igdb.assert_called_once_with("test_client", "test_token", client_secret=None)
|
||||
self.assertEqual(responder.igdb, mock_igdb_instance)
|
||||
|
||||
def test_igdb_initialization_disabled(self):
|
||||
|
||||
Reference in New Issue
Block a user