Skip to content

Commit

Permalink
Partially finished refactoring TIDAL APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
bbye98 committed Nov 2, 2023
1 parent b0f93d5 commit 6eb24ca
Show file tree
Hide file tree
Showing 39 changed files with 12,056 additions and 6,305 deletions.
Binary file modified docs/.doctrees/api/minim.audio.Audio.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.audio.FLACAudio.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.audio.MP3Audio.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.audio.MP4Audio.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.audio.OGGAudio.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.audio.WAVEAudio.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.spotify.PrivateLyricsService.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.spotify.WebAPI.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.spotify.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.tidal.API.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.tidal.PrivateAPI.doctree
Binary file not shown.
Binary file modified docs/.doctrees/api/minim.tidal.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
14 changes: 9 additions & 5 deletions docs/_modules/minim/audio.html
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,10 @@ <h1>Source code for minim.audio</h1><div class="highlight"><pre>

<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Populate tags using data retrieved from the iTunes Store API.</span>
<span class="sd"> </span>
<span class="sd"> .. attention::</span>

<span class="sd"> This method is pending a major refactor. </span>

<span class="sd"> Parameters</span>
<span class="sd"> ----------</span>
Expand Down Expand Up @@ -1044,7 +1048,7 @@ <h1>Source code for minim.audio</h1><div class="highlight"><pre>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>

<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Populate tags using data retrieved from the Spotify APIs.</span>
<span class="sd"> Populate tags using data retrieved from the Spotify Web API.</span>

<span class="sd"> .. attention::</span>

Expand All @@ -1055,18 +1059,18 @@ <h1>Source code for minim.audio</h1><div class="highlight"><pre>
<span class="sd"> data : `dict`</span>
<span class="sd"> Information about the track in JSON format obtained using</span>
<span class="sd"> the Spotify Web API via </span>
<span class="sd"> :meth:`minim.spotify.WebAPISession.get_track`.</span>
<span class="sd"> :meth:`minim.spotify.WebAPI.get_track`.</span>

<span class="sd"> audio_features : `dict`, keyword-only, optional</span>
<span class="sd"> Information about the track&#39;s audio features obtained using</span>
<span class="sd"> the Spotify Web API via</span>
<span class="sd"> :meth:`minim.spotify.WebAPISession.get_track_audio_features`.</span>
<span class="sd"> :meth:`minim.spotify.WebAPI.get_track_audio_features`.</span>
<span class="sd"> If not provided, tempo information is unavailable.</span>

<span class="sd"> lyrics : `str` or `dict`, keyword-only</span>
<span class="sd"> Information about the track&#39;s formatted or time-synced</span>
<span class="sd"> lyrics obtained using the Spotify Lyrics API via </span>
<span class="sd"> :meth:`minim.spotify.LyricsAPISession.get_lyrics`. If not</span>
<span class="sd"> :meth:`minim.spotify.PrivateLyricsService.get_lyrics`. If not</span>
<span class="sd"> provided, lyrics are unavailable.</span>

<span class="sd"> overwrite : `bool`, keyword-only, default: :code:`False`</span>
Expand Down Expand Up @@ -1113,7 +1117,7 @@ <h1>Source code for minim.audio</h1><div class="highlight"><pre>
<span class="n">overwrite</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">False</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="w"> </span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Populate tags using data retrieved from the TIDAL API.</span>
<span class="sd"> Populate tags using data retrieved from the private TIDAL API.</span>

<span class="sd"> .. attention::</span>

Expand Down
153 changes: 85 additions & 68 deletions docs/_modules/minim/spotify.html

Large diffs are not rendered by default.

6,748 changes: 4,362 additions & 2,386 deletions docs/_modules/minim/tidal.html

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/_sources/api/minim.spotify.WebAPI.rst.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WebAPI
WebAPI
======

