BrandImageApi
extends ResourceImageApi
in package
Brand Images API
Usage (creating a brand image for Brand with ID of 1):
$api = new BigCommerce\ApiV3\Client($_ENV['hash'], $_ENV['CLIENT_ID'], $_ENV['ACCESS_TOKEN']);
$api->catalog()->brand(1)->image()->create('/path/to/image.png');
Tags
Table of Contents
- __construct() : mixed
- create() : string
- Add an image to a resource
- delete() : ResponseInterface
- get() : SingleResourceResponse
- getAll() : PaginatedResponse
- getClient() : Client
- getParentResourceId() : int|null
- getResourceId() : int|null
- multipleResourceUrl() : string
- singleResourceUrl() : string
Methods
__construct()
public
__construct(Client $client[, int|null $resourceId = null ][, int|null $parentResourceId = null ]) : mixed
Parameters
- $client : Client
- $resourceId : int|null = null
- $parentResourceId : int|null = null
Tags
Return values
mixed —create()
Add an image to a resource
public
create(string $filename) : string
Parameters
- $filename : string
-
Any path that can be opened using fopen
Tags
Return values
string —The url to the stored image
delete()
public
delete() : ResponseInterface
Tags
Return values
ResponseInterface —get()
public
abstract get() : SingleResourceResponse
Tags
Return values
SingleResourceResponse —getAll()
public
abstract getAll([array<string|int, mixed> $filters = [] ][, int $page = 1 ][, int $limit = 250 ]) : PaginatedResponse
Parameters
- $filters : array<string|int, mixed> = []
- $page : int = 1
- $limit : int = 250
Tags
Return values
PaginatedResponse —getClient()
public
getClient() : Client
Tags
Return values
Client —getParentResourceId()
public
getParentResourceId() : int|null
Tags
Return values
int|null —getResourceId()
public
getResourceId() : int|null
Tags
Return values
int|null —multipleResourceUrl()
public
abstract multipleResourceUrl() : string
Tags
Return values
string —singleResourceUrl()
public
abstract singleResourceUrl() : string