# Serveurs

## Servers

<mark style="color:blue;">`GET`</mark> `https://serveur-minecraft-vote.fr/api/v1/servers/:server_id`

Permet de récupérer les informations d'un serveur

#### Path Parameters

| Name       | Type   | Description            |
| ---------- | ------ | ---------------------- |
| server\_id | number | Identifiant du serveur |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```c
{
  "id": 1,
  "name": "Onoria",
  "owner": {
    "id": 1,
    "name": "Maxlego08"
  },
  "ip": "play.hypixel.net",
  "port": 25565,
  "website": null,
  "discord": null,
  "trailer": null,
  "created_at": "2021-08-12T09:38:51.000000Z",
  "updated_at": "2021-08-14T17:39:45.000000Z",
  "power": 4,
  "votes": 3,
  "media": {
    "id": 1,
    "file_name": "W0FHH5bYk5jGAVyQMDpx",
    "extension": "png",
    "size": 33541,
    "is_deletable": 0
  },
  "followers": 1,
  "subs": 0,
  "description": "[center]Onoria est le meilleur faction farm2win du moment\r\n\r\n\r\n[i][u][b][size=7][font=Times New Roman][color=#44b8ff]Onoria[\/color][\/font][\/size][\/b][\/u][\/i][\/center]",
  "description_short": "Onoria est un serveur faction inédit et farm2win."
}
```

{% endtab %}
{% endtabs %}

## Train de la hype

<mark style="color:blue;">`GET`</mark> `https://serveur-minecraft-vote.fr/api/v1/servers/:server_id/train`

Permet de récupérer les informations sur le train de la hype d'un serveur.

#### Path Parameters

| Name       | Type   | Description            |
| ---------- | ------ | ---------------------- |
| server\_id | number | Identifiant du serveur |

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

```c
{
  "status": false,
  "train": {
    "level": 2,
    "percent": 0,
    "expired_at": "2021-07-31 13:01:40",
    "created_at": "2021-07-31T12:34:11.000000Z"
  }
}
```

{% endtab %}
{% endtabs %}

## Vote

<mark style="color:blue;">`GET`</mark> `https://serveur-minecraft-vote.fr/api/v1/servers/:server_id/vote/:ip`

Permet de savoir si un utilisateur à voté pour le serveur.

#### Path Parameters

| Name       | Type   | Description            |
| ---------- | ------ | ---------------------- |
| server\_id | number | Identifiant du serveur |
| ip         | string | Ip de l'utilisateur    |

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

```c
// Si l'utilisateur à déjà voté
{
  "canVote": false,
  "waitSecond": 3509,
  "name": "maxlego08",
  "votedAt": "2021-07-30T14:55:29.000000Z"
}
// Si l'utilisateur peut voter
{
  "canVote": true
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.serveur-minecraft-vote.fr/serveurs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
