https://github.com/scriptkittie/bandcamp-api
API wrapper for querying band, album, and track data from bandcamp.com
https://github.com/scriptkittie/bandcamp-api
api bandcamp bestcodeever gson java json maven unittesting
Last synced: 9 months ago
JSON representation
API wrapper for querying band, album, and track data from bandcamp.com
- Host: GitHub
- URL: https://github.com/scriptkittie/bandcamp-api
- Owner: scriptkittie
- License: gpl-3.0
- Created: 2017-04-02T01:08:09.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-12-02T04:18:09.000Z (over 7 years ago)
- Last Synced: 2023-07-04T15:13:13.188Z (almost 3 years ago)
- Topics: api, bandcamp, bestcodeever, gson, java, json, maven, unittesting
- Language: Java
- Homepage:
- Size: 43.9 KB
- Stars: 31
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.MD
- License: LICENSE.MD
Awesome Lists containing this project
README
## bandcamp-api
[](https://travis-ci.org/scriptkittie/bandcamp-api)
### 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
```xml
io.laniakia
bandcamp-api
1.0.0
```
## Example Usage
**Search Endpoint**
Config details on the current bandcamp search REST endpoint are stored in /resources/config.xml
**Initialize BandcampAPI With Default Threadcount**
```java
import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();
```
**Initialize BandcampAPI With Custom Thread Count**
```java
import io.laniakia.core.BandcampAPI;
...
int threadPoolCount = 4;
BandcampAPI bandCampObj = new BandcampAPI(threadPoolCount);
```
**Band Search Options**
```java
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**
```java
import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();
bandCampObj.searchBand("parallels", true, true);
```
**Search Only First Page Of Results**
```java
import io.laniakia.core.BandcampAPI;
...
BandcampAPI bandCampObj = new BandcampAPI();
bandCampObj.searchBand("parallels", false, true);
```
**Other API Calls**
```java
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.
~~~bash
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](https://twitter.com/yo_scriptkittie/with_replies)
API calls made to [Bandcamp](https://bandcamp.com/)