Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 26 lines (19 sloc) 0.598 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
<?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);
Something went wrong with that request. Please try again.