# API

## GetWeatherData

Can be used both on client and server side

```lua
local data = exports.uniq_weathersync:GetWeatherData()
print(json.encode(data, {indent = true}))

-- print should look like this
{
    weather = 'EXTRASUNNY',
    min = 0,
    hour = 0
}
```

## GetTime

Can be used both on client and server side

```lua
local time = exports.uniq_weathersync:GetTime()
print(json.encode(time, {indent = true}))

-- print should look like this

{
    hour = 19,
    min = 34
}
```

## GetWeather

Can be used both on client and server side

```lua
local weather = exports.uniq_weathersync:GetWeather()
print(weather)
```

## FreezeTimePlayer

Will freeze both time and weather from syncing for specific player (will reapply last fetched weather & time from API), server side export

```lua
exports.uniq_weathersync:FreezeTimePlayer(playerId)
```
