โ Weevil
API Reference
Protocol Documentation
Table of Contents
schemas/weevil/v1/book.proto
Book
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string | ||
| created_at | google.protobuf.Timestamp | ||
| title | string | ||
| author | string | repeated | |
| isbn_13 | string | ||
| isbn_9 | string | ||
| identifier | string | optional | |
| source | Source | optional | |
| read | google.protobuf.Timestamp | repeated | |
| description | string | optional |
Source
| Name | Number | Description |
|---|---|---|
| SOURCE_UNSPECIFIED | 0 | |
| SOURCE_GOOGLE | 1 | |
| SOURCE_GOODREADS | 2 |
schemas/weevil/v1/search.proto
Search
| Field | Type | Label | Description |
|---|---|---|---|
| title | string | optional | |
| author | string | optional | |
| isbn | string | optional |
schemas/weevil/v1/services/book.proto
BookMetadata
| Field | Type | Label | Description |
|---|---|---|---|
| enrichment_status | string | ||
| enriched_at | google.protobuf.Timestamp | ||
| gb_description | string | Google Books fields | |
| gb_subtitle | string | ||
| gb_publisher | string | ||
| gb_published_date | string | ||
| gb_page_count | int32 | ||
| gb_categories | string | repeated | |
| gb_average_rating | double | ||
| gb_ratings_count | int32 | ||
| gb_language | string | ||
| gb_thumbnail_url | string | ||
| gb_preview_link | string | ||
| gb_info_link | string | ||
| gb_response_path | string | ||
| gb_main_category | string | ||
| gb_canonical_link | string | ||
| gb_buy_link | string | ||
| gb_is_ebook | bool | ||
| ol_description | string | Open Library fields | |
| ol_subjects | string | repeated | |
| ol_publishers | string | repeated | |
| ol_first_publish_date | string | ||
| ol_cover_small | string | ||
| ol_cover_medium | string | ||
| ol_cover_large | string | ||
| ol_number_of_pages | int32 | ||
| ol_goodreads_id | string | ||
| ol_response_path | string |
CreateBookRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Book |
CreateBookResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Book |
GetBookRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetBookResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Book | ||
| metadata | BookMetadata | optional |
ListBooksRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListBooksResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Book | repeated | |
| cursor | string | ||
| count | int32 |
BookService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListBooks | ListBooksRequest | ListBooksResponse | |
| GetBook | GetBookRequest | GetBookResponse | |
| CreateBook | CreateBookRequest | CreateBookResponse |
schemas/weevil/v1/services/search.proto
CreateSearchRequest
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Search |
CreateSearchResponse
| Field | Type | Label | Description |
|---|---|---|---|
| books | schemas.weevil.v1.Book | repeated |
GetSearchRequest
| Field | Type | Label | Description |
|---|---|---|---|
| uuid | string |
GetSearchResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Search |
ListSearchsRequest
| Field | Type | Label | Description |
|---|---|---|---|
| count | int32 | optional | |
| cursor | string | optional |
ListSearchsResponse
| Field | Type | Label | Description |
|---|---|---|---|
| data | schemas.weevil.v1.Search | repeated | |
| cursor | string | ||
| count | int32 |
SearchService
| Method Name | Request Type | Response Type | Description |
|---|---|---|---|
| ListSearchs | ListSearchsRequest | ListSearchsResponse | |
| GetSearch | GetSearchRequest | GetSearchResponse | |
| CreateSearch | CreateSearchRequest | CreateSearchResponse |
Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
|---|---|---|---|---|---|---|---|---|
| double | double | double | float | float64 | double | float | Float | |
| float | float | float | float | float32 | float | float | Float | |
| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers โ if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers โ if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
| bool | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass | |
| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |