Difference between revisions of "Translations:Webhooks/6/ru"

From Larnitech wiki page
Jump to navigation Jump to search
(ru)
 
(No difference)

Latest revision as of 12:37, 5 November 2026

Information about message (contribute)
This message has no documentation. If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Webhooks)
== Example ==
The settings are stored in <code>/home/settings/webhooks.json</code>. Example with one event with feedback and two actions:
<syntaxhighlight lang="json" line>
{
  "events": [
   {
     "name": "997:1_button_pressed",
     "url": "https://maker.ifttt.com/trigger/997:1_button_pressed/with/key/YOUR_IFTTT_KEY",
     "method": "POST"
   },
   {
     "name": "447:145_sensor_state",
     "url": "https://example.com/weather.json",
     "feedback": { "addr": "447:145", "regexp": "/\"temp\":\"(-?[0-9]+)\",/" }
   }
  ],
  "actions": [
   {
     "name": "401:1_lamp_on",
     "status": [ { "request": "status-set", "addr": "401:1", "status": { "state": "on" } } ]
   },
   {
     "name": "401:1_lamp_reverse",
     "status": [ { "request": "status-set", "addr": "401:1", "status": { "state": "reverse" } } ]
   }
  ]
}
</syntaxhighlight>
Translation== Пример ==
Настройки хранятся в файле <code>/home/settings/webhooks.json</code>. Пример с событием с обратной связью и двумя действиями:
<syntaxhighlight lang="json" line>
{
  "events": [
   {
     "name": "997:1_button_pressed",
     "url": "https://maker.ifttt.com/trigger/997:1_button_pressed/with/key/YOUR_IFTTT_KEY",
     "method": "POST"
   },
   {
     "name": "447:145_sensor_state",
     "url": "https://example.com/weather.json",
     "feedback": { "addr": "447:145", "regexp": "/\"temp\":\"(-?[0-9]+)\",/" }
   }
  ],
  "actions": [
   {
     "name": "401:1_lamp_on",
     "status": [ { "request": "status-set", "addr": "401:1", "status": { "state": "on" } } ]
   },
   {
     "name": "401:1_lamp_reverse",
     "status": [ { "request": "status-set", "addr": "401:1", "status": { "state": "reverse" } } ]
   }
  ]
}
</syntaxhighlight>

Пример

Настройки хранятся в файле /home/settings/webhooks.json. Пример с событием с обратной связью и двумя действиями:

 1{
 2  "events": [
 3    {
 4      "name": "997:1_button_pressed",
 5      "url": "https://maker.ifttt.com/trigger/997:1_button_pressed/with/key/YOUR_IFTTT_KEY",
 6      "method": "POST"
 7    },
 8    {
 9      "name": "447:145_sensor_state",
10      "url": "https://example.com/weather.json",
11      "feedback": { "addr": "447:145", "regexp": "/\"temp\":\"(-?[0-9]+)\",/" }
12    }
13  ],
14  "actions": [
15    {
16      "name": "401:1_lamp_on",
17      "status": [ { "request": "status-set", "addr": "401:1", "status": { "state": "on" } } ]
18    },
19    {
20      "name": "401:1_lamp_reverse",
21      "status": [ { "request": "status-set", "addr": "401:1", "status": { "state": "reverse" } } ]
22    }
23  ]
24}