Rjain has uploaded a new change for review.

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


Change subject: Begining of making read class
......................................................................

Begining of making read class

Change-Id: I9289ccf830f3b3558d773f32b06b8ca11d121fa6
---
M Annotator.php
A api/ApiAnnotatorRead.php
2 files changed, 22 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Annotator 
refs/changes/60/72360/1

diff --git a/Annotator.php b/Annotator.php
index b5ca254..53ab1ee 100755
--- a/Annotator.php
+++ b/Annotator.php
@@ -22,9 +22,11 @@
 //Autoloading
 $wgAutoloadClasses['AnnotatorHooks'] = $dir . 'Annotator.hooks.php';
 $wgAutoloadClasses['ApiAnnotatorCreate'] = $dir . 'api/ApiAnnotatorCreate.php';
+$wgAutoloadClasses['ApiAnnotatorRead'] = $dir . 'api/ApiAnnotatorRead.php';
 
 //Hooks
 $wgHooks['BeforePageDisplay'][] = 'AnnotatorHooks::onBeforePageDisplay';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'AnnotatorHooks::loadExtensionSchemaUpdates';
 
-$wgAPIModules['annotator-create'] = 'ApiAnnotatorCreate';
\ No newline at end of file
+$wgAPIModules['annotator-create'] = 'ApiAnnotatorCreate';
+$wgAPIModules['annotator-read'] = 'ApiAnnotatorRead';
\ No newline at end of file
diff --git a/api/ApiAnnotatorRead.php b/api/ApiAnnotatorRead.php
new file mode 100644
index 0000000..6ff2989
--- /dev/null
+++ b/api/ApiAnnotatorRead.php
@@ -0,0 +1,19 @@
+<?php
+class ApiAnnotatorRead extends ApiBase {
+       public function execute() {
+               $params = $this->extractRequestParams();
+               $this->getResult();
+               echo "read";
+               var_dump($params['id']);
+               return true;
+       }
+
+       public function getAllowedParameters() {
+        return array(
+            'id' =>array(
+                ApiBase::PARAM_TYPE => 'integer',
+                ApiBase::PARAM_REQUIRED => true
+                )
+            );
+    }
+}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9289ccf830f3b3558d773f32b06b8ca11d121fa6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Rjain <richa.jain1...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to