# fyi.opensocial.getTemplateListing

> A template shared with everyone, for its own page: what it's called, who made it, what a tab of it does at its latest version, and every version. For anyone; never one shared within a group.

- Kind: query
- Authority: opensocial.fyi
- Lexicon: 1
- Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplateListing)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplateListing/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplateListing/analytics)

## Query (`fyi.opensocial.getTemplateListing`)

Type: query · GET

### Parameters (query string)

- `uri` (string · at-uri, required): The template, its fyi.opensocial.template in whoever made it's repo.

### Output (application/json)

- `description` (string, required)
- `entry` (ref, required): What a tab of its latest version does, its own kinds of record not yet named for any tab.
  - Reference: `fyi.opensocial.template#entry`
- `hidden` (boolean): Labelled hidden, it or its latest version, by this host's moderators or a labeler it follows: left out of where people look for things to add. Tabs of it keep working.
- `keptBy` (integer): How many groups on this host have a tab of it now, of any version. Groups elsewhere aren't counted.
  - Constraints: minimum: 0
- `kinds` (array): The kinds of record it makes up, under the placeholder namespace each tab names for itself.
  - `items` (string · nsid)
- `likes` (integer): How many people like it, as this host has seen.
  - Constraints: minimum: 0
- `listed` (boolean): Whoever made it asks for it to be listed: its listing says so.
- `maker` (ref, required)
  - Reference: `#makerView`
- `name` (string, required): Its record key: lowercase letters, digits and dashes.
- `number` (integer, required)
  - Constraints: minimum: 1
- `previews` (array): Pictures of a tab made from its latest version, filled in.
  - `items` (ref)
    - Reference: `#previewView`
- `scan` (ref): What this host's scan of its latest version found. What a scan of an earlier one found is on that version.
  - Reference: `#scanView`
- `shown` (boolean): Whether this host lists it where people look for things to add: listed, kept by enough of its groups for long enough, its latest version scanned with nothing found, and nothing labelling it hidden.
- `uri` (string · at-uri, required)
- `version` (ref, required): Its latest version, which a tab added from it names.
  - Reference: `com.atproto.repo.strongRef`
- `versions` (array, required): Every version, newest first.
  - `items` (ref)
    - Reference: `fyi.opensocial.listTemplates#versionView`

### Errors

- `NotFound`: No description in schema.

## #makerView (`fyi.opensocial.getTemplateListing#makerView`)

Type: object

### Properties

- `address` (string): A group's: the hostname its site is at, which is its handle until it takes one of its own.
- `avatar` (string · uri)
- `did` (string · did, required)
- `displayName` (string)
- `group` (boolean): Whether a group made it: one this host runs.
- `handle` (string · handle)

## #previewView (`fyi.opensocial.getTemplateListing#previewView`)

Type: object

One picture of a tab made from it, served by this host.

### Properties

- `alt` (string, required): What it shows.
- `size` (string)
  - Constraints: knownValues: wide | phone
- `src` (string, required): Its address on this host: /template-preview/…

## #scanView (`fyi.opensocial.getTemplateListing#scanView`)

Type: object

What this host's scan of one version found: its own kinds of record against atproto's rules, what its pages try to load or run that its frame wouldn't let them, and its sizes against this host's limits. A scan, not a person's review.

### Properties

- `found` (array, required): Each thing found, in a sentence.
  - `items` (string)
- `ok` (boolean, required): Nothing was found.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "A template shared with everyone, for its own page: what it's called, who made it, what a tab of it does at its latest version, and every version. For anyone; never one shared within a group.",
      "errors": [
        {
          "name": "NotFound"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "description": {
              "type": "string"
            },
            "entry": {
              "description": "What a tab of its latest version does, its own kinds of record not yet named for any tab.",
              "ref": "fyi.opensocial.template#entry",
              "type": "ref"
            },
            "hidden": {
              "description": "Labelled hidden, it or its latest version, by this host's moderators or a labeler it follows: left out of where people look for things to add. Tabs of it keep working.",
              "type": "boolean"
            },
            "keptBy": {
              "description": "How many groups on this host have a tab of it now, of any version. Groups elsewhere aren't counted.",
              "minimum": 0,
              "type": "integer"
            },
            "kinds": {
              "description": "The kinds of record it makes up, under the placeholder namespace each tab names for itself.",
              "items": {
                "format": "nsid",
                "type": "string"
              },
              "type": "array"
            },
            "likes": {
              "description": "How many people like it, as this host has seen.",
              "minimum": 0,
              "type": "integer"
            },
            "listed": {
              "description": "Whoever made it asks for it to be listed: its listing says so.",
              "type": "boolean"
            },
            "maker": {
              "ref": "#makerView",
              "type": "ref"
            },
            "name": {
              "description": "Its record key: lowercase letters, digits and dashes.",
              "type": "string"
            },
            "number": {
              "minimum": 1,
              "type": "integer"
            },
            "previews": {
              "description": "Pictures of a tab made from its latest version, filled in.",
              "items": {
                "ref": "#previewView",
                "type": "ref"
              },
              "type": "array"
            },
            "scan": {
              "description": "What this host's scan of its latest version found. What a scan of an earlier one found is on that version.",
              "ref": "#scanView",
              "type": "ref"
            },
            "shown": {
              "description": "Whether this host lists it where people look for things to add: listed, kept by enough of its groups for long enough, its latest version scanned with nothing found, and nothing labelling it hidden.",
              "type": "boolean"
            },
            "uri": {
              "format": "at-uri",
              "type": "string"
            },
            "version": {
              "description": "Its latest version, which a tab added from it names.",
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            },
            "versions": {
              "description": "Every version, newest first.",
              "items": {
                "ref": "fyi.opensocial.listTemplates#versionView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "uri",
            "name",
            "description",
            "maker",
            "version",
            "number",
            "entry",
            "versions"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "uri": {
            "description": "The template, its fyi.opensocial.template in whoever made it's repo.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "uri"
        ],
        "type": "params"
      },
      "type": "query"
    },
    "makerView": {
      "properties": {
        "address": {
          "description": "A group's: the hostname its site is at, which is its handle until it takes one of its own.",
          "type": "string"
        },
        "avatar": {
          "format": "uri",
          "type": "string"
        },
        "did": {
          "format": "did",
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "group": {
          "description": "Whether a group made it: one this host runs.",
          "type": "boolean"
        },
        "handle": {
          "format": "handle",
          "type": "string"
        }
      },
      "required": [
        "did"
      ],
      "type": "object"
    },
    "previewView": {
      "description": "One picture of a tab made from it, served by this host.",
      "properties": {
        "alt": {
          "description": "What it shows.",
          "type": "string"
        },
        "size": {
          "knownValues": [
            "wide",
            "phone"
          ],
          "type": "string"
        },
        "src": {
          "description": "Its address on this host: /template-preview/…",
          "type": "string"
        }
      },
      "required": [
        "src",
        "alt"
      ],
      "type": "object"
    },
    "scanView": {
      "description": "What this host's scan of one version found: its own kinds of record against atproto's rules, what its pages try to load or run that its frame wouldn't let them, and its sizes against this host's limits. A scan, not a person's review.",
      "properties": {
        "found": {
          "description": "Each thing found, in a sentence.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "ok": {
          "description": "Nothing was found.",
          "type": "boolean"
        }
      },
      "required": [
        "ok",
        "found"
      ],
      "type": "object"
    }
  },
  "id": "fyi.opensocial.getTemplateListing",
  "lexicon": 1
}
```