.. currentmodule:: minim.spotify
Expand Down Expand Up @@ -45,8 +45,6 @@ WebAPI
~WebAPI.get_category_playlists
~WebAPI.get_chapter
~WebAPI.get_chapters
~WebAPI.get_current_user_playlists
~WebAPI.get_current_user_profile
~WebAPI.get_currently_playing
~WebAPI.get_devices
~WebAPI.get_episode
Expand All @@ -60,6 +58,9 @@ WebAPI
~WebAPI.get_playlist
~WebAPI.get_playlist_cover_image
~WebAPI.get_playlist_items
~WebAPI.get_playlists
~WebAPI.get_profile
~WebAPI.get_queue
~WebAPI.get_recently_played
~WebAPI.get_recommendations
~WebAPI.get_related_artists
Expand All @@ -72,15 +73,14 @@ WebAPI
~WebAPI.get_show
~WebAPI.get_show_episodes
~WebAPI.get_shows
~WebAPI.get_top_items
~WebAPI.get_track
~WebAPI.get_track_audio_analysis
~WebAPI.get_track_audio_features
~WebAPI.get_tracks
~WebAPI.get_tracks_audio_features
~WebAPI.get_user_playlists
~WebAPI.get_user_profile
~WebAPI.get_user_queue
~WebAPI.get_user_top_items
~WebAPI.pause_playback
~WebAPI.remove_playlist_items
~WebAPI.remove_saved_albums
Expand Down
13 changes: 7 additions & 6 deletions docs/_sources/api/minim.tidal.PrivateAPI.rst.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PrivateAPI
PrivateAPI
==========

.. currentmodule:: minim.tidal
Expand Down Expand Up @@ -47,21 +47,22 @@ PrivateAPI
~PrivateAPI.get_blocked_artists
~PrivateAPI.get_blocked_users
~PrivateAPI.get_country_code
~PrivateAPI.get_created_playlist_folders
~PrivateAPI.get_created_playlists
~PrivateAPI.get_favorite_albums
~PrivateAPI.get_favorite_artists
~PrivateAPI.get_favorite_ids
~PrivateAPI.get_favorite_mixes
~PrivateAPI.get_favorite_tracks
~PrivateAPI.get_favorite_videos
~PrivateAPI.get_image
~PrivateAPI.get_me
~PrivateAPI.get_mix_items
~PrivateAPI.get_mix_page
~PrivateAPI.get_my_playlists
~PrivateAPI.get_playlist
~PrivateAPI.get_playlist_etag
~PrivateAPI.get_playlist_items
~PrivateAPI.get_playlist_recommendations
~PrivateAPI.get_profile
~PrivateAPI.get_session
~PrivateAPI.get_streams
~PrivateAPI.get_track
Expand All @@ -73,20 +74,20 @@ PrivateAPI
~PrivateAPI.get_track_playback_info
~PrivateAPI.get_track_recommendations
~PrivateAPI.get_track_stream
~PrivateAPI.get_user
~PrivateAPI.get_user_favorites
~PrivateAPI.get_user_followers
~PrivateAPI.get_user_following
~PrivateAPI.get_user_playlist
~PrivateAPI.get_user_playlists
~PrivateAPI.get_user_public_playlists
~PrivateAPI.get_user_profile
~PrivateAPI.get_video
~PrivateAPI.get_video_page
~PrivateAPI.get_video_playback_info
~PrivateAPI.get_video_stream
~PrivateAPI.move_playlist
~PrivateAPI.move_playlist_item
~PrivateAPI.search
~PrivateAPI.set_access_token
~PrivateAPI.set_authorization_flow
~PrivateAPI.set_playlist_privacy
~PrivateAPI.unblock_artist
~PrivateAPI.unblock_user
Expand Down
18 changes: 11 additions & 7 deletions docs/api/minim.audio.Audio.html

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/api/minim.audio.FLACAudio.html

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/api/minim.audio.MP3Audio.html

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/api/minim.audio.MP4Audio.html

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/api/minim.audio.OGGAudio.html

Large diffs are not rendered by default.

18 changes: 11 additions & 7 deletions docs/api/minim.audio.WAVEAudio.html

Large diffs are not rendered by default.

