1 | <?php |
||
10 | class UploadPieApi |
||
11 | { |
||
12 | const REQUEST_URL = 'https://uploadpie.com/'; |
||
13 | |||
14 | /** |
||
15 | * @var Curl |
||
16 | */ |
||
17 | private $client; |
||
18 | |||
19 | /** |
||
20 | * @param Curl|null $client |
||
21 | */ |
||
22 | public function __construct(Curl $client = null) |
||
26 | |||
27 | /** |
||
28 | * @param string $binaryImage |
||
29 | * @param string $filename |
||
30 | * @param int $expire |
||
31 | * @param string $auth |
||
32 | * |
||
33 | * @return Response |
||
34 | */ |
||
35 | public function call($binaryImage, $filename, $expire, $auth) |
||
49 | |||
50 | /** |
||
51 | * @param Response $response |
||
52 | * |
||
53 | * @return string |
||
54 | */ |
||
55 | private function processResponse(Response $response) |
||
67 | |||
68 | /** |
||
69 | * @param FormUpload $image |
||
70 | * @param int $expire |
||
71 | * @param string $auth |
||
72 | * |
||
73 | * @return FormRequest |
||
74 | */ |
||
75 | private function buildRequest($image, $expire, $auth) |
||
87 | } |
||
88 |