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