add weather info to the README
This commit is contained in:
18
README.md
18
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).
|
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
|
# Lifecycle callbacks
|
||||||
|
|
||||||
The work of any script begins with one of the three described functions. Main work should be done in one of them.
|
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;
|
* `name` - contact name;
|
||||||
* `number` - contact number.
|
* `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
|
||||||
|
|
||||||
* `settings:get()` - returns the settings table in an array of words format;
|
* `settings:get()` - returns the settings table in an array of words format;
|
||||||
|
|||||||
18
README_ru.md
18
README_ru.md
@@ -4,6 +4,11 @@
|
|||||||
|
|
||||||
Возможности скриптов ограничены, но с их помощью можно практически безгранично расширять функциональность приложения (посмотрите примеры в этом репозитории).
|
Возможности скриптов ограничены, но с их помощью можно практически безгранично расширять функциональность приложения (посмотрите примеры в этом репозитории).
|
||||||
|
|
||||||
|
# Изменения
|
||||||
|
|
||||||
|
* 4.0.0 - первая версия с поддержкой скриптов;
|
||||||
|
* 4.1.0 - добавлены модули `weather` и `cloud`;
|
||||||
|
|
||||||
# Функции (колбеки) жизненного цикла
|
# Функции (колбеки) жизненного цикла
|
||||||
|
|
||||||
Работа любого скрипта-виджета начинается с одной из трех описанных функций. Именно внутри них следует выполнять основную работу и выводить на экран данные.
|
Работа любого скрипта-виджета начинается с одной из трех описанных функций. Именно внутри них следует выполнять основную работу и выводить на экран данные.
|
||||||
@@ -167,6 +172,19 @@ ui:show_context_menu({
|
|||||||
* `name` - имя контакта;
|
* `name` - имя контакта;
|
||||||
* `number` - номер контакта.
|
* `number` - номер контакта.
|
||||||
|
|
||||||
|
# Погода
|
||||||
|
|
||||||
|
* `weather:get_by_hour()` - выполняет запрос почасовой погоды.
|
||||||
|
|
||||||
|
Функция возвращает данные о погоде в колбеке `on_weather_result(result)`, где `result` - это таблица таблиц со следующими полями:
|
||||||
|
|
||||||
|
* `time` - время в секундах;
|
||||||
|
* `temp` - температура;
|
||||||
|
* `icon_code` - код иконки погоды;
|
||||||
|
* `humidity` - влажность;
|
||||||
|
* `wind_speed` - скорость ветра;
|
||||||
|
* `wind_direction` - направление ветра.
|
||||||
|
|
||||||
# Настройки
|
# Настройки
|
||||||
|
|
||||||
* `settings:get()` - возвращает таблицу настроек в формате массива слов;
|
* `settings:get()` - возвращает таблицу настроек в формате массива слов;
|
||||||
|
|||||||
Reference in New Issue
Block a user