]> git.stg.codes - stg.git/blob - doc/xmlrpc/API-messages.xml
Made getters work.
[stg.git] / doc / xmlrpc / API-messages.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook">
3     <title>Управление сообщениями пользователю</title>
4     <para>В этом разделе собраны вызовы API для отправки сообщений пользователям.</para>
5     <refentry id="stargazer.send_user_message">
6         <refmeta>
7             <refentrytitle>stargazer.send_user_message</refentrytitle>
8         </refmeta>
9         <refnamediv>
10             <refname>stargazer.send_user_message</refname>
11             <refpurpose>Отправляет сообщение пользователям</refpurpose>
12         </refnamediv>
13         <refsynopsisdiv>
14             <funcsynopsis>
15                 <funcprototype>
16                     <funcdef><function>stargazer.send_user_message</function></funcdef>
17                     <paramdef>string <parameter>cookie</parameter></paramdef>
18                     <paramdef>array of strings <parameter>logins</parameter></paramdef>
19                     <paramdef>struct <parameter>info</parameter></paramdef>
20                 </funcprototype>
21             </funcsynopsis>
22         </refsynopsisdiv>
23         <refsect1>
24             <title>Description</title>
25             <para>Метод <function>stargazer.send_user_message</function> отправляет сообщение пользователям, логины которых перечислены в списке.</para>
26             <variablelist>
27                 <varlistentry>
28                     <term>string <parameter>cookie</parameter></term>
29                     <listitem>
30                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
31                     </listitem>
32                 </varlistentry>
33                 <varlistentry>
34                     <term>array of strings <parameter>logins</parameter></term>
35                     <listitem>
36                         <para>Список логинов пользователей</para>
37                     </listitem>
38                 </varlistentry>
39                 <varlistentry>
40                     <term>struct <parameter>info</parameter></term>
41                     <listitem>
42                         <para>
43                             Структура с параметрами сообщения:
44                             <variablelist>
45                                 <varlistentry>
46                                     <term>int <parameter>version</parameter></term>
47                                     <listitem>
48                                         <para>Версия системы сообщений (не обязательный параметр, по умолчанию - 1)</para>
49                                     </listitem>
50                                 </varlistentry>
51                             </variablelist>
52                             <variablelist>
53                                 <varlistentry>
54                                     <term>int <parameter>type</parameter></term>
55                                     <listitem>
56                                         <para>Тип сообщения (не обязательный параметр, по умолчанию - 1)</para>
57                                     </listitem>
58                                 </varlistentry>
59                             </variablelist>
60                             <variablelist>
61                                 <varlistentry>
62                                     <term>int <parameter>repeat</parameter></term>
63                                     <listitem>
64                                         <para>Количество показов сообщеня</para>
65                                     </listitem>
66                                 </varlistentry>
67                             </variablelist>
68                             <variablelist>
69                                 <varlistentry>
70                                     <term>int <parameter>repeat_period</parameter></term>
71                                     <listitem>
72                                         <para>Период повторения показа сообщений (в минутах)</para>
73                                     </listitem>
74                                 </varlistentry>
75                             </variablelist>
76                             <variablelist>
77                                 <varlistentry>
78                                     <term>int <parameter>show_time</parameter></term>
79                                     <listitem>
80                                         <para>Время отображения сообщения (в секундах)</para>
81                                     </listitem>
82                                 </varlistentry>
83                             </variablelist>
84                             <variablelist>
85                                 <varlistentry>
86                                     <term>string <parameter>text</parameter></term>
87                                     <listitem>
88                                         <para>Текст сообщения в кодировке UTF-8</para>
89                                     </listitem>
90                                 </varlistentry>
91                             </variablelist>
92                         </para>
93                     </listitem>
94                 </varlistentry>
95             </variablelist>
96             <refsect2>
97                 <title>Return Value</title>
98                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
99             </refsect2>
100         </refsect1>
101     </refentry>
102 </chapter>