github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/doc/content/ru/docs/plugins/notify/messagebird.md (about)

     1  
     2  ---
     3  title: "Messagebird"
     4  linkTitle: "messagebird"
     5  date: 2021-10-20
     6  description: >
     7  
     8  ---
     9  
    10  Отправка sms уведомлений через провайдера услуг оповещения [messagebird](https://messagebird.com). Для возможности 
    11  отправки сообщений потребуется регистрация в [messagebird](https://messagebird.com), и положительный баланс.
    12  
    13  ### Настройка
    14  * Access Key
    15  * Name
    16  
    17  ### Атрибуты
    18  * Payment
    19  * Type
    20  * Amount
    21  
    22  ### javascript свойства
    23  
    24  ----------------
    25  
    26  ### Новое сообщение
    27  
    28  создает объект сообщения
    29  
    30  ```coffeescript
    31  msg = notifr.newMessage();
    32  msg.entity_id = 'messagebird.name';
    33  msg.attributes = {
    34    'phone': '+79990000001',
    35    'body': 'some text'
    36  };
    37  
    38  ```
    39  |  значение  | описание  |
    40  |-------------|---------|
    41  | newMessage() |    метод   |
    42  | msg |   type: Object (Message)  |
    43  
    44  ----------------
    45  
    46  ### пример кода
    47  
    48  ```coffeescript
    49  # messagebird
    50  # ##################################
    51  
    52  sendMsg =(body)->
    53    msg = notifr.newMessage();
    54    msg.entity_id = 'messagebird.name';
    55    msg.attributes = {
    56      'phone': '+79990000001',
    57      'body': 'some text'
    58    };
    59    notifr.send(msg);
    60  ```
    61