-
Notifications
You must be signed in to change notification settings - Fork 26
/
ApiCallInterface.php
47 lines (41 loc) · 908 Bytes
/
ApiCallInterface.php
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
namespace MatthiasNoback\MicrosoftTranslator\ApiCall;
interface ApiCallInterface
{
/**
* The full URL, including query parameters to be used
*
* @abstract
* @return string
*/
public function getUrl();
/**
* The HTTP method (GET, POST, etc.) to be used
*
* @abstract
* @return string
*/
public function getHttpMethod();
/**
* The content of the request to be sent, or null
*
* @abstract
* @return string|null
*/
public function getRequestContent();
/**
* An array of query parameters to be used, or null
*
* @abstract
* @return array|null
*/
public function getQueryParameters();
/**
* Transform the response into something useful
*
* @abstract
* @param $response
* @return mixed
*/
public function parseResponse($response);
}