Created
December 26, 2014 06:13
-
-
Save Gang-Peng/71f34b1f6b642555a7bd to your computer and use it in GitHub Desktop.
code example of adding new function into elgg REST API interfaces in 1.8.19 version of elgg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/elgg-1.8.19/engine/lib/web_services.php b/elgg-1.8.19/engine/lib/web_services.php | |
| index 51cad6f..d66e16a 100644 | |
| --- a/elgg-1.8.19/engine/lib/web_services.php | |
| +++ b/elgg-1.8.19/engine/lib/web_services.php | |
| @@ -1448,7 +1448,22 @@ function api_init() { | |
| false, | |
| false | |
| ); | |
| // test | |
| expose_function("test.echo", | |
| "my_echo", | |
| array("string" => array('type' => 'string')), | |
| 'A testing method which echos back a string', | |
| 'GET', | |
| false, | |
| false | |
| ); | |
| } | |
| function my_echo($string) { | |
| return $string; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment