python-hearthis
Unofficial Python library for hearthis.io API https://hearthis.at/api-v2/
Dependencies
- Requests - package required for making requests
Installation
If you already have Python on your system you can install the library simply by downloading the distribution, unpack it and install in the usual fashion:
python setup.py install
You can also install it using a popular package manager with
pip install python-hearthis
Quick Start
import hearthis
kwargs = {
"email": "foo@bar.com",
"password": "foobar"
}
heart = hearthis.Hearthis(**kwargs)
Available APIs
- Feed
# returns hearthis user feed
response = heart.feed()
| Parameter | Value | Default | Description |
|---|---|---|---|
| page | int | 1 | page to how |
| count | int | 5 | entries per page (max: 20) |
| duration | int | - | duration (+/- 5 minutes) |
| type | str | - | [empty] / popular / new |
| category | str | - | [empty] / house / drumandbass / etc. - see genre API |
| show_feed_start | str | 2019-04-10 | Start Date |
| show_feed_end | str | 2019-04-17 | End Date |
- All Genres
response = heart.all_genres()
- Genre List
response = heart.genre_list()
| Parameter | Value | Default | Description |
|---|---|---|---|
| genre | str | - | Genre from All Genres API |
| page | int | 1 | page to how |
| count | int | 5 | entries per page (max: 20) |
| duration | int | - | duration (+/- 5 minutes) |
- Single Artist
response = heart.artist()
- Single Artist Follow/Unfollow
response = heart.artist_follow_unfollow()
| Parameter | Value | Default | Description |
|---|---|---|---|
| artist_id | int | - | ID of artist |
- Artist List
response = heart.artist_list()
| Parameter | Value | Default | Description |
|---|---|---|---|
| artist | str | 1 | Artist username |
| type | str | ["tracks", "user", "playlists"] | |
| page | int | 1 | page to how |
| count | int | 5 | entries per page (max: 20) |
- Track
response = heart.track()
| Parameter | Value | Default | Description |
|---|---|---|---|
| track_uri | str | - | Track URI |
- Track Like/Unlike
response = heart.track_like_unlike()
| Parameter | Value | Default | Description |
|---|---|---|---|
| track_id | int | - | ID of track |
- Add Playlist
response = heart.add_playlist()
| Parameter | Value | Default | Description |
|---|---|---|---|
| name | str | - | Name of track |
| track_id | int | - | ID of track (optional) |
- Add Existing playlist track
response = heart.add_playlist_track()
| Parameter | Value | Default | Description |
|---|---|---|---|
| playlist_id | int | - | ID of playlist |
| track_id | int | - | ID of track |
- Delete Track and Playlist
response = heart.delete_playlist()
| Parameter | Value | Default | Description |
|---|---|---|---|
| playlist_id | int | - | ID of playlist |
| track_id | int | - | ID of track (optional) |
Metadata
Release files for python-hearthis 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python-hearthis-1.0.1.tar.gz | 3.8 kB | Without provenance | Details for python-hearthis-1.0.1.tar.gz |
Release files / python-hearthis-1.0.1.tar.gz
| Download URL | python-hearthis-1.0.1.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
63900c6fb3241a8b3bc30bb668f84bac6d42468385d142ddf915ae34c4959636
|
|
BLAKE2b-256 checksum How to use checksums |
90a99df2c4f409fdac3253a1acf34fa1badedf60b29bde85a80d4f54c5fbb07f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Security for python-hearthis 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.