You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>You may not be able to download until a stable version is available. For the time being you can download and put this into `vendor/phpclassic` folder and add the following code into your root `composer.json` file:
10
+
>You may not be able to install using composer until a stable version is available. For the time being you can download the zip file and put the extracted folder into `vendor/phpclassic` folder and add the following code into your root `composer.json` file:
PHPShopify uses CURL extension for handling http calls to the API. So you need to be have enabled the curl extension.
21
+
PHPShopify uses curl extension for handling http calls to the API. So you need to be have enabled the curl extension.
22
+
>However if you prefer to use any other available package library for handling HTTP calls, you can easily do so by modifying 1 line in each of the `get()`, `post()`, `put()`, `delete()` methods in `PHPShopify\ShopifyAPI` class.
22
23
23
24
## Usage
24
25
25
-
PHPShopify is developed in a fully object oriented way. Usage is very simple.
26
+
You can use PHPShopify in a pretty simple object oriented way.
26
27
27
-
#### Configure
28
+
#### Configure ShopifyClient
28
29
If you are using your own private API, provide the ApiKey and Password. For Third party apps, use the permanent access token which you have got from the app.
##### Now just have fun using the SDK using the object oriented way. All objects are named as same as it is named in shopify API reference and you can GET, POST, PUT, DELETE accordingly.
54
+
##### Now you can do `get()`, `post()`, `put()`, `delete()` calling the resources in the object oriented way. All resources are named as same as it is named in shopify API reference. (See the resource map below.)
55
+
> All the requests returns an array (which can be single resource or an array of multiple resources) if succeeded. When no result is expected (for example a DELETE request), an empty array will be returned.
56
56
57
-
For example getting all product list:
57
+
Get all product list (GET request)
58
58
59
59
```php
60
60
$products = $shopify->Product->get();
61
61
```
62
62
63
-
GET any specific product with ID
63
+
Get any specific product with ID (GET request)
64
64
65
65
```php
66
66
$productID = 23564666666;
67
67
$product = $shopify->Product($productID)->get();
68
68
```
69
69
70
-
The child resources can be used in a nested way. For example, get the images of a product
70
+
You can also filter the results by using the url parameters (as specified by Shopify API Reference for each specific resource).
71
+
For example get the list of cancelled orders after a specified date and time (and `fields` specifies the data columns for each row to be rendered) :
Some resources are available directly, some resources are only available through parent resources and a few resources can be accessed both ways. It is recommended that you see the details in the related Shopify API Reference page about each resource. Each resource name here is linked to related Shopify API Reference page.
179
+
> Use the resources only by listed resource map. Trying to get a resource directly which is only available through parent resource may end up with errors.
There are several action methods which can be called without calling the `get()`, `post()`, `put()`, `delete()` methods directly, which eventually results in a custom call to one of the `get()`, `post()`, `put()`, `delete()` methods.
243
+
The custom methods are specific to some resources which may not be available for other resources. It is recommended that you see the details in the related Shopify API Reference page about each action. We will just list the available actions here with some brief info.
0 commit comments