> For the complete documentation index, see [llms.txt](https://rikarani.gitbook.io/cek-ign/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rikarani.gitbook.io/cek-ign/list-game/mobile-legends.md).

# Mobile Legends

Mobile Legends game kikir dari munton

{% hint style="info" %}
**Required Fields** dikirim dalam bentuk query params
{% endhint %}

## Endpoint

<mark style="color:green;">`GET`</mark> `/mlbb`

## Required Fields

| Name | Value    |
| ---- | -------- |
| id   | `string` |
| zone | `string` |

## Example Request

<details>

<summary>cURL </summary>

```bash
curl -G -d "uid=800081806" localhost:3000/genshin
```

</details>

<details>

<summary>HTTP Client (Postman, HTTPie, etc)</summary>

```http
http://localhost:3000/mlbb?id=469123581&zone=2418
```

</details>

<details>

<summary>Fetch API</summary>

```typescript
async function demo(): Promise<any> {
  const hit = await fetch("http://localhost:3000/mlbb?id=469123581&zone=2418");
  const data = await hit.json();

  return data;
}
```

</details>

## Example Response

{% tabs %}
{% tab title="200 OK" %}

```json
{
  "game": "Mobile Legends: Bang Bang",
  "account": {
    "ign": "Erikaaaa",
    "id": "469123581",
    "zone": "2418"
  }
}
```

{% endtab %}

{% tab title="404 Not  Found" %}
Trigger kalau akun yang dicari tidak ditemukan. Bisa jadi karna salah masukkan ID atau salah masukkan Zone.

```json
{
  "error": {
    "name": "Not Found",
    "message": "IGN Tidak Ditemukan"
  }
}
```

{% endtab %}

{% tab title="422 Unprocessable Entity" %}
Trigger kalau

* `id` ndak ada di query params
* `zone` ndak ada di query params
* `id` dan `zone` ndak ada di query params

```json
{
  "errors": [
    {
      "path": "/id",
      "message": "Expected string",
      "summary": "Expected  property 'id' to be  string but found: undefined"
    },
    {
      "path": "/zone",
      "message": "Expected string",
      "summary": "Expected  property 'zone' to be  string but found: undefined"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

***

## Type

buat kalian yang pakek **TypeScript**

### Query Params

```typescript
type Query = {
  id: string;
  zone: string;
};
```

### Response

{% tabs %}
{% tab title="200 OK" %}

```typescript
type Response = {
  game: string;
  account: {
    ign: string;
    id: string;
    zone: string;
  };
};
```

{% endtab %}

{% tab title="404 Not Found" %}

```typescript
type Error = {
  error: {
    name: string;
    message: string;
  };
};
```

{% endtab %}

{% tab title="422 Unprocessable Entity" %}

```typescript
type Error = {
  errors: Array<{
    path: string;
    message: string;
    summary: string;
  }>;
};
```

{% endtab %}
{% endtabs %}
