michaelherger / bandcamp-api Goto Github PK
View Code? Open in Web Editor NEWMy attempt at documenting the un-documented bandcamp.com web API.
Home Page: https://michaelherger.github.io/Bandcamp-API/
My attempt at documenting the un-documented bandcamp.com web API.
Home Page: https://michaelherger.github.io/Bandcamp-API/
Bandcamp-API/data/bandcamp.yaml
Lines 194 to 203 in 7c30cfc
The body of the request POST looks the same:
{
"fan_id": 1234,
"older_than_token": "1387353233:2721882214",
"count": 3
}
Except the "older_than_token"
field is very different, this time having two fields ##:##
:
"date_followed": "18 Dec 2013 07:53:53 GMT",
"band_id": 2721882214,
"token": "1387353233:2721882214",
Again the first field is a timestamp, and the second is an id, but this time there is no type or index variable.
Starting fields can be found from <div id="pagedata" data-blob="{JSON HERE}">
on your fan page. Inside the JSON look for .item_cache.following_bands
. I believe any "token"
from there can be used to start a POST
request to /api/fancollection/1/following_bands
Feel free to close this issue without changes if wanted, but I thought it might be nice to have a link to the old bandcamp documentation page as of the final archive:
https://web.archive.org/web/20160512171900/http://bandcamp.com:80/developer
Playing around with chrome inspect on the fan page I found the search box accesses a nice API:
POST JSON to /api/fancollection/1/search_items
request JSON:
{
"fan_id": 1234,
"search_key": "test",
"search_type": "collection"
}
Response JSON:
{
"gifts": [],
"tralbums": [],
"redownload_urls": {},
"search_key": "test",
"item_lookup": {},
"similar_gift_ids": {},
"track_list": []
}
Bandcamp-API/data/bandcamp.yaml
Lines 946 to 954 in 7c30cfc
This is merely discoveries from analysis of API responses on my own collection.
The older_than_token
is broken up into 5 parts separated by :
Example partial response from api/fancollection/1/collection_items
{"items": [{
:
"tralbum_type": "a",
"purchased": "06 Feb 2017 02:16:28 GMT",
"tralbum_id": 3314754897,
"token": "1486347388:3314754897:a:2:",
Here's my understanding of the 5 parts:
"purchased"
this item."tralbum_id"
of the item in question"trablum_type"
of the item in questionSpecifically related to api/fancollection/1/collection_items
:
::...
tralbum_type
is required to not be empty, but any value is fine ::foo:...
::foo::
or ::foo:bar:
says start with the first item, ::foo:50:
says start with the 51st item)A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.