# dev.knotless.getActorActivity

> Published by [lexicons.knotless.dev](https://lexicon.garden/identity/did:plc:yqsg7znbbhfmj3a2nrpnaerk)

✓ This is the authoritative definition for this NSID.

## Description

How much an account did on each day, as an appview has indexed it.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getActorActivity)
- [Documentation](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getActorActivity/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:yqsg7znbbhfmj3a2nrpnaerk/dev.knotless.getActorActivity/examples)

## Definitions

### `dev.knotless.getActorActivity#dayView`

**Type**: `object`

What the account did on one day.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `comments` | `integer` | No | Comments it wrote. |
| `day` | `string` | Yes | The date in `tz`, as YYYY-MM-DD. |
| `issues` | `integer` | No | Issues it opened. |
| `pulls` | `integer` | No | Pulls it opened. |
| `pushes` | `integer` | No | Refs it moved, made or deleted, one for each claim. |
| `repos` | `integer` | No | Repositories it made. |

### `dev.knotless.getActorActivity`

**Type**: `query`

How much an account did on each day since a time, by kind, as an appview has indexed it, and its repositories' pushes: when each was last pushed to, and how often on each of those days. Days are dates in the zone `tz`, and only days with something done are listed. Repositories and accounts taken down count for nothing. No authentication; responses are not personalized.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `actor` | `string` (did) | Yes | The account. |
| `since` | `string` (datetime) | No | The first day counted is the one this falls on in `tz`; a year before now if not given. |
| `tz` | `string` | No | The IANA time zone whose days are counted, as `America/New_York`; UTC if not given or not known. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `days` | `array` | Yes | Oldest first. |
| `repos` | `array` | Yes | Each of the account's repositories ever pushed to, by name. |

### `dev.knotless.getActorActivity#repoActivity`

**Type**: `object`

The pushes to one of the account's repositories.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `days` | `array` | Yes | The days since `since` it was pushed to, oldest first. |
| `name` | `string` | Yes | The repository's name: its record key. |
| `pushedAt` | `string` (datetime) | Yes | When it was last pushed to, ever. |

### `dev.knotless.getActorActivity#repoDay`

**Type**: `object`

The pushes to a repository on one day.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `day` | `string` | Yes | The date in `tz`, as YYYY-MM-DD. |
| `pushes` | `integer` | Yes | Refs moved, made or deleted. |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "dayView": {
      "description": "What the account did on one day.",
      "properties": {
        "comments": {
          "description": "Comments it wrote.",
          "minimum": 0,
          "type": "integer"
        },
        "day": {
          "description": "The date in `tz`, as YYYY-MM-DD.",
          "type": "string"
        },
        "issues": {
          "description": "Issues it opened.",
          "minimum": 0,
          "type": "integer"
        },
        "pulls": {
          "description": "Pulls it opened.",
          "minimum": 0,
          "type": "integer"
        },
        "pushes": {
          "description": "Refs it moved, made or deleted, one for each claim.",
          "minimum": 0,
          "type": "integer"
        },
        "repos": {
          "description": "Repositories it made.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "day"
      ],
      "type": "object"
    },
    "main": {
      "description": "How much an account did on each day since a time, by kind, as an appview has indexed it, and its repositories' pushes: when each was last pushed to, and how often on each of those days. Days are dates in the zone `tz`, and only days with something done are listed. Repositories and accounts taken down count for nothing. No authentication; responses are not personalized.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "days": {
              "description": "Oldest first.",
              "items": {
                "ref": "#dayView",
                "type": "ref"
              },
              "type": "array"
            },
            "repos": {
              "description": "Each of the account's repositories ever pushed to, by name.",
              "items": {
                "ref": "#repoActivity",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "days",
            "repos"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "actor": {
            "description": "The account.",
            "format": "did",
            "type": "string"
          },
          "since": {
            "description": "The first day counted is the one this falls on in `tz`; a year before now if not given.",
            "format": "datetime",
            "type": "string"
          },
          "tz": {
            "description": "The IANA time zone whose days are counted, as `America/New_York`; UTC if not given or not known.",
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "actor"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "repoActivity": {
      "description": "The pushes to one of the account's repositories.",
      "properties": {
        "days": {
          "description": "The days since `since` it was pushed to, oldest first.",
          "items": {
            "ref": "#repoDay",
            "type": "ref"
          },
          "type": "array"
        },
        "name": {
          "description": "The repository's name: its record key.",
          "type": "string"
        },
        "pushedAt": {
          "description": "When it was last pushed to, ever.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "name",
        "pushedAt",
        "days"
      ],
      "type": "object"
    },
    "repoDay": {
      "description": "The pushes to a repository on one day.",
      "properties": {
        "day": {
          "description": "The date in `tz`, as YYYY-MM-DD.",
          "type": "string"
        },
        "pushes": {
          "description": "Refs moved, made or deleted.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "day",
        "pushes"
      ],
      "type": "object"
    }
  },
  "description": "How much an account did on each day, as an appview has indexed it.",
  "id": "dev.knotless.getActorActivity",
  "lexicon": 1
}
```
