# guide.climbers.appview.getGymsByLocation

> Published by [gunnar.foo](https://lexicon.garden/identity/did:plc:f5gvem3uvafi2ord4txpyvjj)

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:f5gvem3uvafi2ord4txpyvjj/guide.climbers.appview.getGymsByLocation)
- [Documentation](https://lexicon.garden/lexicon/did:plc:f5gvem3uvafi2ord4txpyvjj/guide.climbers.appview.getGymsByLocation/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:f5gvem3uvafi2ord4txpyvjj/guide.climbers.appview.getGymsByLocation/examples)

## Definitions

### `guide.climbers.appview.getGymsByLocation#gymWithDistanceView`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `distanceKm` | `integer` | Yes |  |
| `hasWalls` | `boolean` | Yes |  |
| `name` | `string` | Yes |  |
| `place` | `ref` → `guide.climbers.dev.poi` | No |  |
| `uri` | `string` (at-uri) | Yes |  |
| `wallCount` | `integer` | No |  |

### `guide.climbers.appview.getGymsByLocation`

**Type**: `query`

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `hasWalls` | `boolean` | No |  |
| `lat` | `string` | Yes |  |
| `limit` | `integer` | No |  |
| `lng` | `string` | Yes |  |
| `maxDistanceKm` | `integer` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No |  |
| `gyms` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "gymWithDistanceView": {
      "properties": {
        "distanceKm": {
          "type": "integer"
        },
        "hasWalls": {
          "type": "boolean"
        },
        "name": {
          "type": "string"
        },
        "place": {
          "ref": "guide.climbers.dev.poi",
          "type": "ref"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        },
        "wallCount": {
          "type": "integer"
        }
      },
      "required": [
        "uri",
        "name",
        "hasWalls",
        "distanceKm"
      ],
      "type": "object"
    },
    "main": {
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "gyms": {
              "items": {
                "ref": "#gymWithDistanceView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "gyms"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "type": "string"
          },
          "hasWalls": {
            "type": "boolean"
          },
          "lat": {
            "type": "string"
          },
          "limit": {
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "lng": {
            "type": "string"
          },
          "maxDistanceKm": {
            "type": "integer"
          }
        },
        "required": [
          "lat",
          "lng"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "guide.climbers.appview.getGymsByLocation",
  "lexicon": 1
}
```
