# us.off-the-clock.polls.pollView

> Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.polls.pollView)
- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.polls.pollView/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.polls.pollView/examples)

## Definitions

### `us.off-the-clock.polls.pollView`

**Type**: `object`

A us.off-the-clock.polls.poll with its results: a row per option key, then a row per distinct typed answer under an option that takes input. There is no anonymous voting: the rows name their voters.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `author` | `ref` → `app.bsky.actor.defs#profileViewBasic` | Yes |  |
| `cid` | `string` (cid) | Yes |  |
| `closesAt` | `string` (datetime) | No |  |
| `indexedAt` | `string` (datetime) | Yes |  |
| `labels` | `array` | No |  |
| `opensAt` | `string` (datetime) | No |  |
| `prompt` | `string` | Yes |  |
| `record` | `unknown` | Yes | The poll as written. |
| `replyCount` | `integer` | Yes |  |
| `results` | `array` | Yes |  |
| `state` | `string` | Yes |  |
| `uri` | `string` (at-uri) | Yes |  |
| `viewerVote` | `ref` → `#viewerVote` | No |  |
| `voters` | `integer` | Yes | Members with a counting vote, abstentions included. |

### `us.off-the-clock.polls.pollView#result`

**Type**: `object`

The votes for one key with no typed answer, or for one typed answer (compared trimmed and without case, shown as first typed).

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `input` | `string` | No |  |
| `key` | `string` | Yes |  |
| `recentVoters` | `array` | Yes | Up to three of the row's voters, newest first; every one with getPoll's allVoters. |
| `votes` | `integer` | Yes |  |

### `us.off-the-clock.polls.pollView#viewerVote`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` (at-uri) | Yes |  |
| `votes` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A us.off-the-clock.polls.poll with its results: a row per option key, then a row per distinct typed answer under an option that takes input. There is no anonymous voting: the rows name their voters.",
      "properties": {
        "author": {
          "ref": "app.bsky.actor.defs#profileViewBasic",
          "type": "ref"
        },
        "cid": {
          "format": "cid",
          "type": "string"
        },
        "closesAt": {
          "format": "datetime",
          "type": "string"
        },
        "indexedAt": {
          "format": "datetime",
          "type": "string"
        },
        "labels": {
          "items": {
            "ref": "com.atproto.label.defs#label",
            "type": "ref"
          },
          "type": "array"
        },
        "opensAt": {
          "format": "datetime",
          "type": "string"
        },
        "prompt": {
          "type": "string"
        },
        "record": {
          "description": "The poll as written.",
          "type": "unknown"
        },
        "replyCount": {
          "minimum": 0,
          "type": "integer"
        },
        "results": {
          "items": {
            "ref": "#result",
            "type": "ref"
          },
          "type": "array"
        },
        "state": {
          "knownValues": [
            "pending",
            "open",
            "closed"
          ],
          "maxLength": 32,
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "viewerVote": {
          "ref": "#viewerVote",
          "type": "ref"
        },
        "voters": {
          "description": "Members with a counting vote, abstentions included.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "uri",
        "cid",
        "author",
        "record",
        "prompt",
        "results",
        "voters",
        "state",
        "replyCount",
        "indexedAt"
      ],
      "type": "object"
    },
    "result": {
      "description": "The votes for one key with no typed answer, or for one typed answer (compared trimmed and without case, shown as first typed).",
      "properties": {
        "input": {
          "maxLength": 1000,
          "type": "string"
        },
        "key": {
          "maxLength": 64,
          "type": "string"
        },
        "recentVoters": {
          "description": "Up to three of the row's voters, newest first; every one with getPoll's allVoters.",
          "items": {
            "ref": "app.bsky.actor.defs#profileViewBasic",
            "type": "ref"
          },
          "type": "array"
        },
        "votes": {
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "key",
        "votes",
        "recentVoters"
      ],
      "type": "object"
    },
    "viewerVote": {
      "properties": {
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "votes": {
          "items": {
            "ref": "us.off-the-clock.polls.vote#entry",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "uri",
        "votes"
      ],
      "type": "object"
    }
  },
  "id": "us.off-the-clock.polls.pollView",
  "lexicon": 1
}
```
