# social.grain.unspecced.getPoolGallery

> One gallery from a group's pool, read from the repo that holds it through a credential the group's host issues.

- Kind: query
- Authority: unspecced.grain.social
- Lexicon: 1
- Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getPoolGallery)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getPoolGallery/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getPoolGallery/analytics)

## Query (`social.grain.unspecced.getPoolGallery`)

Type: query · GET

### Parameters (query string)

- `did` (string · did, required): Whose gallery it is.
- `group` (string · did, required)
- `rkey` (string, required)

### Output (application/json)

- `avatar` (string)
- `commentCount` (integer)
- `comments` (array)
  - `items` (ref)
    - Reference: `#poolComment`
- `did` (string · did, required)
- `displayName` (string)
- `favCount` (integer)
- `gallery` (ref)
  - Reference: `social.grain.unspecced.getPrivateGallery#privateGallery`
- `handle` (string)
- `items` (array, required)
  - `items` (ref)
    - Reference: `social.grain.unspecced.getPrivateGallery#privateItem`
- `space` (string, required)
- `viewerFav` (string): The rkey of the viewer's own favourite, when they have one.
- `viewerIsAuthor` (boolean)

### Errors

- `NotAuthorized`: The viewer is not a member of this pool.

## #poolAuthor (`social.grain.unspecced.getPoolGallery#poolAuthor`)

Type: object

### Properties

- `avatar` (string)
- `did` (string · did, required)
- `displayName` (string)
- `handle` (string)

## #poolComment (`social.grain.unspecced.getPoolGallery#poolComment`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `#poolAuthor`
- `createdAt` (string · datetime)
- `facets` (array)
  - `items` (ref)
    - Reference: `app.bsky.richtext.facet`
- `replyTo` (string · at-uri)
- `rkey` (string, required)
- `text` (string, required)
- `uri` (string · at-uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One gallery from a group's pool, read from the repo that holds it through a credential the group's host issues.",
      "errors": [
        {
          "description": "The viewer is not a member of this pool.",
          "name": "NotAuthorized"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "avatar": {
              "type": "string"
            },
            "commentCount": {
              "type": "integer"
            },
            "comments": {
              "items": {
                "ref": "#poolComment",
                "type": "ref"
              },
              "type": "array"
            },
            "did": {
              "format": "did",
              "type": "string"
            },
            "displayName": {
              "type": "string"
            },
            "favCount": {
              "type": "integer"
            },
            "gallery": {
              "ref": "social.grain.unspecced.getPrivateGallery#privateGallery",
              "type": "ref"
            },
            "handle": {
              "type": "string"
            },
            "items": {
              "items": {
                "ref": "social.grain.unspecced.getPrivateGallery#privateItem",
                "type": "ref"
              },
              "type": "array"
            },
            "space": {
              "type": "string"
            },
            "viewerFav": {
              "description": "The rkey of the viewer's own favourite, when they have one.",
              "type": "string"
            },
            "viewerIsAuthor": {
              "type": "boolean"
            }
          },
          "required": [
            "space",
            "did",
            "items"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "did": {
            "description": "Whose gallery it is.",
            "format": "did",
            "type": "string"
          },
          "group": {
            "format": "did",
            "type": "string"
          },
          "rkey": {
            "type": "string"
          }
        },
        "required": [
          "group",
          "did",
          "rkey"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "poolAuthor": {
      "properties": {
        "avatar": {
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "handle": {
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "poolComment": {
      "properties": {
        "author": {
          "ref": "#poolAuthor",
          "type": "ref"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "facets": {
          "items": {
            "ref": "app.bsky.richtext.facet",
            "type": "ref"
          },
          "type": "array"
        },
        "replyTo": {
          "format": "at-uri",
          "type": "string"
        },
        "rkey": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "rkey",
        "text",
        "author"
      ],
      "type": "object"
    }
  },
  "id": "social.grain.unspecced.getPoolGallery",
  "lexicon": 1
}
```
