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.6.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

album_of_the_year_api-0.2.6-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: album-of-the-year-api-0.2.6.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.6.tar.gz
Algorithm Hash digest
SHA256 2b0c45bf575ae4eac19081314958be49e2185d252cb86e6d31e56ac435be2c01
MD5 60f6f47f10a27949209b24523bfc265c
BLAKE2b-256 14dee6daa0748e1123600afe0c2cd5c25e39ebbc6d379e39ae1535ca44e9a1af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for album_of_the_year_api-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4b00140272cfe0172c8e82de0f2696946257a054ff39a918992b57d71520e2af
MD5 571911bef189beed2c6c462356b159b7
BLAKE2b-256 e886557fa0e966757042b9405f8fa858d29f48818241155b1cf9e0e18bc6b36f

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