Skip to content

API wrapper for querying band, album, and track data from bandcamp.com

License

Notifications You must be signed in to change notification settings

scriptkittie/bandcamp-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bandcamp-api

Build Status

Overview

Bandcamp-api is API wrapper written in JAVA to retrieve Bandcamp band, album, and track metadata. It utilizes an underlying existing JSON API framework which pre-exists within bandcamp which is also how the website retrieves its data. This project also provides an easy way to execute asynchronous requests against the API.

Changelog

Open spoiler to view changelog

1.0.0

  • Initial release.

Installation

Install from Maven Central

Just add the following dependencies to your maven pom.xml

<dependency>
    <groupId>io.laniakia</groupId>
    <artifactId>bandcamp-api</artifactId>
    <version>1.0.0</version>
</dependency>

Example Usage

Search Endpoint

Config details on the current bandcamp search REST endpoint are stored in /resources/config.xml

Initialize BandcampAPI With Default Threadcount

import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();

Initialize BandcampAPI With Custom Thread Count

import io.laniakia.core.BandcampAPI;
...
int threadPoolCount = 4;
BandcampAPI bandCampObj = new BandcampAPI(threadPoolCount);

Band Search Options

import io.laniakia.core.BandcampAPI;
...
int threadPoolCount = 4;
boolean useThreads = true;
boolean searchMultiplePages = true
BandcampAPI bandCampObj = new BandcampAPI(threadPoolCount);
bandCampObj.searchBand("parallels", searchMultiplePages, useThreads);

Search Bands With Asynchronous Requests

import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();
bandCampObj.searchBand("parallels", true, true);

Search Only First Page Of Results

import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();
bandCampObj.searchBand("parallels", false, true);

Other API Calls

import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();
bandCampObj.searchBand("parallels", false, true);
//Query specific band
bandCampObj.getBand("https://parallels.bandcamp.com/");
//Query album by URL
bandCampObj.getAlbum("https://parallels.bandcamp.com/album/visionaries");
//Query by band and album
bandCampObj.getAlbum("Parallels", "Visionaries");

Install from Source

Clone from remote repository then mvn install. All of the modules will be installed to your local maven repository.

git clone https://github.com/scriptkittie/bandcamp-api.git
cd bandcamp-api
mvn install

Issues/Forks

Please report any issues to the issues section & as always if you have any functionality requests go ahead and open an issue containing your suggestions.

If you have an addition to the project, fork it and submit a pull request. Any type of contributions are welcome.

Credits

Package written by StCypher

API calls made to Bandcamp

About

API wrapper for querying band, album, and track data from bandcamp.com

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages