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/

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, according to https://www.albumoftheyear.org/robots.txt, searching and POST requests are not allowed.

Installation

Usage

</code></pre>
<p>or upgrade</p>
<pre lang="pip"><code>

Examples

Here's a quick example of getting a specific users follower count

client = AOTY()
print_num_of_followers('doublez')

def print_num_of_followers(user):
    print(client.user_followers(user))

If you don't need the full functionality, you can also import only the neccesary files

client = ArtistMethods
print_all_artist_albums('183-kanye-west')

def print_all_artist_albums(artist):
    print(client.artist_albums(artist))

Notice artists also need their unique id along with their name

Artist Methods

artist_albums(artist)
Returns all albums by an artist
Parameters:

  • artist - artist id and name

artist_mixtapes(artist)
Returns all mixtapes by an artist
Parameters:

  • artist - artist id and name

artist_eps(artist)
Returns all eps by an artist
Parameters:

  • artist - artist id and name

User Methods

user_ratings(user)
Returns the number of ratings by a user
Parameters:

  • user - username

user_reviews(user)
Returns the number of reviews by a user
Parameters:

  • user - username

user_lists(user)
Returns the number of lists by a user
Parameters:

  • user - username

user_followers(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

album-of-the-year-api-0.2.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

album_of_the_year_api-0.2.1-py3-none-any.whl (2.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: album-of-the-year-api-0.2.1.tar.gz
  • Upload date:
  • Size: 2.3 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

Hashes for album-of-the-year-api-0.2.1.tar.gz
Algorithm Hash digest
SHA256 98f5b37941ca3388017b6796b621173def9b62b78deda0270584ecb885308888
MD5 0a9a03df57ef86e4cde3a59fc244c1ce
BLAKE2b-256 f564edc30e716815cb47ec2347e9c28249632c3e0d69e1c64d2fd78d274646d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: album_of_the_year_api-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 2.0 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

Hashes for album_of_the_year_api-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 97e9c9eb31e9477af4e53a2a139e1330cdb3cfa9e2c990735ed492aae734b1ff
MD5 b95e87a1eddce9ecee8fca493941e174
BLAKE2b-256 92bd2bbe3e023cbceb66e4f58849d9da0f13e4fe3ca95145653bab93bcd9a78b

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