1 | <?php |
||
13 | class Inktale |
||
14 | { |
||
15 | /** @var InktaleApiClient */ |
||
16 | private $api; |
||
17 | |||
18 | /** |
||
19 | * @param InktaleApiClient|null $apiClient |
||
20 | */ |
||
21 | public function __construct(InktaleApiClient $apiClient = null) |
||
25 | |||
26 | /** |
||
27 | * Set api key to be used for next requests |
||
28 | * |
||
29 | * @param string|null $apiKey |
||
30 | */ |
||
31 | public function setApiKey($apiKey) |
||
35 | |||
36 | /** |
||
37 | * Create a new store and retrieve the api key. This request does not require an api key to be set |
||
38 | * |
||
39 | * @param string $email |
||
40 | * @param string $name |
||
41 | * |
||
42 | * @return StoreItem |
||
43 | * @throws InktaleApiException |
||
44 | */ |
||
45 | public function createStore($email, $name) |
||
54 | |||
55 | /** |
||
56 | * Fetch list of available products that artwork can be created on |
||
57 | * |
||
58 | * @return ProductItem[] |
||
59 | * @throws InktaleApiException |
||
60 | */ |
||
61 | public function getProducts() |
||
72 | |||
73 | /** |
||
74 | * Create a new artwork on given products. |
||
75 | * Response is an artwork id. |
||
76 | * WARNING! Artwork creation is asynchronous! |
||
77 | * |
||
78 | * @param ArtworkCreationParams $params |
||
79 | * @return string |
||
80 | */ |
||
81 | public function createArtwork(ArtworkCreationParams $params) |
||
105 | |||
106 | /** |
||
107 | * Get an artwork with files and products |
||
108 | * |
||
109 | * @param string $artworkId |
||
110 | * @return ArtworkItem |
||
111 | * @throws InktaleApiException |
||
112 | */ |
||
113 | public function getArtwork($artworkId) |
||
119 | } |