# Hamster

## Get a hamster image

<mark style="color:blue;">`GET`</mark> `https://api.night-api.com/images/animals/hamster/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| ID   | Number | An image ID |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| authorization<mark style="color:red;">\*</mark> | String | Your API key |

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

```javascript
{ 
    status: 400, 
    content: 'Clé invalide' 
}
```

{% endtab %}

{% tab title="200: OK Good request" %}

```javascript
{
    "status": 200,
    "content": {
        "id": 61,
        "url": "https://cdn.night-api.com/api/images/animals/hamster/ToI1QDI7f2NVHaujjz67s9NWFDUsxx.png"
    }
}
```

{% endtab %}
{% endtabs %}

```javascript
const axios = require("axios");

axios.get('https://api.night-api.com/images/animals/hamster', {
    headers: {
        authorization: "Your API token"
    }
})
.then(function (response) {
    console.log(response.data);
})
```
