Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 27 lines (19 sloc) 0.598 kb
48fa5fc first commit
Mashape authored
1 <?php
2
3 require_once("mashape/mashape.php");
4
9d107cd added UID global variable
Mashape authored
5 // The path of the XML configuration file required by Mashape:
35b6876 CONFIGURATION_FILEPATH moved
Mashape authored
6 define("CONFIGURATION_FILEPATH", "./api.xml");
7
30ce656 Version 0.6
Mashape authored
8 // This is the server key for your component
9 define("SERVER_KEY", "the-server-key");
10
11 class ComponentAPI extends MashapeRestAPI
48fa5fc first commit
Mashape authored
12 {
1dd59ac bug fixes
Mashape authored
13 // Don't edit the constructor code
14 public function __construct() {
15 parent::__construct(dirname(__FILE__));
16 }
17
18 // TODO: Declare your API functions below
19 public function sayHello($name) {
466a754 fixed api.php and api.xml
Mashape authored
20 return "Hello " . $name . "!";
1dd59ac bug fixes
Mashape authored
21 }
5739f94 fixed a route resolver bug
Mashape authored
22
48fa5fc first commit
Mashape authored
23 }
24
f926e25 v0.5
Mashape authored
25 // Init the library
30ce656 Version 0.6
Mashape authored
26 MashapeHandler::handleApi(new ComponentAPI(), SERVER_KEY);
Something went wrong with that request. Please try again.