public interface BookRestInterface
Modifier and Type | Method and Description |
---|---|
retrofit2.Call<BookJSON> |
getBookInfo(java.lang.String bookId)
Get data for a specific book
|
retrofit2.Call<BookSearchJSON> |
searchBooks(java.lang.String query,
int maxResults)
Searches books
|
@GET(value="volumes?langRestrict=en&country=US&orderBy=relevance&projection=lite") retrofit2.Call<BookSearchJSON> searchBooks(@Query(value="q") java.lang.String query, @Query(value="maxResults") int maxResults)
query
- the title to searchmaxResults
- max number of results@GET(value="volumes/{bookId}") retrofit2.Call<BookJSON> getBookInfo(@Path(value="bookId") java.lang.String bookId)
bookId
- the ID of the book