01tonythomas has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/170889

Change subject: Add API parameter handling details for the bounehandler API
......................................................................

Add API parameter handling details for the bounehandler API

Bug: 72685
Change-Id: I83f6854a8ee007e1944d2501d11b244e0254fd91
---
M includes/ApiBounceHandler.php
1 file changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BounceHandler 
refs/changes/89/170889/1

diff --git a/includes/ApiBounceHandler.php b/includes/ApiBounceHandler.php
index f6c78ca..7def06d 100644
--- a/includes/ApiBounceHandler.php
+++ b/includes/ApiBounceHandler.php
@@ -21,6 +21,8 @@
 
                $email = $this->getMain()->getVal( 'email' );
 
+               $data = $this->extractRequestParams();
+
                if ( $email ) {
                        $params = array ( 'email' => $email );
                        $title = Title::newFromText( 'BounceHandler Job' );
@@ -52,4 +54,34 @@
                return true;
        }
 
+       public function getDescription() {
+               return 'Receive a bounce email and process it to handle the 
failing recipient';
+       }
+
+       public function getAllowedParams() {
+               return array(
+                       'email' => array(
+                               ApiBase::PARAM_TYPE => 'string',
+                               ApiBase::PARAM_REQUIRED => true
+                       )
+               );
+       }
+
+       public function getParamDescription() {
+               return array(
+                       'email' => 'The bounce email from a failing recipient'
+               );
+       }
+
+       public function getExamples() {
+               return array(
+                       
'api.php?action=bouncehandler&email=This%20is%20a%20test%20email'
+                       => 'Receive a bounce email for processing with the 
content "This is a test email"'
+               );
+       }
+
+       public function getHelpUrls() {
+               return array( 
'https://www.mediawiki.org/wiki/Extension:BounceHandler#API' );
+       }
+
 }
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/170889
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83f6854a8ee007e1944d2501d11b244e0254fd91
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to