Skip to content

0.1.0: Bandcamp Personal Music Feed

Choose a tag to compare

@github-actions github-actions released this 16 Mar 09:00
· 10 commits to refs/heads/main since this release

New Features ⚡

  • Add fan_dash_feed_updates endpoint support by @teancom in #18

Music Feed

The get_feed() method retrieves a personalized music feed containing new releases from followed artists, fan purchases, and fan picks. This endpoint requires authentication - you must provide an identity token.

import asyncio
from bandcamp_async_api import BandcampAPIClient, BandcampMustBeLoggedInError

async def main():
    async with BandcampAPIClient(identity_token='your_identity_token') as client:
        # Get your music feed
        feed = await client.get_feed()
        print(f"New stories: {len(feed.stories)}")
        print(f"Has more: {feed.has_more}")

        # Iterate through feed stories
        for story in feed.stories:
            print(f"  - {story.story_type}: {story.item_title} by {story.band_name}")

        # Access tracks with streaming URLs
        for track in feed.track_list:
            print(f"  Track: {track.title} - {track.streaming_url}")

        # Paginate through older stories
        if feed.has_more and feed.oldest_story_date:
            older_feed = await client.get_feed(older_than=feed.oldest_story_date)
            print(f"Older stories: {len(older_feed.stories)}")

if __name__ == '__main__':
    asyncio.run(main())

Feed Story Types

The feed contains different story types:

  • np - New track/track release
  • nr - New album release
  • p - Fan purchase
  • fp - Fan pick

Error Handling

The feed endpoint requires authentication. If you try to access it without an identity token, you'll receive a BandcampMustBeLoggedInError:

from bandcamp_async_api import BandcampAPIClient, BandcampMustBeLoggedInError

async def safe_get_feed():
    client = BandcampAPIClient()  # No identity token
    try:
        feed = await client.get_feed()
    except BandcampMustBeLoggedInError:
        print("Feed requires authentication - provide an identity token")

Maintenance ⚙️

  • [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci[bot] in #16
  • chore(deps): bump release-drafter/release-drafter from 6 to 7 by @dependabot[bot] in #17

Full Changelog: 0.0.9...0.1.0