Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: d1b8cec980
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (19 sloc) 0.598 kB
<?php
require_once("mashape/mashape.php");
// The path of the XML configuration file required by Mashape:
define("CONFIGURATION_FILEPATH", "./api.xml");
// This is the server key for your component
define("SERVER_KEY", "the-server-key");
class ComponentAPI extends MashapeRestAPI
{
// Don't edit the constructor code
public function __construct() {
parent::__construct(dirname(__FILE__));
}
// TODO: Declare your API functions below
public function sayHello($name) {
return "Hello " . $name . "!";
}
}
// Init the library
MashapeHandler::handleApi(new ComponentAPI(), SERVER_KEY);
Jump to Line
Something went wrong with that request. Please try again.