Jump to content
MediaWiki

Extension:MassMessage/API/ru

From mediawiki.org
This page is a translated version of the page Extension:MassMessage/API and the translation is 30% complete.

Отправка сообщений

massmessage

Этот модуль не может быть использован в качестве генератора.
Префикс
Необходимые права massmessage
Только POST? Да
Генерируемая справка Текущее


You can use the API with action=massmessage to send messages.

Параметры

  • spamlistPage containing list of pages to send messages to
  • subjectSubject line of message
  • messageBody of message
  • tokenEdit 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.
Результат
<?xml version="1.0"?>
<api>
<massmessageresult="success"count="500"/>
</api>

Возвращаемые поля

  • result – "success" if message was sent properly.
  • counthow 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.

Параметры

  • spamlistTitle of the delivery list to update
  • addTitles to add to the list
  • removeTitles to remove from the list
  • token – 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.
Результат
<?xml version="1.0"?>
<api>
<editmassmessagelistresult="Done">
<added>
<pagetitle="User talk:Foo"missing=""/>
</added>
<invalidadd>
<iteminvalidtitle=""xml:space="preserve">_</item>
</invalidadd>
<removed>
<pagetitle="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 request
    • missing – 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 any
    • invalidtitle – If the attribute exists, the title is invalid
    • invalidsite – If the attribute exists, the site is invalid
  • removed – List of pages removed, if "remove" was specified in the request
  • invalidremove – List of pages that could not be removed because they weren't in the list, if any

AltStyle によって変換されたページ (->オリジナル) /