# Battle Spells

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

List all battle spells with details. 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 battle spell data:
- **records**: Array of spell entries, each containing:
    - **_id**: Unique record identifier.
    - **_createdAt**: Creation timestamp.
    - **_updatedAt**: Last update timestamp.
    - **data**:
        - **battleskillid**: Battle spell ID.
        - **skillid**: Skill ID.
        - **skillname**: Spell name (e.g., 'Arrival').
        - **skillicon**: Spell icon URL.
        - **skillshortdesc**: Short description (e.g., 'Long-range Support').
        - **skilldesc**: Full description of spell effects.
        - **skilldescemblem**: Emblem-specific description (if applicable).
        - **skillvideo**: Video reference (if available).
    - **id**: Internal record ID.
    - **sourceId**: Source reference ID.

This endpoint is useful for:
- Displaying the complete catalog of battle spells.
- Explaining spell effects and mechanics.
- Guiding players in spell selection and strategy.

## Request

`GET https://arena.rone.dev/api/academy/spells`

### 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/spells'
```

## Example response

```json
{
  "code": 0,
  "message": "OK",
  "data": {
    "records": [
      {
        "_createdAt": 1723097697296,
        "_id": "66b46261f25dc3aacf517fb2",
        "_updatedAt": 1723097697296,
        "data": {
          "__data": {
            "skilldesc": "After channeling for 3s, teleport to the target allied Turret, Base, Minion, or trap and gain 60% extra Movement Speed (decays over 3s) afterward.\nIf the channeling is canceled or interrupted, 30s of the spell cooldown will be <font color=\"62f8fe\">refunded</font>.",
            "skilldescemblem": "After channeling for 3s, teleport to the target allied Turret, Base, Minion, or trap and gain 60% extra Movement Speed (decays over 3s) afterward.\nIf the channeling is canceled or interrupted, 30s of the spell cooldown will be <font color=\"62f8fe\">refunded</font>.",
            "skillicon": "https://wsrv.nl/?url=https%3A%2F%2Fakmweb.youngjoygame.com%2Fweb%2Fsvnres%2Fimg%2Fmlbb%2Fhomepage%2F100_e4c101cdf5311dc1ce58bd8385c1c478.png",
            "skillid": 20160,
            "skillname": "Arrival"
          },
          "battleskillid": 20160,
          "skillicon": "@__data.skillicon",
          "skillname": "@__data.skillname1",
          "skillshortdesc": "Long-range Support",
          "skillvideo": ""
        },
        "id": 100059,
        "sourceId": 2718122
      }
    ],
    "total": 12
  }
}
```

## Links

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