1 | <?php |
||
8 | class Mock extends AbstractService |
||
9 | { |
||
10 | /** |
||
11 | * Sends an authenticated API request to the path provided. |
||
12 | * If the path provided is not an absolute URI, the base API Uri (service-specific) will be used. |
||
13 | * |
||
14 | * @param string|UriInterface $path |
||
15 | * @param string $method HTTP method |
||
16 | * @param array $body Request body if applicable (an associative array will |
||
17 | * automatically be converted into a urlencoded body) |
||
18 | * @param array $extraHeaders Extra headers if applicable. These will override service-specific |
||
19 | * any defaults. |
||
20 | * |
||
21 | * @return string |
||
22 | */ |
||
23 | public function request($path, $method = 'GET', $body = null, array $extraHeaders = []) |
||
26 | |||
27 | /** |
||
28 | * Returns the url to redirect to for authorization purposes. |
||
29 | * |
||
30 | * @return UriInterface |
||
31 | */ |
||
32 | public function getAuthorizationUri(array $additionalParameters = []) |
||
35 | |||
36 | /** |
||
37 | * Returns the authorization API endpoint. |
||
38 | * |
||
39 | * @return UriInterface |
||
40 | */ |
||
41 | public function getAuthorizationEndpoint() |
||
44 | |||
45 | /** |
||
46 | * Returns the access token API endpoint. |
||
47 | * |
||
48 | * @return UriInterface |
||
49 | */ |
||
50 | public function getAccessTokenEndpoint() |
||
53 | |||
54 | public function testDetermineRequestUriFromPath($path, ?UriInterface $baseApiUri = null) |
||
58 | } |
||
59 |