> For the complete documentation index, see [llms.txt](https://euilimchoi.gitbook.io/untitled/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://euilimchoi.gitbook.io/untitled/reference/api-reference/api-list.md).

# Api list

## Login

<mark style="color:green;">`POST`</mark> `https://everyfootball.com/user/login`

User login

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark>       | string | User id     |
| password<mark style="color:red;">\*</mark> | string | password    |

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

```javascript
{
    "id": "id",
    "username": "username",
    "password": "password",
}
```

{% endtab %}

{% tab title="401 login fail message" %}

```
{ "Invalid user or Wrong password" }
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
err
```

{% endtab %}
{% endtabs %}

## Logout

<mark style="color:green;">`POST`</mark> `/user/logout`

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark>       | String |             |
| password<mark style="color:red;">\*</mark> | String |             |

## Check ID

<mark style="color:green;">`POST`</mark> `https://everyfootball.com/existedid`

#### Request Body

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| userid | String |             |

## signup

<mark style="color:green;">`POST`</mark> `https://everyfootball.com/user/signup`

#### Request Body

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| id<mark style="color:red;">\*</mark>            | String |             |
| password<mark style="color:red;">\*</mark>      | String |             |
| passwordCheck<mark style="color:red;">\*</mark> | String |             |
| name<mark style="color:red;">\*</mark>          | String |             |
| gender<mark style="color:red;">\*</mark>        | String |             |
| position<mark style="color:red;">\*</mark>      | String |             |
| matchtime                                       | String |             |
| matchlocation                                   | String |             |
| phonenumber<mark style="color:red;">\*</mark>   | String |             |

{% tabs %}
{% tab title="200: OK create new user" %}

```javascript
{
    "message" : "done!"
}
```

{% endtab %}

{% tab title="400: Bad Request fail" %}

```javascript
{
    "message" : "some thing wrong"
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
err
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    "message" : "Id already useing!"
}
```

{% endtab %}
{% endtabs %}

## signout

<mark style="color:green;">`POST`</mark> `https://everyfootball.com/user/signout`

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT token   |

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

```javascript
{
    "message":"successfully signed out!"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message" : "you're currently not logined"
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
err
```

{% endtab %}
{% endtabs %}

## get userinfo

<mark style="color:blue;">`GET`</mark> `https://everyfootball.com/user/userinfo`

#### Path Parameters

| Name   | Type   | Description |
| ------ | ------ | ----------- |
| userid | String |             |

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

```javascript
{
    "userinfo" : {
        "username" : "username",
        "id" : "id",
        "location" : "location",
        "time" : "time",
        "position" : "position",
        "gender" : "gender",
        "birth" : "birth",
        "penalty" : "penalty"
        },
        
    "record" : {
        "totalmatch" : "totalmatch",
        "penalty" : "penalty",
        "totalgoal" : "totalgoal",
        "avggoal" : "avggoal",
        "totalassist" : "totalassist",
        "avgassist" : "avgassist"},
        
    "matchdata" : [{
        "matchday" : "matchday",
        "winlose" : "winlose",
        "goal" : "goal",
        "assist" : "assist"},
        {
        "matchday" : "matchday",
        "winlose" : "winlose",
        "goal" : "goal",
        "assist" : "assist"}]
        
}
```

{% endtab %}
{% endtabs %}

## change user info

<mark style="color:green;">`POST`</mark> `https://everyfootball.com/user/changeinfo`

#### Request Body

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| phonenumber<mark style="color:red;">\*</mark>   | String |             |
| position                                        | String |             |
| location                                        | String |             |
| time                                            | String |             |
| birth<mark style="color:red;">\*</mark>         | String |             |
| id<mark style="color:red;">\*</mark>            | String |             |
| passoword<mark style="color:red;">\*</mark>     | String |             |
| passwordCheck<mark style="color:red;">\*</mark> | String |             |
| gender<mark style="color:red;">\*</mark>        | String |             |

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

```javascript
{
    "id" : "id",
    "phonenumber" : "phonenumber",
    "birth" : "birth",
    "gender" : "gender",
    "position" : "position",
    "location" : "locatcion",
    "time" : "time",
    "birth" : "birth"
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
err
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message" : "check the password"
}
```

{% endtab %}
{% endtabs %}

## get record

<mark style="color:blue;">`GET`</mark> `https://everyfootball.com/match/record`

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

```javascript
{
    "topplay" : {
        "mostgoal" : {
            "name" : "name",
            "goal" : "goal"},
        "mostassist" : {
            "name" : "name",
            "assist" : "assist"},
        "mostpoint" : {
            "name" : "name",
            "point" : "point"},
    "ranker" : [{
        "rank" : "rank",
        "name" : "name",
        "goal" : "goal",
        "assist" : "assist",
        "point" : "point",
        "totalmatch" : "totalmatch"
        },{
        "rank" : "rank",
        "name" : "name",
        "goal" : "goal",
        "assist" : "assist",
        "point" : "point",
        "totalmatch" : "totalmatch"}]
}
```

{% endtab %}
{% endtabs %}

## send match result

<mark style="color:green;">`POST`</mark> `https://everyfootball.com/match/result`

#### Request Body

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| userid<mark style="color:red;">\*</mark>  | String |             |
| goal                                      | String |             |
| shooting                                  | String |             |
| assist                                    | String |             |
| matchid<mark style="color:red;">\*</mark> | String |             |

## show matchdata

<mark style="color:blue;">`GET`</mark> `https://everyfootball.com/match/matchlist`

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

```javascript
{
    "list" :[{
        "matchid" : "matchid"
        "location" : "location"
        "gender" : "gender"
        "participants" : "participants"},
        {
        "matchid" : "matchid"
        "location" : "location"
        "gender" : "gender"
        "participants" : "participants"},
        {
        "matchid" : "matchid"
        "location" : "location"
        "gender" : "gender"
        "participants" : "participants"},
        ]
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```
{
    "message" : "something wrong!"
}
```

{% endtab %}
{% endtabs %}

## post match data

<mark style="color:blue;">`GET`</mark> `https://everyfootball.com/match/data?matchid=?`

#### Query Parameters

| Name                                      | Type   | Description |
| ----------------------------------------- | ------ | ----------- |
| matchid<mark style="color:red;">\*</mark> | String |             |

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

```javascript
{
    "id" : "id",
    "goal" : "goal",
    "shoot" : "shoot",
    "assist" : "assist",
    "matchid" : "matchid"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```javascript
{
    "message" : "something wrong!"
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```javascript
err
```

{% endtab %}
{% endtabs %}

## join match

<mark style="color:blue;">`GET`</mark> `https://everyfootball.com/match/joinmatch?matchid=?`

#### Request Body

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | String |             |

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

```javascript
{
   "playerlist" : [{
   "id" : "id",
   "gender" : "gender",
   "position" : "position",
   "penalty" : "paenalty"},
   {
   "id" : "id",
   "gender" : "gender",
   "position" : "position",
   "penalty" : "paenalty"},
   {
   "id" : "id",
   "gender" : "gender",
   "position" : "position",
   "penalty" : "paenalty"}]
}
```

{% endtab %}
{% endtabs %}

## Leave match

<mark style="color:blue;">`GET`</mark> `https://everyfootball.com/match/leavematch?matchid=?`

#### Request Body

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | String |             |

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

```javascript
 { 
    "playerlist" : [{
   "id" : "id",
   "gender" : "gender",
   "position" : "position",
   "penalty" : "paenalty"},
   {
   "id" : "id",
   "gender" : "gender",
   "position" : "position",
   "penalty" : "paenalty"},
   {
   "id" : "id",
   "gender" : "gender",
   "position" : "position",
   "penalty" : "paenalty"}]
}
```

{% endtab %}
{% endtabs %}
