XD\Shopify\Client
Class Client
- Author: Bram de Leeuw
Synopsis
class Client
{
- // constants
- const EXCEPTION_NO_API_KEY = 0;
- const EXCEPTION_NO_API_PASSWORD = 1;
- const EXCEPTION_NO_DOMAIN = 2;
- // members
- private static string $api_version = '2020-04';
- private static $api_key = NULL;
- private static $api_password = NULL;
- private static $storefront_access_token = NULL;
- private static $shopify_domain = NULL;
- private static $shared_secret = NULL;
- private static boolean $inject_javascript = true;
- protected Client|null $client = NULL;
- // methods
- public ResponseInterface products()
- public ResponseInterface product()
- public ResponseInterface productListingIds()
- public ResponseInterface collections()
- public void collectionProducts()
- public ResponseInterface collects()
- public void __construct()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Constants
Name | Value |
---|---|
EXCEPTION_NO_API_KEY | 0 |
EXCEPTION_NO_API_PASSWORD | 1 |
EXCEPTION_NO_DOMAIN | 2 |
Members
private
- $api_key
- $api_password
-
$api_version
Configures the version of the api that you want to use -
$inject_javascript
Set this to false when creating your own custom shopify buy js - $shopify_domain
- $storefront_access_token
protected
- $client — \GuzzleHttp\Client|null
Methods
public
- __construct() — Get the configured Guzzle client
- collectionProducts()
- collections() — Get the available Collections
- collects() — Get the connections between Products and Collections
- product() — Get information about a specific product
- productListingIds() — Get available product listing ids
- products() — Get a list of available products