]> git.stg.codes - stg.git/blob - doc/xmlrpc/API-admins.xml
Immediate disconnect on Unauthorize if not authorized.
[stg.git] / doc / xmlrpc / API-admins.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.get_admin">
6         <refmeta>
7             <refentrytitle>stargazer.get_admin</refentrytitle>
8         </refmeta>
9         <refnamediv>
10             <refname>stargazer.get_admin</refname>
11             <refpurpose>Получает информацию об администраторе системы</refpurpose>
12         </refnamediv>
13         <refsynopsisdiv>
14             <funcsynopsis>
15                 <funcprototype>
16                     <funcdef><function>stargazer.get_admin</function></funcdef>
17                     <paramdef>string <parameter>cookie</parameter></paramdef>
18                     <paramdef>string <parameter>login</parameter></paramdef>
19                 </funcprototype>
20             </funcsynopsis>
21         </refsynopsisdiv>
22         <refsect1>
23             <title>Description</title>
24             <para>Метод <function>stargazer.get_admin</function> получает информацию об администраторе системы.</para>
25             <variablelist>
26                 <varlistentry>
27                     <term>string <parameter>cookie</parameter></term>
28                     <listitem>
29                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
30                     </listitem>
31                 </varlistentry>
32                 <varlistentry>
33                     <term>string <parameter>login</parameter></term>
34                     <listitem>
35                         <para>Логин администратора</para>
36                     </listitem>
37                 </varlistentry>
38             </variablelist>
39             <refsect2>
40                 <title>Return Value</title>
41                 <para>
42                     Возвращает структуру:
43                     <variablelist>
44                         <varlistentry>
45                             <term>boolean <parameter>result</parameter></term>
46                             <listitem>
47                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
48                             </listitem>
49                         </varlistentry>
50                         <varlistentry>
51                             <term>string <parameter>login</parameter></term>
52                             <listitem>
53                                 <para>Логин администратора</para>
54                             </listitem>
55                         </varlistentry>
56                         <varlistentry>
57                             <term>boolean <parameter>user_stat</parameter></term>
58                             <listitem>
59                                 <para>Право на изменение статистики пользователя (включая состояние счета)</para>
60                             </listitem>
61                         </varlistentry>
62                         <varlistentry>
63                             <term>boolean <parameter>user_conf</parameter></term>
64                             <listitem>
65                                 <para>Право на изменение конфигурации пользователя (включая пароль)</para>
66                             </listitem>
67                         </varlistentry>
68                         <varlistentry>
69                             <term>boolean <parameter>user_cash</parameter></term>
70                             <listitem>
71                                 <para>Право на изменение состояния счета пользователя</para>
72                             </listitem>
73                         </varlistentry>
74                         <varlistentry>
75                             <term>boolean <parameter>user_passwd</parameter></term>
76                             <listitem>
77                                 <para>Право на изменение пароля пользователя</para>
78                             </listitem>
79                         </varlistentry>
80                         <varlistentry>
81                             <term>boolean <parameter>user_add_del</parameter></term>
82                             <listitem>
83                                 <para>Право на добавление и удаление пользователей</para>
84                             </listitem>
85                         </varlistentry>
86                         <varlistentry>
87                             <term>boolean <parameter>admin_chg</parameter></term>
88                             <listitem>
89                                 <para>Право на управление администраторами</para>
90                             </listitem>
91                         </varlistentry>
92                         <varlistentry>
93                             <term>boolean <parameter>tariff_chg</parameter></term>
94                             <listitem>
95                                 <para>Право на управление тарифами</para>
96                             </listitem>
97                         </varlistentry>
98                     </variablelist>
99                 </para>
100             </refsect2>
101         </refsect1>
102         <refsect1>
103             <title>See also</title>
104             <para>
105                 <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
106                 <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
107                 <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
108                 <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
109             </para>
110         </refsect1>
111     </refentry>
112     <refentry id="stargazer.get_admins">
113         <refmeta>
114             <refentrytitle>stargazer.get_admins</refentrytitle>
115         </refmeta>
116         <refnamediv>
117             <refname>stargazer.get_admins</refname>
118             <refpurpose>Получает информацию об админах</refpurpose>
119         </refnamediv>
120         <refsynopsisdiv>
121             <funcsynopsis>
122                 <funcprototype>
123                     <funcdef><function>stargazer.get_admins</function></funcdef>
124                     <paramdef>string <parameter>cookie</parameter></paramdef>
125                 </funcprototype>
126             </funcsynopsis>
127         </refsynopsisdiv>
128         <refsect1>
129             <title>Description</title>
130             <para>Метод <function>stargazer.get_admins</function> получает информацию об админах, зарегистрированных в системе.</para>
131             <variablelist>
132                 <varlistentry>
133                     <term>string <parameter>cookie</parameter></term>
134                     <listitem>
135                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
136                     </listitem>
137                 </varlistentry>
138             </variablelist>
139             <refsect2>
140                 <title>Return Value</title>
141                 <para>
142                     Возвращает массив структур:
143                     <variablelist>
144                         <varlistentry>
145                             <term>boolean <parameter>result</parameter></term>
146                             <listitem>
147                                 <para>Результат операции. true - успешно, false - неудача (неправильный или устаревший cookie, неправильное название тарифа).</para>
148                             </listitem>
149                         </varlistentry>
150                         <varlistentry>
151                             <term>string <parameter>login</parameter></term>
152                             <listitem>
153                                 <para>Логин администратора</para>
154                             </listitem>
155                         </varlistentry>
156                         <varlistentry>
157                             <term>boolean <parameter>user_stat</parameter></term>
158                             <listitem>
159                                 <para>Право на изменение статистики пользователя (включая состояние счета)</para>
160                             </listitem>
161                         </varlistentry>
162                         <varlistentry>
163                             <term>boolean <parameter>user_conf</parameter></term>
164                             <listitem>
165                                 <para>Право на изменение конфигурации пользователя (включая пароль)</para>
166                             </listitem>
167                         </varlistentry>
168                         <varlistentry>
169                             <term>boolean <parameter>user_cash</parameter></term>
170                             <listitem>
171                                 <para>Право на изменение состояния счета пользователя</para>
172                             </listitem>
173                         </varlistentry>
174                         <varlistentry>
175                             <term>boolean <parameter>user_passwd</parameter></term>
176                             <listitem>
177                                 <para>Право на изменение пароля пользователя</para>
178                             </listitem>
179                         </varlistentry>
180                         <varlistentry>
181                             <term>boolean <parameter>user_add_del</parameter></term>
182                             <listitem>
183                                 <para>Право на добавление и удаление пользователей</para>
184                             </listitem>
185                         </varlistentry>
186                         <varlistentry>
187                             <term>boolean <parameter>admin_chg</parameter></term>
188                             <listitem>
189                                 <para>Право на управление администраторами</para>
190                             </listitem>
191                         </varlistentry>
192                         <varlistentry>
193                             <term>boolean <parameter>tariff_chg</parameter></term>
194                             <listitem>
195                                 <para>Право на управление тарифами</para>
196                             </listitem>
197                         </varlistentry>
198                     </variablelist>
199                 </para>
200             </refsect2>
201         </refsect1>
202         <refsect1>
203             <title>See also</title>
204             <para>
205                 <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
206                 <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
207                 <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
208                 <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
209             </para>
210         </refsect1>
211     </refentry>
212     <refentry id="stargazer.del_admin">
213         <refmeta>
214             <refentrytitle>stargazer.del_admin</refentrytitle>
215         </refmeta>
216         <refnamediv>
217             <refname>stargazer.del_admin</refname>
218             <refpurpose>Удаляет администратора из системы</refpurpose>
219         </refnamediv>
220         <refsynopsisdiv>
221             <funcsynopsis>
222                 <funcprototype>
223                     <funcdef><function>stargazer.del_admin</function></funcdef>
224                     <paramdef>string <parameter>cookie</parameter></paramdef>
225                     <paramdef>string <parameter>login</parameter></paramdef>
226                 </funcprototype>
227             </funcsynopsis>
228         </refsynopsisdiv>
229         <refsect1>
230             <title>Description</title>
231             <para>Метод <function>stargazer.del_admin</function> удаляет администратора из системы.</para>
232             <variablelist>
233                 <varlistentry>
234                     <term>string <parameter>cookie</parameter></term>
235                     <listitem>
236                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
237                     </listitem>
238                 </varlistentry>
239                 <varlistentry>
240                     <term>string <parameter>login</parameter></term>
241                     <listitem>
242                         <para>Логин удаляемого администратора</para>
243                     </listitem>
244                 </varlistentry>
245             </variablelist>
246             <refsect2>
247                 <title>Return Value</title>
248                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
249             </refsect2>
250         </refsect1>
251         <refsect1>
252             <title>See also</title>
253             <para>
254                 <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
255                 <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
256                 <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>,
257                 <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
258             </para>
259         </refsect1>
260     </refentry>
261     <refentry id="stargazer.add_admin">
262         <refmeta>
263             <refentrytitle>stargazer.add_admin</refentrytitle>
264         </refmeta>
265         <refnamediv>
266             <refname>stargazer.add_admin</refname>
267             <refpurpose>Добавляет администратора в систему</refpurpose>
268         </refnamediv>
269         <refsynopsisdiv>
270             <funcsynopsis>
271                 <funcprototype>
272                     <funcdef><function>stargazer.add_admin</function></funcdef>
273                     <paramdef>string <parameter>cookie</parameter></paramdef>
274                     <paramdef>string <parameter>login</parameter></paramdef>
275                 </funcprototype>
276             </funcsynopsis>
277         </refsynopsisdiv>
278         <refsect1>
279             <title>Description</title>
280             <para>Метод <function>stargazer.add_admin</function> добавляет администратора в систему.</para>
281             <variablelist>
282                 <varlistentry>
283                     <term>string <parameter>cookie</parameter></term>
284                     <listitem>
285                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
286                     </listitem>
287                 </varlistentry>
288                 <varlistentry>
289                     <term>string <parameter>login</parameter></term>
290                     <listitem>
291                         <para>Логин добавляемого администратора</para>
292                     </listitem>
293                 </varlistentry>
294             </variablelist>
295             <refsect2>
296                 <title>Return Value</title>
297                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
298             </refsect2>
299         </refsect1>
300         <refsect1>
301             <title>See also</title>
302             <para>
303                 <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
304                 <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
305                 <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
306                 <link linkend="stargazer.chg_admin"><function>stargazer.chg_admin</function></link>
307             </para>
308         </refsect1>
309     </refentry>
310     <refentry id="stargazer.chg_admin">
311         <refmeta>
312             <refentrytitle>stargazer.chg_admin</refentrytitle>
313         </refmeta>
314         <refnamediv>
315             <refname>stargazer.chg_admin</refname>
316             <refpurpose>Изменяет права и/или пароль администратора</refpurpose>
317         </refnamediv>
318         <refsynopsisdiv>
319             <funcsynopsis>
320                 <funcprototype>
321                     <funcdef><function>stargazer.chg_admin</function></funcdef>
322                     <paramdef>string <parameter>cookie</parameter></paramdef>
323                     <paramdef>string <parameter>login</parameter></paramdef>
324                     <paramdef>struct <parameter>info</parameter></paramdef>
325                 </funcprototype>
326             </funcsynopsis>
327         </refsynopsisdiv>
328         <refsect1>
329             <title>Description</title>
330             <para>Метод <function>stargazer.chg_admin</function> изменяет права и/или пароль администратора системы. Допустимо частичное указание параметров в структуре info. В этом случае изменение затронет только указанные параметры. Дополнительные поля структуры (не входящие в описание) будут проигнорированы.</para>
331             <variablelist>
332                 <varlistentry>
333                     <term>string <parameter>cookie</parameter></term>
334                     <listitem>
335                         <para>Авторизационный cookie. Для авторизации в системе используется метод <function><link linkend="stargazer.login">stargazer.login</link></function></para>
336                     </listitem>
337                 </varlistentry>
338                 <varlistentry>
339                     <term>string <parameter>login</parameter></term>
340                     <listitem>
341                         <para>Логин изменяемого администратора</para>
342                     </listitem>
343                 </varlistentry>
344                 <varlistentry>
345                     <term>struct <parameter>info</parameter></term>
346                     <listitem>
347                         <para>
348                             Структура с информацией об админе:
349                             <variablelist>
350                                 <varlistentry>
351                                     <term>string <parameter>login</parameter></term>
352                                     <listitem>
353                                         <para>Логин администратора</para>
354                                     </listitem>
355                                 </varlistentry>
356                                 <varlistentry>
357                                     <term>string <parameter>password</parameter></term>
358                                     <listitem>
359                                         <para>Пароль администратора</para>
360                                     </listitem>
361                                 </varlistentry>
362                                 <varlistentry>
363                                     <term>boolean <parameter>user_stat</parameter></term>
364                                     <listitem>
365                                         <para>Право на изменение статистики пользователя (включая состояние счета)</para>
366                                     </listitem>
367                                 </varlistentry>
368                                 <varlistentry>
369                                     <term>boolean <parameter>user_conf</parameter></term>
370                                     <listitem>
371                                         <para>Право на изменение конфигурации пользователя (включая пароль)</para>
372                                     </listitem>
373                                 </varlistentry>
374                                 <varlistentry>
375                                     <term>boolean <parameter>user_cash</parameter></term>
376                                     <listitem>
377                                         <para>Право на изменение состояния счета пользователя</para>
378                                     </listitem>
379                                 </varlistentry>
380                                 <varlistentry>
381                                     <term>boolean <parameter>user_passwd</parameter></term>
382                                     <listitem>
383                                         <para>Право на изменение пароля пользователя</para>
384                                     </listitem>
385                                 </varlistentry>
386                                 <varlistentry>
387                                     <term>boolean <parameter>user_add_del</parameter></term>
388                                     <listitem>
389                                         <para>Право на добавление и удаление пользователей</para>
390                                     </listitem>
391                                 </varlistentry>
392                                 <varlistentry>
393                                     <term>boolean <parameter>admin_chg</parameter></term>
394                                     <listitem>
395                                         <para>Право на управление администраторами</para>
396                                     </listitem>
397                                 </varlistentry>
398                                 <varlistentry>
399                                     <term>boolean <parameter>tariff_chg</parameter></term>
400                                     <listitem>
401                                         <para>Право на управление тарифами</para>
402                                     </listitem>
403                                 </varlistentry>
404                             </variablelist>
405                         </para>
406                     </listitem>
407                 </varlistentry>
408             </variablelist>
409             <refsect2>
410                 <title>Return Value</title>
411                 <para>Возвращает true в случае успеха и false в случае неудачи</para>
412             </refsect2>
413         </refsect1>
414         <refsect1>
415             <title>See also</title>
416             <para>
417                 <link linkend="stargazer.get_admins"><function>stargazer.get_admins</function></link>,
418                 <link linkend="stargazer.get_admin"><function>stargazer.get_admin</function></link>,
419                 <link linkend="stargazer.del_admin"><function>stargazer.del_admin</function></link>,
420                 <link linkend="stargazer.add_admin"><function>stargazer.add_admin</function></link>
421             </para>
422         </refsect1>
423     </refentry>
424 </chapter>