Merge "Improve discussiontoolssubscribe API documentation"

This commit is contained in:
jenkins-bot 2021-08-24 02:42:17 +00:00 committed by Gerrit Code Review
commit b1eb884966
3 changed files with 4 additions and 2 deletions

View file

@ -18,6 +18,8 @@
"apihelp-discussiontoolsedit-paramvalue-paction-addcomment": "Add a new comment as a reply to an existing comment.",
"apihelp-discussiontoolsedit-paramvalue-paction-addtopic": "Add a new discussion section and the first comment in it.",
"apihelp-discussiontoolsedit-summary": "Post a message on a discussion page.",
"apihelp-discussiontoolssubscribe-param-page": "A page on which the topic appears",
"apihelp-discussiontoolssubscribe-param-commentname": "Name of the topic to subscribe to (or unsubscribe from)",
"apihelp-discussiontoolssubscribe-param-subscribe": "True to subscribe, false to unsubscribe",
"apihelp-discussiontoolssubscribe-summary": "Subscribe (or unsubscribe) to receive notifications about a topic."
}

View file

@ -20,6 +20,8 @@
"apihelp-discussiontoolsedit-paramvalue-paction-addcomment": "{{doc-apihelp-paramvalue|discussiontoolsedit|paction|addcomment}}",
"apihelp-discussiontoolsedit-paramvalue-paction-addtopic": "{{doc-apihelp-paramvalue|discussiontoolsedit|paction|addtopic}}",
"apihelp-discussiontoolsedit-summary": "{{doc-apihelp-summary|discussiontoolsedit}}",
"apihelp-discussiontoolssubscribe-param-page": "{{doc-apihelp-param|discussiontoolssubscribe|page}}",
"apihelp-discussiontoolssubscribe-param-commentname": "{{doc-apihelp-param|discussiontoolssubscribe|commentname}}",
"apihelp-discussiontoolssubscribe-param-subscribe": "{{doc-apihelp-param|discussiontoolssubscribe|subscribe}}",
"apihelp-discussiontoolssubscribe-summary": "{{doc-apihelp-summary|discussiontoolssubscribe}}"
}

View file

@ -86,14 +86,12 @@ class ApiDiscussionToolsSubscribe extends ApiBase {
return [
'page' => [
ParamValidator::PARAM_REQUIRED => true,
ApiBase::PARAM_HELP_MSG => 'apihelp-visualeditoredit-param-page',
],
'token' => [
ParamValidator::PARAM_REQUIRED => true,
],
'commentname' => [
ParamValidator::PARAM_REQUIRED => true,
ApiBase::PARAM_HELP_MSG => 'apihelp-discussiontoolsedit-param-commentname',
],
'subscribe' => [
ParamValidator::PARAM_TYPE => 'boolean',