# social.grain.unspecced.getGalleryFavorites

> Get the accounts that have favorited a gallery, most recent first.

- 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.getGalleryFavorites)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getGalleryFavorites/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getGalleryFavorites/analytics)

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

Type: query · GET

### Parameters (query string)

- `cursor` (string)
- `gallery` (string · at-uri, required)
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 50
- `viewer` (string · did)

### Output (application/json)

- `cursor` (string)
- `items` (array)
  - `items` (ref)
    - Reference: `social.grain.unspecced.getGalleryFavorites#favoriteItem`
- `totalCount` (integer)

## #favoriteItem (`social.grain.unspecced.getGalleryFavorites#favoriteItem`)

Type: object

### Properties

- `avatar` (string)
- `description` (string)
- `did` (string · did, required)
- `displayName` (string)
- `handle` (string)
- `viewer` (ref)
  - Reference: `social.grain.actor.defs#viewerState`

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "favoriteItem": {
      "properties": {
        "avatar": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "handle": {
          "type": "string"
        },
        "viewer": {
          "ref": "social.grain.actor.defs#viewerState",
          "type": "ref"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "main": {
      "description": "Get the accounts that have favorited a gallery, most recent first.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "items": {
              "items": {
                "ref": "social.grain.unspecced.getGalleryFavorites#favoriteItem",
                "type": "ref"
              },
              "type": "array"
            },
            "totalCount": {
              "type": "integer"
            }
          },
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "type": "string"
          },
          "gallery": {
            "format": "at-uri",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "viewer": {
            "format": "did",
            "type": "string"
          }
        },
        "required": [
          "gallery"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "social.grain.unspecced.getGalleryFavorites",
  "lexicon": 1
}
```
