diff --git a/README.md b/README.md index 93d3a8b..8b1554c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,11 @@ Starting from version 4.0, AIO Launcher supports scripts, or rather special widg The possibilities of scripts are limited, but they can be used to expand the functionality of the application almost limitlessly (see examples in this repository). +# Changelog + +* 4.0.0 - first version with scripts support; +* 4.1.0 - added `weather` and `cloud` modules; + # Lifecycle callbacks The work of any script begins with one of the three described functions. Main work should be done in one of them. @@ -167,6 +172,19 @@ Contacts table format: * `name` - contact name; * `number` - contact number. +# Weather + +* `weather:get_by_hour()` - performs hourly weather query. + +Function returns the weather data in the `on_weather_result(result)` callback, where `result` is a table of tables with the following fields: + +* `time` - time in seconds; +* `temp` - temperature; +* `icon_code` - code of weather icon; +* `humidity` - humidity; +* `wind_speed` - wind speed; +* `wind_direction` - wind direction. + # Settings * `settings:get()` - returns the settings table in an array of words format; diff --git a/README_ru.md b/README_ru.md index f1c5ae9..9bf2d52 100644 --- a/README_ru.md +++ b/README_ru.md @@ -4,6 +4,11 @@ Возможности скриптов ограничены, но с их помощью можно практически безгранично расширять функциональность приложения (посмотрите примеры в этом репозитории). +# Изменения + +* 4.0.0 - первая версия с поддержкой скриптов; +* 4.1.0 - добавлены модули `weather` и `cloud`; + # Функции (колбеки) жизненного цикла Работа любого скрипта-виджета начинается с одной из трех описанных функций. Именно внутри них следует выполнять основную работу и выводить на экран данные. @@ -167,6 +172,19 @@ ui:show_context_menu({ * `name` - имя контакта; * `number` - номер контакта. +# Погода + +* `weather:get_by_hour()` - выполняет запрос почасовой погоды. + +Функция возвращает данные о погоде в колбеке `on_weather_result(result)`, где `result` - это таблица таблиц со следующими полями: + +* `time` - время в секундах; +* `temp` - температура; +* `icon_code` - код иконки погоды; +* `humidity` - влажность; +* `wind_speed` - скорость ветра; +* `wind_direction` - направление ветра. + # Настройки * `settings:get()` - возвращает таблицу настроек в формате массива слов;