1 | <?php |
||
9 | class Client |
||
10 | { |
||
11 | /** |
||
12 | * @var HttpClient |
||
13 | */ |
||
14 | private $httpClient; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $apiKey; |
||
20 | |||
21 | /** |
||
22 | * @param HttpClient $httpClient |
||
23 | * @param string $apiKey |
||
24 | */ |
||
25 | public function __construct(HttpClient $httpClient, $apiKey) |
||
30 | |||
31 | /** |
||
32 | * Tworzenie dataSet |
||
33 | * |
||
34 | * @param DataSetInterface $dataSet |
||
35 | * |
||
36 | * @return ResponseInterface |
||
37 | * @throws RequestException |
||
38 | */ |
||
39 | public function create(DataSetInterface $dataSet) |
||
45 | |||
46 | /** |
||
47 | * Dodaje wiersz do dataset'u |
||
48 | * |
||
49 | * @param DataSetInterface $dataSet |
||
50 | * @param DataSetRowInterface[] $dataRows |
||
51 | * |
||
52 | * @return ResponseInterface |
||
53 | */ |
||
54 | public function append(DataSetInterface $dataSet, array $dataRows) |
||
60 | |||
61 | /** |
||
62 | * Podmienia cały dataset |
||
63 | * |
||
64 | * @param DataSetInterface $dataSet |
||
65 | * @param DataSetRowInterface[] $dataRows |
||
66 | * |
||
67 | * @return ResponseInterface |
||
68 | */ |
||
69 | public function replace(DataSetInterface $dataSet, array $dataRows) |
||
75 | |||
76 | /** |
||
77 | * Usunięcie dataset'u |
||
78 | * |
||
79 | * @param DataSetInterface $dataSet |
||
80 | * |
||
81 | * @return ResponseInterface |
||
82 | */ |
||
83 | public function delete(DataSetInterface $dataSet) |
||
89 | } |
||
90 |