A light weight Python library that acts as an API for the website albumoftheyear.org
Project description
AlbumOfTheYearWrapper
A light weight python library that acts as an API for https://www.albumoftheyear.org/
Description
Gets data from https://www.albumoftheyear.org/. The website doesn't currently provide API support so web parsing is required to obtain data. Because of this, and according to https://www.albumoftheyear.org/robots.txt, searching and POST requests are not allowed.
Installation
pip install album-of-the-year-api
or upgrade
pip install album-of-the-year-api --upgrade
Usage
Examples
Here's a quick example of getting a specific users follower count
from albumoftheyearapi import AOTY
client = AOTY()
print(client.user_follower_count('jahsias'))
If you don't need the full functionality, you can also import only the neccesary files
from albumoftheyearapi.artist import ArtistMethods
client = ArtistMethods()
print(client.artist_albums('183-kanye-west'))
Notice artists also need their unique id along with their name
Methods
Artist Methods
artist_albums(artist)
Returns a list of all albums by an artist
Parameters:
- artist - artist id and name
artist_mixtapes(artist)
Returns a list of all mixtapes by an artist
Parameters:
- artist - artist id and name
artist_eps(artist)
Returns a list of all eps by an artist
Parameters:
- artist - artist id and name
artist_singles(artist)
Returns a list of all singles by an artist
Parameters:
- artist - artist id and name
artist_name(artist)
Returns the name of the artist
Parameters:
- artist - artist id and name
artist_critic_score(artist)
Returns the critic score of the artist
Parameters:
- artist - artist id and name
artist_user_score(artist)
Returns the user score of the artist
Parameters:
- artist - artist id and name
artist_total_score(artist)
Returns the average of the critic and users score of the artist
Parameters:
- artist - artist id and name
artist_follower_count(artist)
Returns the follower count of the artist
Parameters:
- artist - artist id and name
artist_details(artist)
Returns the detials of the artist
Parameters:
- artist - artist id and name
artist_top_songs(artist)
Returns a list of the top songs of the artist
Parameters:
- artist - artist id and name
similar_artists(artist)
Returns a list of similar artists to the given artist
Parameters:
- artist - artist id and name
User Methods
user_rating_count(user)
Returns the number of ratings by a user
Parameters:
- user - username
user_review_count(user)
Returns the number of reviews by a user
Parameters:
- user - username
user_list_count(user)
Returns the number of lists by a user
Parameters:
- user - username
user_follower_count(user)
Returns the number of followers a user has
Parameters:
- user - username
user_about(user)
Returns the about page of a user
Parameters:
- user - username
user_rating_distribution(user)
Returns a list of a users rating distribution
Parameters:
- user - username
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file album-of-the-year-api-0.2.5.tar.gz
.
File metadata
- Download URL: album-of-the-year-api-0.2.5.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6772446843e7ce8e15fa6cf14e3f3e123358a463afaf21efb931eb72360e15d0 |
|
MD5 | f266d029b2ecc2d93f2c9607f841e45a |
|
BLAKE2b-256 | 20025839fef377a9e28008d9660d255229851000b2c31c3124a904d09758017a |
File details
Details for the file album_of_the_year_api-0.2.5-py3-none-any.whl
.
File metadata
- Download URL: album_of_the_year_api-0.2.5-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4863c68e5ec2aab12bed517dd6ca830df48ff96e6de36796695930a9769d8dc1 |
|
MD5 | 01f693943666935e2c9081c8970f65f6 |
|
BLAKE2b-256 | 458bd862e2c58acde4ed193db1d4528d23176414c06d6c8bd0f2a315f181ed0d |