add cloud to readme

This commit is contained in:
Evgeny
2021-10-24 13:11:49 +03:00
parent c4fdc6549a
commit 37e485917a
2 changed files with 22 additions and 0 deletions

View File

@@ -185,6 +185,17 @@ Function returns the weather data in the `on_weather_result(result)` callback, w
* `wind_speed` - wind speed;
* `wind_direction` - wind direction.
# Cloud
* `cloud:get_metadata(path)` - returns a table with file metadata;
* `cloud:get_file(path)` - returns the contents of the file;
* `cloud:put_file(sting, path)` - writes a string to the file;
* `cloud:remove_file(path)` - deletes file;
* `cloud:list_dir(path)` - returns metadata table of all files and subdirectories;
* `cloud:create_dir(path)` - creates directory;
All data are returned in `on_cloud_result(meta, content)`. The first argument is the metadata, either a metadata table (in the case of `list_dir()`) or an error message string. The second argument is the contents of the file (in the case of `get_file()`).
# Settings
* `settings:get()` - returns the settings table in an array of words format;

View File

@@ -185,6 +185,17 @@ ui:show_context_menu({
* `wind_speed` - скорость ветра;
* `wind_direction` - направление ветра.
# Облако
* `cloud:get_metadata(path)` - возвращает таблицу с метаданными файла;
* `cloud:get_file(path)` - возвращает содержимое файла;
* `cloud:put_file(sting, path)` - записывает строку в файл;
* `cloud:remove_file(path)` - удаляет файл;
* `cloud:list_dir(path)` - возвращает таблицу таблиц метаданных всех файлов и подкаталогов;
* `cloud:create_dir(path)` - создает каталог;
Все данные возвращаются в `on_cloud_result(meta, content)`. Первый аргумент - это метаданные, либо таблица метаданных (в случае с `list_dir()`), либо строка с сообщением об ошибке. Второй аргумент - содержимое файла (в случае `get_file()`).
# Настройки
* `settings:get()` - возвращает таблицу настроек в формате массива слов;