improve OAuthCredentials import ease of use (#732)

* improve OAuthCredentials import ease of use

* improve OAuthCredentials import ease of use
This commit is contained in:
sigma67 2025-01-31 16:14:06 +01:00 • committed by GitHub
commit 535f153f36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 38 additions and 34 deletions

View file

@ -24,6 +24,8 @@ You will also need to pass ``client_id`` and ``client_secret`` to :py:class:`YTM
.. code-block::
from ytmusicapi import YTMusic, OAuthCredentials
ytmusic = YTMusic('oauth.json', oauth_credentials=OAuthCredentials(client_id=client_id, client_secret=client_secret)
This OAuth flow uses the

View file

@ -23,7 +23,7 @@ After you have created the authentication JSON, you can instantiate the class:
.. code-block:: python
from ytmusicapi import YTMusic
from ytmusicapi import YTMusic, OAuthCredentials
ytmusic = YTMusic("browser.json") # or, alternatively
ytmusic = YTMusic("oauth.json", oauth_credentials=OAuthCredentials(client_id=client_id, client_secret=client_secret)