# fyi.opensocial.previewMethod

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.previewMethod)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.previewMethod/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.previewMethod/examples)

## Definitions

### `fyi.opensocial.previewMethod`

**Type**: `query`

One of the group's own methods as the page the caller's assistant left for a tab would bring it, before it's published: its body and lexicon from that draft, called as the caller. `output` is what the method returns, as it will once published. Only for whoever may change the group's site, and only their own draft.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `channel` | `string` | Yes | The tab's channel. |
| `group` | `string` (did) | Yes |  |
| `nsid` | `string` (nsid) | Yes | The method, among the draft's. |
| `params` | `string` | No | The method's params, as JSON. |
| `tab` | `string` | Yes |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `output` | `unknown` | Yes | The method's output. |

#### Errors

- **NotFound**
- **Forbidden**
- **InvalidResponse**
- **Timeout**
- **TooManyCalls**
- **OutOfMemory**
- **MethodFailed**
- **TooLarge**
- **Busy**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One of the group's own methods as the page the caller's assistant left for a tab would bring it, before it's published: its body and lexicon from that draft, called as the caller. `output` is what the method returns, as it will once published. Only for whoever may change the group's site, and only their own draft.",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "Forbidden"
        },
        {
          "name": "InvalidResponse"
        },
        {
          "name": "Timeout"
        },
        {
          "name": "TooManyCalls"
        },
        {
          "name": "OutOfMemory"
        },
        {
          "name": "MethodFailed"
        },
        {
          "name": "TooLarge"
        },
        {
          "name": "Busy"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "output": {
              "description": "The method's output.",
              "type": "unknown"
            }
          },
          "required": [
            "output"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "channel": {
            "description": "The tab's channel.",
            "type": "string"
          },
          "group": {
            "format": "did",
            "type": "string"
          },
          "nsid": {
            "description": "The method, among the draft's.",
            "format": "nsid",
            "type": "string"
          },
          "params": {
            "description": "The method's params, as JSON.",
            "maxLength": 8192,
            "type": "string"
          },
          "tab": {
            "type": "string"
          }
        },
        "required": [
          "group",
          "channel",
          "tab",
          "nsid"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "fyi.opensocial.previewMethod",
  "lexicon": 1
}
```
