1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace IBM\Watson\Common\stubs; |
4
|
|
|
|
5
|
|
|
use IBM\Watson\Common\Api\AbstractApi; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Stub class, does nothing. |
9
|
|
|
*/ |
10
|
|
|
class Api extends AbstractApi |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
14
|
|
|
* @throws \Http\Client\Exception |
15
|
|
|
*/ |
16
|
|
|
public function httpMethodGet() |
17
|
|
|
{ |
18
|
|
|
return $this->get('api', [], []); |
19
|
|
|
} |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
23
|
|
|
* @throws \Http\Client\Exception |
24
|
|
|
*/ |
25
|
|
|
public function httpMethodHead() |
26
|
|
|
{ |
27
|
|
|
return $this->head('api', []); |
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
32
|
|
|
* @throws \Http\Client\Exception |
33
|
|
|
*/ |
34
|
|
|
public function httpMethodTrace() |
35
|
|
|
{ |
36
|
|
|
return $this->trace('api', []); |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
41
|
|
|
* @throws \Http\Client\Exception |
42
|
|
|
*/ |
43
|
|
|
public function httpMethodPost() |
44
|
|
|
{ |
45
|
|
|
return $this->post('api', [], []); |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
50
|
|
|
* @throws \Http\Client\Exception |
51
|
|
|
*/ |
52
|
|
|
public function httpMethodPut() |
53
|
|
|
{ |
54
|
|
|
return $this->put('api', [], []); |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
/** |
58
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
59
|
|
|
* @throws \Http\Client\Exception |
60
|
|
|
*/ |
61
|
|
|
public function httpMethodPatch() |
62
|
|
|
{ |
63
|
|
|
return $this->patch('api', '', []); |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
68
|
|
|
* @throws \Http\Client\Exception |
69
|
|
|
*/ |
70
|
|
|
public function httpMethodDelete() |
71
|
|
|
{ |
72
|
|
|
return $this->delete('api', []); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
/** |
76
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
77
|
|
|
* @throws \Http\Client\Exception |
78
|
|
|
*/ |
79
|
|
|
public function httpMethodOptions() |
80
|
|
|
{ |
81
|
|
|
return $this->options('api', [], []); |
82
|
|
|
} |
83
|
|
|
} |
84
|
|
|
|