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
|
|
|
* |
15
|
|
|
* @throws \Http\Client\Exception |
16
|
|
|
*/ |
17
|
|
|
public function httpMethodGet() |
18
|
|
|
{ |
19
|
|
|
return $this->get('api', [], []); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
24
|
|
|
* |
25
|
|
|
* @throws \Http\Client\Exception |
26
|
|
|
*/ |
27
|
|
|
public function httpMethodHead() |
28
|
|
|
{ |
29
|
|
|
return $this->head('api', []); |
30
|
|
|
} |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
34
|
|
|
* |
35
|
|
|
* @throws \Http\Client\Exception |
36
|
|
|
*/ |
37
|
|
|
public function httpMethodTrace() |
38
|
|
|
{ |
39
|
|
|
return $this->trace('api', []); |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
44
|
|
|
* |
45
|
|
|
* @throws \Http\Client\Exception |
46
|
|
|
*/ |
47
|
|
|
public function httpMethodPost() |
48
|
|
|
{ |
49
|
|
|
return $this->post('api', [], []); |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
54
|
|
|
* |
55
|
|
|
* @throws \Http\Client\Exception |
56
|
|
|
*/ |
57
|
|
|
public function httpMethodPut() |
58
|
|
|
{ |
59
|
|
|
return $this->put('api', [], []); |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
/** |
63
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
64
|
|
|
* |
65
|
|
|
* @throws \Http\Client\Exception |
66
|
|
|
*/ |
67
|
|
|
public function httpMethodPatch() |
68
|
|
|
{ |
69
|
|
|
return $this->patch('api', '', []); |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
74
|
|
|
* |
75
|
|
|
* @throws \Http\Client\Exception |
76
|
|
|
*/ |
77
|
|
|
public function httpMethodDelete() |
78
|
|
|
{ |
79
|
|
|
return $this->delete('api', []); |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return \Psr\Http\Message\ResponseInterface |
84
|
|
|
* |
85
|
|
|
* @throws \Http\Client\Exception |
86
|
|
|
*/ |
87
|
|
|
public function httpMethodOptions() |
88
|
|
|
{ |
89
|
|
|
return $this->options('api', [], []); |
90
|
|
|
} |
91
|
|
|
} |
92
|
|
|
|