| 1 | <?php |
||
| 7 | final class ClientFactory |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * HttpOptions. |
||
| 11 | * |
||
| 12 | * @var array |
||
| 13 | */ |
||
| 14 | private static $httpOptions = [ |
||
| 15 | 'base_uri' => 'https://api.chatwork.com/', |
||
| 16 | 'defaults' => [ |
||
| 17 | 'timeout' => 60, |
||
| 18 | 'debug' => false, |
||
| 19 | ], |
||
| 20 | 'headers' => [ |
||
| 21 | 'User-Agent' => 'php-chatwork-api v2', |
||
| 22 | 'Accept' => 'application/json', |
||
| 23 | ], |
||
| 24 | ]; |
||
| 25 | |||
| 26 | public static function create(string $token, string $version, array $httpOptions = []): ClientInterface |
||
| 32 | } |
||
| 33 |