# us.off-the-clock.listCalendarFeeds

> The viewer's two calendar feeds for one space they read, all and mine, created on first call. Each URL is a capability: anyone holding it reads that feed's events.

- Kind: query
- Authority: off-the-clock.us
- Lexicon: 1
- Published by [off-the-clock.us](https://lexicon.garden/identity/did:plc:tevv7zpavtjtsvqrrwwipobt), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.listCalendarFeeds)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.listCalendarFeeds/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:tevv7zpavtjtsvqrrwwipobt/us.off-the-clock.listCalendarFeeds/analytics)

## Query (`us.off-the-clock.listCalendarFeeds`)

Type: query · GET

### Parameters (query string)

- `space` (string, required): A pair's TID.

### Output (application/json)

- `feeds` (array, required)
  - `items` (ref)
    - Reference: `#calendarFeed`

### Errors

- `InvalidRequest`: No description in schema.
- `NotSpaceMember`: No description in schema.

## #calendarFeed (`us.off-the-clock.listCalendarFeeds#calendarFeed`)

Type: object

One calendar feed of the viewer's in one space: every event (all) or those they RSVP'd going or interested to (mine).

### Properties

- `createdAt` (string · datetime, required)
- `enabled` (boolean, required)
- `rotatedAt` (string · datetime)
- `url` (string · uri, required): <public URL>/calendar/<token>.ics; the same with webcal: subscribes.
- `variant` (string, required)
  - Constraints: knownValues: all | mine

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "calendarFeed": {
      "description": "One calendar feed of the viewer's in one space: every event (all) or those they RSVP'd going or interested to (mine).",
      "properties": {
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "enabled": {
          "type": "boolean"
        },
        "rotatedAt": {
          "format": "datetime",
          "type": "string"
        },
        "url": {
          "description": "<public URL>/calendar/<token>.ics; the same with webcal: subscribes.",
          "format": "uri",
          "type": "string"
        },
        "variant": {
          "knownValues": [
            "all",
            "mine"
          ],
          "type": "string"
        }
      },
      "required": [
        "variant",
        "url",
        "enabled",
        "createdAt"
      ],
      "type": "object"
    },
    "main": {
      "description": "The viewer's two calendar feeds for one space they read, all and mine, created on first call. Each URL is a capability: anyone holding it reads that feed's events.",
      "errors": [
        {
          "name": "InvalidRequest"
        },
        {
          "name": "NotSpaceMember"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "feeds": {
              "items": {
                "ref": "#calendarFeed",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "feeds"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "space": {
            "description": "A pair's TID.",
            "type": "string"
          }
        },
        "required": [
          "space"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "us.off-the-clock.listCalendarFeeds",
  "lexicon": 1
}
```
