# New User Contest


## Sports List

<small class="badge badge-darkred">requires authentication</small>

Use this endpoint to get the list of active games (sports) with contest availability.
If there are no contests available for a game, the `contest_available` field will be false.

> Example request:

```bash
curl -X GET \
    -G "https://apiqa.bettorfantasy.com/new-user-contest/sports" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200):

```json
{
    "message": "Games",
    "data": {
        "games": [
            {
                "id": 1,
                "name": "NFL",
                "image": "http:\/\/127.0.0.1:8000\/images\/icon-football-v2.png",
                "status": "Active",
                "sequence": 0,
                "contest_available": false
            },
            {
                "id": 2,
                "name": "NBA",
                "image": "http:\/\/127.0.0.1:8000\/images\/icon-basketball-v2.png",
                "status": "Active",
                "sequence": 0,
                "contest_available": false
            },
            {
                "id": 3,
                "name": "MLB",
                "image": "http:\/\/127.0.0.1:8000\/images\/icon-baseball-v2.png",
                "status": "Active",
                "sequence": 0,
                "contest_available": true
            }
        ]
    }
}
```
<div id="execution-results-GETnew-user-contest-sports" hidden>
    <blockquote>Received response<span id="execution-response-status-GETnew-user-contest-sports"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETnew-user-contest-sports"></code></pre>
</div>
<div id="execution-error-GETnew-user-contest-sports" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETnew-user-contest-sports"></code></pre>
</div>
<form id="form-GETnew-user-contest-sports" data-method="GET" data-path="new-user-contest/sports" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('GETnew-user-contest-sports', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-GETnew-user-contest-sports" onclick="tryItOut('GETnew-user-contest-sports');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETnew-user-contest-sports" onclick="cancelTryOut('GETnew-user-contest-sports');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-GETnew-user-contest-sports" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>new-user-contest/sports</code></b>
</p>
<p>
<label id="auth-GETnew-user-contest-sports" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETnew-user-contest-sports" data-component="header"></label>
</p>
</form>


## Update Game On Status

<small class="badge badge-darkred">requires authentication</small>

Use this end point to update status of game on.

> Example request:

```bash
curl -X GET \
    -G "https://apiqa.bettorfantasy.com/new-user-contest/complete" \
    -H "Authorization: Bearer {YOUR_AUTH_KEY}" \
    -H "Content-Type: application/json" \
    -H "Accept: application/json"
```


> Example response (200):

```json
{
    "message": "User game on status completed successfully"
}
```
> Example response (404):

```json
{
    "message": "User not found!"
}
```
<div id="execution-results-GETnew-user-contest-complete" hidden>
    <blockquote>Received response<span id="execution-response-status-GETnew-user-contest-complete"></span>:</blockquote>
    <pre class="json"><code id="execution-response-content-GETnew-user-contest-complete"></code></pre>
</div>
<div id="execution-error-GETnew-user-contest-complete" hidden>
    <blockquote>Request failed with error:</blockquote>
    <pre><code id="execution-error-message-GETnew-user-contest-complete"></code></pre>
</div>
<form id="form-GETnew-user-contest-complete" data-method="GET" data-path="new-user-contest/complete" data-authed="1" data-hasfiles="0" data-headers='{"Authorization":"Bearer {YOUR_AUTH_KEY}","Content-Type":"application\/json","Accept":"application\/json"}' onsubmit="event.preventDefault(); executeTryOut('GETnew-user-contest-complete', this);">
<h3>
    Request&nbsp;&nbsp;&nbsp;
        <button type="button" style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-tryout-GETnew-user-contest-complete" onclick="tryItOut('GETnew-user-contest-complete');">Try it out ⚡</button>
    <button type="button" style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-canceltryout-GETnew-user-contest-complete" onclick="cancelTryOut('GETnew-user-contest-complete');" hidden>Cancel</button>&nbsp;&nbsp;
    <button type="submit" style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" id="btn-executetryout-GETnew-user-contest-complete" hidden>Send Request 💥</button>
    </h3>
<p>
<small class="badge badge-green">GET</small>
 <b><code>new-user-contest/complete</code></b>
</p>
<p>
<label id="auth-GETnew-user-contest-complete" hidden>Authorization header: <b><code>Bearer </code></b><input type="text" name="Authorization" data-prefix="Bearer " data-endpoint="GETnew-user-contest-complete" data-component="header"></label>
</p>
</form>



