Skip to content

Commit

Permalink
Update/cleanup readme, move example to subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
tehkillerbee committed Jan 26, 2024
1 parent 5264248 commit 6196b93
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 25 deletions.
26 changes: 1 addition & 25 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ Unofficial Python API for TIDAL music streaming service.

Requires Python 3.9 or higher.

0.7.x Migration guide
---------------------
The 0.7.x rewrite is now complete, see the `migration guide <https://tidalapi.netlify.app/migration.html#migrating-from-0-6-x-0-7-x>`_ for dealing with it

Installation
------------

Expand All @@ -29,27 +25,7 @@ Install from `PyPI <https://pypi.python.org/pypi/tidalapi/>`_ using ``pip``:
Example usage
-------------

.. code-block:: python
import tidalapi
session = tidalapi.Session()
# Will run until you visit the printed url and link your account
session.login_oauth_simple()
# Override the required playback quality, if necessary
# Note: Set the quality according to your subscription.
# Normal: Quality.low_320k
# HiFi: Quality.high_lossless
# HiFi+ Quality.hi_res_lossless
session.audio_quality = Quality.low_320k
album = session.album(66236918)
tracks = album.tracks()
for track in tracks:
print(track.name)
for artist in track.artists:
print(' by: ', artist.name)
For examples on how to use the api, see the `examples` directory.

Documentation
-------------
Expand Down
19 changes: 19 additions & 0 deletions examples/simple.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import tidalapi
from tidalapi import Quality

session = tidalapi.Session()
# Will run until you visit the printed url and link your account
session.login_oauth_simple()
# Override the required playback quality, if necessary
# Note: Set the quality according to your subscription.
# Normal: Quality.low_320k
# HiFi: Quality.high_lossless
# HiFi+ Quality.hi_res_lossless
session.audio_quality = Quality.low_320k

album = session.album(66236918)
tracks = album.tracks()
for track in tracks:
print(track.name)
for artist in track.artists:
print(' by: ', artist.name)

0 comments on commit 6196b93

Please sign in to comment.