Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Pop PHP Framework (http://www.popphp.org/) |
4 | * |
5 | * @link https://github.com/popphp/popphp-framework |
6 | * @author Nick Sagona, III <dev@nolainteractive.com> |
7 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
8 | * @license http://www.popphp.org/license New BSD License |
9 | */ |
10 | |
11 | /** |
12 | * @namespace |
13 | */ |
14 | namespace Pop\Mail\Api; |
15 | |
16 | use Pop\Http; |
17 | |
18 | /** |
19 | * Http interface |
20 | * |
21 | * @category Pop |
22 | * @package Pop\Mail |
23 | * @author Nick Sagona, III <dev@nolainteractive.com> |
24 | * @copyright Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com) |
25 | * @license http://www.popphp.org/license New BSD License |
26 | * @version 4.0.0 |
27 | */ |
28 | interface HttpClientInterface |
29 | { |
30 | |
31 | /** |
32 | * Set client ID |
33 | * |
34 | * @param string $clientId |
35 | * @return HttpClientInterface |
36 | */ |
37 | public function setClientId(string $clientId): HttpClientInterface; |
38 | |
39 | /** |
40 | * Get client ID |
41 | * |
42 | * @return ?string |
43 | */ |
44 | public function getClientId(): ?string; |
45 | |
46 | /** |
47 | * Has client ID |
48 | * |
49 | * @return bool |
50 | */ |
51 | public function hasClientId(): bool; |
52 | |
53 | /** |
54 | * Set client secret |
55 | * |
56 | * @param string $clientSecret |
57 | * @return HttpClientInterface |
58 | */ |
59 | public function setClientSecret(string $clientSecret): HttpClientInterface; |
60 | |
61 | /** |
62 | * Get client ID |
63 | * |
64 | * @return ?string |
65 | */ |
66 | public function getClientSecret(): ?string; |
67 | |
68 | /** |
69 | * Has client ID |
70 | * |
71 | * @return bool |
72 | */ |
73 | public function hasClientSecret(): bool; |
74 | |
75 | /** |
76 | * Set scope |
77 | * @param string $scope |
78 | * @return HttpClientInterface |
79 | */ |
80 | public function setScope(string $scope): HttpClientInterface; |
81 | |
82 | /** |
83 | * Get scope ID |
84 | * |
85 | * @return ?string |
86 | */ |
87 | public function getScope(): ?string; |
88 | |
89 | /** |
90 | * Has scope ID |
91 | * |
92 | * @return bool |
93 | */ |
94 | public function hasScope(): bool; |
95 | |
96 | /** |
97 | * Set account ID |
98 | * |
99 | * @param string $accountId |
100 | * @return HttpClientInterface |
101 | */ |
102 | public function setAccountId(string $accountId): HttpClientInterface; |
103 | |
104 | /** |
105 | * Get account ID |
106 | * |
107 | * @return ?string |
108 | */ |
109 | public function getAccountId(): ?string; |
110 | |
111 | /** |
112 | * Has account ID |
113 | * |
114 | * @return bool |
115 | */ |
116 | public function hasAccountId(): bool; |
117 | |
118 | /** |
119 | * Set account username |
120 | * |
121 | * @param string $username |
122 | * @return HttpClientInterface |
123 | */ |
124 | public function setUsername(string $username): HttpClientInterface; |
125 | |
126 | /** |
127 | * Get account username |
128 | * |
129 | * @return ?string |
130 | */ |
131 | public function getUsername(): ?string; |
132 | |
133 | /** |
134 | * Has account username |
135 | * |
136 | * @return bool |
137 | */ |
138 | public function hasUsername(): bool; |
139 | |
140 | /** |
141 | * Set token |
142 | * |
143 | * @param string $token |
144 | * @return HttpClientInterface |
145 | */ |
146 | public function setToken(string $token): HttpClientInterface; |
147 | |
148 | /** |
149 | * Get token |
150 | * |
151 | * @return ?string |
152 | */ |
153 | public function getToken(): ?string; |
154 | |
155 | /** |
156 | * Has token |
157 | * |
158 | * @return bool |
159 | */ |
160 | public function hasToken(): bool; |
161 | |
162 | /** |
163 | * Set token expires |
164 | * |
165 | * @param string $tokenExpires |
166 | * @return HttpClientInterface |
167 | */ |
168 | public function setTokenExpires(string $tokenExpires): HttpClientInterface; |
169 | |
170 | /** |
171 | * Get token expires |
172 | * |
173 | * @return ?string |
174 | */ |
175 | public function getTokenExpires(): ?string; |
176 | |
177 | /** |
178 | * Has token expires |
179 | * |
180 | * @return bool |
181 | */ |
182 | public function hasTokenExpires(): bool; |
183 | |
184 | /** |
185 | * Check if token is expired |
186 | * |
187 | * @return boolean |
188 | */ |
189 | public function isTokenExpired(): bool; |
190 | |
191 | /** |
192 | * Verify token and refresh is expired |
193 | * |
194 | * @return boolean |
195 | */ |
196 | public function verifyToken(): bool; |
197 | |
198 | /** |
199 | * Request token |
200 | * |
201 | * @throws Exception|Http\Exception|Http\Client\Exception|Http\Client\Handler\Exception |
202 | * @return HttpClientInterface |
203 | */ |
204 | public function requestToken(): HttpClientInterface; |
205 | |
206 | } |