# ink.branchline.listAuthorActivity

> Published by [branchline.ink](https://lexicon.garden/identity/did:plc:brvu7akhdvsqcomb67pafw25)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.listAuthorActivity)
- [Documentation](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.listAuthorActivity/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:brvu7akhdvsqcomb67pafw25/ink.branchline.listAuthorActivity/examples)

## Definitions

### `ink.branchline.listAuthorActivity`

**Type**: `query`

Per-day bud counts for an author over the trailing 30 days in the viewer's local timezone, plus a current streak (consecutive days ending today with at least one bud). Powers the leaf-themed activity strip on profile pages.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `tz` | `string` | Yes | IANA timezone identifier (e.g. America/New_York) used to bucket createdAt into local days and to anchor 'today'. |
| `actor` | `string` (did) | Yes | DID of the author whose activity to aggregate. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `days` | `array` | Yes | Exactly 30 entries, oldest-first, with zero-count days included. |
| `since` | `string` | Yes | Inclusive start of the window in tz-local calendar form (YYYY-MM-DD). Always 29 days before `until`. |
| `until` | `string` | Yes | Inclusive end of the window in tz-local calendar form (YYYY-MM-DD). Always the caller's local 'today'. |
| `totalBuds` | `integer` | Yes | Sum of counts across the 30-day window. |
| `currentStreak` | `integer` | Yes | Consecutive days ending at `until` (inclusive) where count >= 1. Zero if the caller's 'today' has no buds yet. |

### `ink.branchline.listAuthorActivity#dayCount`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `date` | `string` | Yes | tz-local calendar date (YYYY-MM-DD). |
| `count` | `integer` | Yes | Number of buds the author created on this local day. |

## Raw Schema

```json
{
  "id": "ink.branchline.listAuthorActivity",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "since",
            "until",
            "days",
            "currentStreak",
            "totalBuds"
          ],
          "properties": {
            "days": {
              "type": "array",
              "items": {
                "ref": "#dayCount",
                "type": "ref"
              },
              "description": "Exactly 30 entries, oldest-first, with zero-count days included."
            },
            "since": {
              "type": "string",
              "description": "Inclusive start of the window in tz-local calendar form (YYYY-MM-DD). Always 29 days before `until`."
            },
            "until": {
              "type": "string",
              "description": "Inclusive end of the window in tz-local calendar form (YYYY-MM-DD). Always the caller's local 'today'."
            },
            "totalBuds": {
              "type": "integer",
              "description": "Sum of counts across the 30-day window."
            },
            "currentStreak": {
              "type": "integer",
              "description": "Consecutive days ending at `until` (inclusive) where count >= 1. Zero if the caller's 'today' has no buds yet."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "actor",
          "tz"
        ],
        "properties": {
          "tz": {
            "type": "string",
            "description": "IANA timezone identifier (e.g. America/New_York) used to bucket createdAt into local days and to anchor 'today'."
          },
          "actor": {
            "type": "string",
            "format": "did",
            "description": "DID of the author whose activity to aggregate."
          }
        }
      },
      "description": "Per-day bud counts for an author over the trailing 30 days in the viewer's local timezone, plus a current streak (consecutive days ending today with at least one bud). Powers the leaf-themed activity strip on profile pages."
    },
    "dayCount": {
      "type": "object",
      "required": [
        "date",
        "count"
      ],
      "properties": {
        "date": {
          "type": "string",
          "description": "tz-local calendar date (YYYY-MM-DD)."
        },
        "count": {
          "type": "integer",
          "description": "Number of buds the author created on this local day."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
