Skip to content

MatthiasReumann/google-books-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

googlebooksapi

A wrapper of the Google Books APIs written in Kotlin

Usage

Volumes

val volumeHelper = VolumeHelper("API_KEY")
Get volumes
val request = VolumeRequest().apply {
    inauthor("Michael Pollan")
    inpublisher("Penguin")
    intitle("This Is Your Mind On Plants")
    sorting(SortOption.NEWEST)
    printType(PrintTypeOption.BOOKS)
    projection(ProjectionOption.FULL)
    maxResults(3)
}
val volume: Volume = volumeHelper.get(request)
Get specific volume
val volumeItem: VolumeItem = volumeHelper.getVolumeWithID("wVyWswEACAAJ")

Bookshelves

val bookshelfHelper = BookshelfHelper("API_KEY")
Get bookshelves
val bookshelves: Bookshelf = bookshelfHelper.get("1112223334445556677")
Get specific bookshelf
val bookshelf: BookshelfItem = bookshelfHelper.getBookshelfWithID("1112223334445556677", 1001)
Get volumes in bookshelf
val item: Volume = bookshelfHelper.getVolumesInBookshelf("1164450273332089480971", 1001)

Download

Groovy

allprojects {
  repositories {
      maven { url "https://jitpack.io" }
  }
}

dependencies {
   implementation 'com.github.MatthiasReumann:googlebooksapi:master-SNAPSHOT'
}

Kotlin DSL

allprojects {
  repositories {
    maven { url = uri("https://www.jitpack.io") }
  }
}

dependencies {
   implementation("com.github.MatthiasReumann:googlebooksapi:master-SNAPSHOT")
}

About

A wrapper of the Google Books APIs written in Kotlin

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages