Extension:MassMessage/API/ru
Appearance
Отправка сообщений
massmessage | |
---|---|
Этот модуль не может быть использован в качестве генератора. | |
Префикс | |
Необходимые права | massmessage |
Только POST? | Да |
Генерируемая справка | Текущее |
You can use the API with action=massmessage
to send messages.
Параметры
spamlist
- Page containing list of pages to send messages tosubject
- Subject line of messagemessage
- Body of messagetoken
- Edit token from action=tokens
Пример
For the sake of simplicity, all parameters are passed in a GET request in this example. However, this API action requires POST requests.
api.php? action=massmessage& spamlist=Wikipedia%20Signpost& subject=New%20Wikipedia%20Signpost& message=The%20new%20Signpost%20is%20ready%20for%20reading [попробуйте в ApiSandbox]
Результат |
---|
<?xml version="1.0"?>
<api>
<massmessage result="success" count="500" />
</api>
|
Возвращаемые поля
result
- "success" if message was sent properly.count
- how many messages were queued
Modifying delivery lists
editmassmessagelist | |
---|---|
Этот модуль не может быть использован в качестве генератора. | |
Префикс | |
Необходимые права | нет |
Только POST? | Да |
Генерируемая справка | Текущее |
ContentHandler-based delivery lists can be edited using the API with action=editmassmessagelist
. You can also use the standard action=edit , but that requires serializing the JSON yourself, and will result in less specific error messages.
Параметры
spamlist
- Title of the delivery list to updateadd
- Titles to add to the listremove
- Titles to remove from the listtoken
- Edit token from action=tokens
Пример
For the sake of simplicity, all parameters are passed in a GET request in this example. However, this API action requires POST requests.
api.php? action=editmassmessagelist& spamlist=Wikipedia%20Signpost& add=User%20%talk:Foo|_& remove=User%20talk:Baz|Baz [попробуйте в ApiSandbox]
Результат |
---|
<?xml version="1.0"?>
<api>
<editmassmessagelist result="Done">
<added>
<page title="User talk:Foo" missing="" />
</added>
<invalidadd>
<item invalidtitle="" xml:space="preserve">_</item>
</invalidadd>
<removed>
<page title="User talk:Baz" />
</removed>
<invalidremove>
<item>Baz</item>
</invalidremove>
</editmassmessagelist>
</api>
|
Возвращаемые поля
result
- "Success" if the entire request succeeded; "Done" if some or all of it failed.added
- List of pages added, if "add" was specified in the requestmissing
- If the attribute exists, the page does not exist on the wiki (for rendering redlinks)
invalidadd
- List of pages that could not be added, if anyinvalidtitle
- If the attribute exists, the title is invalidinvalidsite
- If the attribute exists, the site is invalid
removed
- List of pages removed, if "remove" was specified in the requestinvalidremove
- List of pages that could not be removed because they weren't in the list, if any