commercetools-sdk-php-v2  master
The platform, import-api and ml-api PHP sdks generated from our api reference.
MLRequestBuilder.php
1 <?php
2 
3 namespace Commercetools\Client;
4 
8 use Commercetools\Ml\Client\Resource\ResourceByProjectKeyMissingData;
11 use GuzzleHttp\ClientInterface;
12 
13 class MLRequestBuilder extends Builder
14 {
18  private $projectKey;
19 
23  public function __construct(string $projectKey, ClientInterface $client, array $args = [])
24  {
25  parent::__construct($client, $args);
26  $this->projectKey = $projectKey;
27  }
28 
29  public function with(): ResourceByProjectKey
30  {
31  return $this->withProjectKey($this->projectKey);
32  }
33 
35  {
36  return $this->with()->imageSearch();
37  }
38 
40  {
41  return $this->with()->recommendations();
42  }
43 
45  {
46  return $this->with()->similarities();
47  }
48 }
__construct(string $projectKey, ClientInterface $client, array $args=[])