# Hero Catalog

> `GET /api/academy/heroes/catalog`: Academy endpoint of the Rone Arena API.

Supports query parameters for pagination and localization.

Query parameters:
- **size**: Number of items per page (minimum: 1).
- **index**: Page index (starting from 1).
- **lang**: Language code for localized content (default: `en`).

The response includes hero catalog data:
- **records**: Array of hero entries, each containing:
    - **data**:
        - **head**: Hero portrait image URL.
        - **head_big**: Larger hero portrait image URL.
        - **painting**: Hero splash art image URL.
        - **hero**:
            - **data**:
                - **name**: Hero name.
                - **roadsort**: Lane assignment metadata:
                    - **_id**: Unique identifier.
                    - **caption**: Lane caption (localized).
                    - **configId**: Configuration ID.
                    - **createdAt**: Creation timestamp.
                    - **createdUser**: Creator username.
                    - **data**:
                        - **road_sort_icon**: Lane icon URL.
                        - **road_sort_id**: Lane ID.
                        - **road_sort_title**: Lane title (e.g., Roam).
                    - **updatedAt**: Last update timestamp.
                    - **updatedUser**: Last updater username.
        - **hero_id**: Unique hero identifier.

This endpoint is useful for:
- Displaying hero collections.
- Browsing available heroes.
- Analyzing basic hero attributes.

## Request

`GET https://arena.rone.dev/api/academy/heroes/catalog`

### Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `size` | query | integer | no | `20` | Number of items per page. Range: 1... |
| `index` | query | integer | no | `1` | Page index for pagination. Range: 1... |
| `lang` | query | string | no | `en` | Language code for localized content. One of: `en`, `id`, `ru`, `es`, `pt`, `tr`, `ar`, `de`, `fr`, `it`, `ja`, `ko`, `th`, `vi`, `zh-CN`, `zh-TW`, `km`. |

### Example

```bash
curl -X GET 'https://arena.rone.dev/api/academy/heroes/catalog'
```

## Example response

```json
{
  "code": 0,
  "message": "OK",
  "data": {
    "records": [
      {
        "data": {
          "head": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fgms%2Fimage%2Fe7aa2ab69d15fc168b2d60b0e5ed0a1e.jpg",
          "head_big": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fgms%2Fimage%2F3542718f699058d42801d88ec9b8fb8b.jpg",
          "hero": {
            "data": {
              "name": "Marcel",
              "roadsort": [
                {
                  "_id": "66854202aa8e7f6ec4703d8f",
                  "caption": "\u8f85\u52a9",
                  "configId": 144237,
                  "createdAt": 1720009218480,
                  "createdUser": "nickjin",
                  "data": {
                    "_object": 2732073,
                    "road_sort_icon": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fgms%2Fimage%2Fa3dbb075b4d8186c29f02f7d47da236a.svg",
                    "road_sort_id": "3",
                    "road_sort_title": "Roam"
                  },
                  "id": 2732083,
                  "linkId": [
                    2732073
                  ],
                  "sort": 0,
                  "updatedAt": 1723022949109,
                  "updatedUser": "nickjin"
                },
                ""
              ]
            }
          },
          "hero_id": 132,
          "painting": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fgms%2Fimage%2F24c43180662d27aa5b62106b596fa4f7.webp"
        }
      }
    ],
    "total": 1
  }
}
```

## Links

- Try it in the playground: https://arena.rone.dev/web/academy/heroes/catalog
- Academy endpoints: https://arena.rone.dev/web/academy.md
- OpenAPI schema: https://arena.rone.dev/api/openapi.json