25 changes: 16 additions & 9 deletions docs/api/minim.spotify.PrivateLyricsService.html
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ <h1>PrivateLyricsService<a class="headerlink" href="#privatelyricsservice" title
<dt class="sig sig-object py" id="minim.spotify.PrivateLyricsService">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">minim.spotify.</span></span><span class="sig-name descname"><span class="pre">PrivateLyricsService</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">sp_dc</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">access_token</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><span class="pre">str</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">expiry</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/typing.html#typing.Union" title="(in Python v3.12)"><span class="pre">Union</span></a><span class="p"><span class="pre">[</span></span><a class="reference external" href="https://docs.python.org/3/library/datetime.html#datetime.datetime" title="(in Python v3.12)"><span class="pre">datetime</span></a><span class="p"><span class="pre">,</span></span><span class="w"> </span><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.12)"><span class="pre">str</span></a><span class="p"><span class="pre">]</span></span></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">save</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.12)"><span class="pre">bool</span></a></span><span class="w"> </span><span class="o"><span class="pre">=</span></span><span class="w"> </span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/minim/spotify.html#PrivateLyricsService"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#minim.spotify.PrivateLyricsService" title="Permalink to this definition">#</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<p>Spotify Lyrics service object.</p>
<p>Spotify Lyrics service client.</p>
<p>The Spotify Lyrics service, which is powered by Musixmatch (or
PetitLyrics in Japan), provides line- or word-synced lyrics for
Spotify tracks when available. The Spotify Lyrics interface is not
Expand All @@ -266,6 +266,11 @@ <h1>PrivateLyricsService<a class="headerlink" href="#privatelyricsservice" title
be provided to this class’s constructor as a keyword argument or be
stored as <code class="code docutils literal notranslate"><span class="pre">SPOTIFY_SP_DC</span></code> in the operating system’s
environment variables.</p>
<div class="admonition hint">
<p class="admonition-title">Hint</p>
<p>The <code class="code docutils literal notranslate"><span class="pre">sp_dc</span></code> cookie can be extracted from the local storage
of your web browser after you log into Spotify.</p>
</div>
<p>If an existing access token is available, it and its expiry time can
be provided to this class’s constructor as keyword arguments to
bypass the access token exchange process. It is recommended that all
Expand All @@ -290,16 +295,16 @@ <h1>PrivateLyricsService<a class="headerlink" href="#privatelyricsservice" title
variables or found in the Minim configuration file, it must be
provided here.</p>
</dd>
<dt><strong>access_token</strong><span class="classifier"><cite>str</cite>, keyword-only, optional</span></dt><dd><p>Access token. If provided or found in the Minim configuration
file, the authentication process is bypassed. In the former
case, all other relevant keyword arguments should be specified
to automatically refresh the access token when it expires.</p>
<dt><strong>access_token</strong><span class="classifier"><cite>str</cite>, keyword-only, optional</span></dt><dd><p>Access token. If provided here or found in the Minim
configuration file, the authentication process is bypassed. In
the former case, all other relevant keyword arguments should be
specified to automatically refresh the access token when it
expires.</p>
</dd>
<dt><strong>expiry</strong><span class="classifier"><cite>datetime.datetime</cite> or <cite>str</cite>, keyword-only, optional</span></dt><dd><p>Expiry time of <cite>access_token</cite> in the ISO 8601 format
<code class="code docutils literal notranslate"><span class="pre">%Y-%m-%dT%H:%M:%SZ</span></code>. If provided, the user will be
reauthenticated using <cite>refresh_token</cite> (if available) or the
specified authorization flow (if possible) when <cite>access_token</cite>
expires.</p>
reauthenticated using the default authorization flow (if
possible) when <cite>access_token</cite> expires.</p>
</dd>
<dt><strong>save</strong><span class="classifier"><cite>bool</cite>, keyword-only, default: <code class="code docutils literal notranslate"><span class="pre">True</span></code></span></dt><dd><p>Determines whether newly obtained access tokens and their
associated properties are stored to the Minim configuration
Expand All @@ -313,6 +318,8 @@ <h1>PrivateLyricsService<a class="headerlink" href="#privatelyricsservice" title
</dd>
<dt><strong>TOKEN_URL</strong><span class="classifier"><cite>str</cite></span></dt><dd><p>URL for the Spotify Web Player access token endpoint.</p>
</dd>
<dt><strong>session</strong><span class="classifier"><cite>requests.Session</cite></span></dt><dd><p>Session used to send requests to the Spotify Lyrics service.</p>
</dd>
</dl>
</dd>
</dl>
Expand Down Expand Up @@ -378,7 +385,7 @@ <h1>PrivateLyricsService<a class="headerlink" href="#privatelyricsservice" title
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><dl>
<dt><strong>id</strong><span class="classifier"><cite>str</cite></span></dt><dd><p>The Spotify ID for the track.</p>
<p><strong>Example</strong>: <code class="code docutils literal notranslate"><span class="pre">&quot;11dFghVXANMlKmJXsNCbNl&quot;</span></code>.</p>
<p><strong>Example</strong>: <code class="code docutils literal notranslate"><span class="pre">&quot;0VjIjW4GlUZAMYd2vXMi3b&quot;</span></code>.</p>
</dd>
</dl>
</dd>
Expand Down
Loading

0 comments on commit 6eb24ca

Please sign in to comment.