https://github.com/saschpe/android-discogs
Discogs API client for Android
https://github.com/saschpe/android-discogs
android android-library bintray discogs kotlin travis-ci
Last synced: 28 days ago
JSON representation
Discogs API client for Android
- Host: GitHub
- URL: https://github.com/saschpe/android-discogs
- Owner: saschpe
- License: apache-2.0
- Created: 2018-01-27T21:30:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-02-06T16:03:31.000Z (over 8 years ago)
- Last Synced: 2025-03-29T07:44:08.412Z (about 1 year ago)
- Topics: android, android-library, bintray, discogs, kotlin, travis-ci
- Language: Kotlin
- Size: 79.1 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Discogs API client for Android
[](https://bintray.com/saschpe/maven/android-discogs/_latestVersion)
[](http://www.apache.org/licenses/LICENSE-2.0.html)
[](https://travis-ci.org/saschpe/android-discogs)

This Java / Android library provides access to the Discogs API using *Retrofit*. Currently supports *Discogs Authentication* and a bunch of API queries. You can find the full Discogs API description here:
- https://www.discogs.com/developers
# Usage
To interact with Discog's API, create a new *Discogs* instance with your key and secret (See https://www.discogs.com/settings/developers). You can then access various API routes such as **database** or **release** like this (in Kotlin):
```kotlin
val discogs = Discogs("my-user-agent", key = "my-key", secret = "my-secret")
// Search the Discogs database for album / artist...
discogs.database
.search(hashMapOf(
SEARCH_ARTIST to "Nine Inch Nails",
SEARCH_TRACK to "La Mer"))
.enqueue(object : Callback {
override fun onFailure(call: Call, t: Throwable) {}
override fun onResponse(call: Call, response: Response) {
val search = response.body()
// Do something with the search result...
})
// Query a particular release...
discogs.release
.release("123141231")
.enqueue(object : Callback {
override fun onFailure(call: Call, t: Throwable) {}
override fun onResponse(call: Call, response: Response) {
val release = response.body()
})
```
# Download
```groovy
implementation 'saschpe.android:discogs:0.1.3'
```
Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap].
# Users
* [Alpha+ Player](https://play.google.com/store/apps/details?id=saschpe.alphaplus)
# License
Copyright 2018 Sascha Peilicke
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
[snap]: https://oss.sonatype.org/content/repositories/snapshots/