# Kumo

### Current Weather

```javascript
ksoft.kumo.weather(location, options);
```

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

| Parameter     | Type                                                                                |
| ------------- | ----------------------------------------------------------------------------------- |
| **location**  | **String (city name or coordinates)**                                               |
| options.units | String: "si" \| "us" \| "uk2" \| "ca" \| "auto"                                     |
| options.lang  | String (find avaible langs [here](https://docs.ksoft.si/api/kumo-api#weather-easy)) |

{% hint style="success" %}
**Success:** WeatherReport
{% endhint %}

{% hint style="danger" %}
**Not Found:** throws Error
{% endhint %}
{% endtab %}

{% tab title="Examples" %}

```javascript
ksoft.kumo.weather('-21.4, 13.2')
    .catch(err => console.log(err.message));
```

```javascript
ksoft.kumo.weather('Berlin, Germany', { units: 'si', lang: 'de' });
```

{% endtab %}
{% endtabs %}

### GeoIP lookup

```javascript
ksoft.kumo.geoip(ip);
```

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

| Parameter | Type       |
| --------- | ---------- |
| **ip**    | **String** |

{% hint style="success" %}
**Success:** Returns IPRecord
{% endhint %}
{% endtab %}

{% tab title="Example" %}

```javascript
ksoft.kumo.geoip('1.1.1.1');
```

{% endtab %}
{% endtabs %}

### Currency Conversion

```javascript
ksoft.kumo.convert(value, from, to);
```

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

| Parameter | Type                                                                                 |
| --------- | ------------------------------------------------------------------------------------ |
| **value** | **Number**                                                                           |
| **from**  | **String (of** [**these**](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)**)** |
| **to**    | **String (of** [**these**](https://en.wikipedia.org/wiki/ISO_4217#Active_codes)**)** |

{% hint style="success" %}
**Success:** Returns Conversion
{% endhint %}
{% endtab %}

{% tab title="Example" %}

```javascript
ksoft.kumo.convert(12.20, 'EUR', 'USD');
```

{% endtab %}
{% endtabs %}
