# buzz.bookhive.getAuthorBooks

> Published by [bookhive.buzz](https://lexicon.garden/identity/did:plc:enu2j5xjlqsjaylv3du4myh4)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.getAuthorBooks)
- [Documentation](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.getAuthorBooks/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:enu2j5xjlqsjaylv3du4myh4/buzz.bookhive.getAuthorBooks/examples)

## Definitions

### `buzz.bookhive.getAuthorBooks`

**Type**: `query`

Get books by a specific author.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `page` | `integer` | No |  |
| `sort` | `string` | No | Sort order. Defaults to popularity. |
| `limit` | `integer` | No |  |
| `author` | `string` | Yes | The author name to look up |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `page` | `integer` | No |  |
| `books` | `array` | Yes |  |
| `author` | `string` | Yes |  |
| `totalBooks` | `integer` | Yes |  |
| `totalPages` | `integer` | Yes |  |

## Raw Schema

```json
{
  "id": "buzz.bookhive.getAuthorBooks",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "author",
            "books",
            "totalBooks",
            "totalPages"
          ],
          "properties": {
            "page": {
              "type": "integer"
            },
            "books": {
              "type": "array",
              "items": {
                "ref": "buzz.bookhive.hiveBook#main",
                "type": "ref"
              }
            },
            "author": {
              "type": "string"
            },
            "totalBooks": {
              "type": "integer"
            },
            "totalPages": {
              "type": "integer"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "author"
        ],
        "properties": {
          "page": {
            "type": "integer",
            "default": 1,
            "minimum": 1
          },
          "sort": {
            "type": "string",
            "description": "Sort order. Defaults to popularity.",
            "knownValues": [
              "popularity",
              "reviews"
            ]
          },
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1
          },
          "author": {
            "type": "string",
            "description": "The author name to look up"
          }
        }
      },
      "description": "Get books by a specific author."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
