Skip to main content

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/
Tests PyPI

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'))

>> 0

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'))

>> ['Donda 2', 'Donda', 'JESUS IS KING', 'ye', 'The Life of Pablo', 'Yeezus', 'Watch the Throne', 'My Beautiful Dark Twisted Fantasy', '808s & Heartbreak', 'Graduation', 'Late Registration', 'The College Dropout']

Notice artists also need their unique id along with their name

Each function also is able to return the data in JSON format

from albumoftheyearapi import AOTY

client = AOTY()
print(client.artist_critic_score_json('183-kanye-west'))

>> {"critic_score": "73"}

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

user_ratings(user)
Returns a list of the users ratings
Parameters:

  • user - username

user_perfect_scores(user)
Returns a list of the users perfect scores
Parameters:

  • user - username

user_liked_music(user)
Returns a list of the users liked music
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

album-of-the-year-api-0.2.7.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

album_of_the_year_api-0.2.7-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file album-of-the-year-api-0.2.7.tar.gz.

File metadata

  • Download URL: album-of-the-year-api-0.2.7.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.17

File hashes

Hashes for album-of-the-year-api-0.2.7.tar.gz
Algorithm Hash digest
SHA256 83204da7c03debe5e510303812948d6fa3e751c8ae2d929339423221c112a651
MD5 2640dfa0c6504589a8e09d46741aa61d
BLAKE2b-256 2ef09493bf19ce72555175f1ffbdfbe2db73cda0d63d33b9b5c31ad14e7b3572

See more details on using hashes here.

File details

Details for the file album_of_the_year_api-0.2.7-py3-none-any.whl.

File metadata

File hashes

Hashes for album_of_the_year_api-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0d0bbfd1f112d0d146ef2c1d5c0b9a11e1d1c81c345a4fef9d576b34dc9f7a32
MD5 5c3abce7cdfb91edff8d77af63a4d1fc
BLAKE2b-256 ef563f9e660cc8de5a4340926e3b3d2d43af2515d3f012c39da76b0fedc99004

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page