Skip to content

Commit a1d3e15

Browse files
author
kshitij verma
committed
resolve formatting/corrections in readme file
1 parent b9c02a2 commit a1d3e15

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

CODE_OF_CONDUCT.md

100644100755
File mode changed.

LICENSE

100644100755
File mode changed.

README.md

100644100755
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
99
## Requirements
1010
1. For Api call need [Guzzle](https://github.com/guzzle/guzzle). The recommended way to install Guzzle is through [Composer](https://getcomposer.org/).
1111
```
12-
composer require guzzlehttp/guzzle
12+
$ composer require guzzlehttp/guzzle
1313
```
1414
2. To prepare graphql query with [GraphQL query builder](https://github.com/rudiedirkx/graphql-query).
1515
16-
Clone with Clone with SSH
16+
Clone with SSH
1717
```
18-
git@github.com:rudiedirkx/graphql-query.git
18+
$ git@github.com:rudiedirkx/graphql-query.git
1919
```
2020
## Getting started
2121
### Initialize the client
2222
#### 1. For Private App
23-
* To create instance of Client, you need `shop`, `api_key`, `password` of private app, `api_params` is an array to pass api version with `YYYY-DD/unstable` format otherwise latest version will be assigned.
23+
* To create instance of `Client` class, you need `shop`, `api_key`, `password` of private app, `api_params` is an array to pass api version with `YYYY-DD/unstable` format otherwise, Api latest version will be assigned.
2424
2525
```
2626
<?php
@@ -31,7 +31,7 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
3131
$client = new Shopify\PrivateApp($shop, $api_key, $password, $api_params);
3232
```
3333
#### 2. For Public/Custom App (under development)
34-
* To create instance of Client, you need `shop`, `api_key`, `api_secret_key` of private app, `api_params` is an array to pass api version with `YYYY-DD/unstable` format otherwise latest version will be assigned.
34+
* To create instance of `Client` class, you need `shop`, `api_key`, `api_secret_key` of private app, `api_params` is an array to pass api version with `YYYY-DD/unstable` format otherwise, Api latest version will be assigned.
3535
3636
```
3737
<?php
@@ -45,32 +45,32 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
4545
### Call REST Api
4646
* Get Products with limit 250 with `call()` function
4747
```
48-
$response = $client->call('GET','products',['limit'=>250]);
49-
print_r($response);
48+
$response = $client->call('GET','products',['limit'=>250]);
49+
print_r($response);
5050
```
5151
* Get products of next page with page_info
5252
```
53-
$response = $client->call('GET','products',['limit'=>250]);
53+
$response = $client->call('GET','products',['limit'=>250]);
5454
```
5555
56-
####### Check next page available with `hasNextPage()` function #######
56+
Check next page available with `hasNextPage()` function:
5757
5858
```
59-
if($client->hasNextPage())
60-
{
61-
$next_page_response $client->call('GET','products',['limit'=>20,'page_info'=>$client->getNextPage()]);
62-
print_r($next_page_response);
63-
}
59+
if($client->hasNextPage())
60+
{
61+
$next_page_response $client->call('GET','products',['limit'=>20,'page_info'=>$client->getNextPage()]);
62+
print_r($next_page_response);
63+
}
6464
```
6565
66-
####### Check if previous page available with `hasPrevPage()` function #######
66+
Check if previous page available with `hasPrevPage()` function:
6767
6868
```
69-
if($client->hasPrevPage())
70-
{
71-
$next_page_response $client->call('GET','products',['limit'=>20,'page_info'=>$client->getPrevPage()]);
72-
print_r($next_page_response);
73-
}
69+
if($client->hasPrevPage())
70+
{
71+
$prev_page_response $client->call('GET','products',['limit'=>20,'page_info'=>$client->getPrevPage()]);
72+
print_r($prev_page_response);
73+
}
7474
```
7575
7676
### Call GraphQL Api
@@ -86,7 +86,7 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
8686
}
8787
```
8888
89-
####### Prepare query #######
89+
Prepare query:
9090
9191
```
9292
<?php
@@ -101,7 +101,7 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
101101
102102
```
103103
104-
####### Call GraphQL qith `callGraphql()` function #######
104+
Call GraphQL qith `callGraphql()` function:
105105
106106
```
107107
$response = $client->callGraphql($graphqlString);
@@ -119,7 +119,7 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
119119
}
120120
```
121121
122-
####### Prepare mutation #######
122+
Prepare mutation:
123123
124124
```
125125
<?php
@@ -133,7 +133,7 @@ PHP SDK helps to connect with shopify [Custom App](https://shopify.dev/concepts/
133133
$graphqlString = $query->build();
134134
```
135135
136-
####### Call GraphQL qith `callGraphql()` function #######
136+
Call GraphQL qith `callGraphql()` function:
137137
138138
```
139139
$response = $client->callGraphql($graphqlString);

composer.json

100644100755
File mode changed.

composer.lock

100644100755
File mode changed.

src/Client.php

100644100755
File mode changed.

src/Common/AppInterface.php

100644100755
File mode changed.

src/Common/ClientInterface.php

100644100755
File mode changed.

src/CursorPagination.php

100644100755
File mode changed.

src/Exception/ApiException.php

100644100755
File mode changed.

0 commit comments

Comments
 (0)