| 1 | <?php |
||
| 5 | class Request |
||
| 6 | { |
||
| 7 | const API_VERSION = '1.2.7'; |
||
| 8 | |||
| 9 | private $apikey = null; |
||
| 10 | private $url = null; |
||
| 11 | private $method; |
||
| 12 | private $args; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param $url |
||
| 16 | * @param $apikey |
||
| 17 | * @param $method |
||
| 18 | * @param array $args |
||
| 19 | */ |
||
| 20 | 35 | public function __construct($url, $apikey, $method, $args = array()) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * Send the built request url against the etherpad lite instance |
||
| 30 | * |
||
| 31 | * @return \Guzzle\Http\Message\Response |
||
| 32 | */ |
||
| 33 | public function send() |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Returns the path of the request url |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | protected function getUrlPath() |
||
| 63 | |||
| 64 | /** |
||
| 65 | * Maps the given arguments from Client::__call to the parameter of the api method |
||
| 66 | * |
||
| 67 | * @return array |
||
| 68 | */ |
||
| 69 | 35 | public function getParams() |
|
| 86 | } |