Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matthiasreumann/google-books-api
A wrapper of the Google Books APIs written in Kotlin
https://github.com/matthiasreumann/google-books-api
google-books-api google-books-search kotlin
Last synced: 26 days ago
JSON representation
A wrapper of the Google Books APIs written in Kotlin
- Host: GitHub
- URL: https://github.com/matthiasreumann/google-books-api
- Owner: MatthiasReumann
- License: mit
- Created: 2021-08-04T10:16:54.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-09T08:11:15.000Z (over 3 years ago)
- Last Synced: 2024-10-15T22:41:10.052Z (3 months ago)
- Topics: google-books-api, google-books-search, kotlin
- Language: Kotlin
- Homepage:
- Size: 105 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# googlebooksapi
[![](https://jitpack.io/v/MatthiasReumann/googlebooksapi.svg)](https://jitpack.io/#MatthiasReumann/googlebooksapi)A wrapper of the [Google Books APIs](https://developers.google.com/books) written in Kotlin
## Usage
### Volumes
```kotlin
val volumeHelper = VolumeHelper("API_KEY")
```###### Get volumes
```kotlin
val request = VolumeGetRequest().apply {
search("Plants")
intitle("This is your mind on plants")
inpublisher("Penguin")
inauthor("Michael Pollan")
langRestrict("en")
maxResults(1)
orderBy(SortOption.NEWEST)
printType(PrintTypeOption.BOOKS)
projection(ProjectionOption.LITE)
startIndex(0)
}val volumes: Volume = volumeHelper.get(request)
```###### Get specific volume
```kotlin
val request = VolumeGetIDRequest().apply {
volumeID("zKkdEAAAQBAJ")
projection(ProjectionOption.LITE)
}val volume: VolumeItem = volumeHelper.getVolumeWithID(request)
```### Bookshelves
```kotlin
val bookshelfHelper = BookshelfHelper("API_KEY")
```###### Get bookshelves
```kotlin
val request = BookshelfGetRequest().apply {
userID("116445025672089480971")
maxResults(1)
startIndex(0)
}val bookshelf: Bookshelf = bookshelfHelper.get(request)
```###### Get specific bookshelf
```kotlin
val request = BookshelfGetIDRequest().apply {
userID("116445025672089480971")
bookshelfID(1001)
}val item: BookshelfItem = bookshelfHelper.getBookshelfWithID(request)
```###### Get volumes in bookshelf
```kotlin
val request = BookshelfGetVolumesRequest().apply {
userID("116445025672089480971")
bookshelfID(1001)
maxResults(5)
startIndex(0)
projection(ProjectionOption.LITE)
}val volumes: Volume = bookshelfHelper.getVolumesInBookshelf(request)
```## Download
### Groovy
```gradle
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}dependencies {
implementation 'com.github.MatthiasReumann:googlebooksapi:master-SNAPSHOT'
}
```### Kotlin DSL
``` gradle
allprojects {
repositories {
maven { url = uri("https://www.jitpack.io") }
}
}dependencies {
implementation("com.github.MatthiasReumann:googlebooksapi:master-SNAPSHOT")
}
```