Skip to content

Commit afc43b8

Browse files
author
kshitij verma
committed
changes in readme file
1 parent f27b66c commit afc43b8

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/index.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
require(__DIR__ . '/../vendor/autoload.php');
3+
4+
use Shopify\PrivateApp;
5+
use rdx\graphqlquery\Query;
6+
7+
$shop = 'jewellerystones.myshopify.com';
8+
$api_key = '4ba2e1a4c6324358ef8d51995b59b8d8';
9+
$password = '21045bc023f2af12733de9f4b737d865';
10+
$api_params['version'] = '2019-07';
11+
try {
12+
$client = new Shopify\PrivateApp($shop, $api_key, $password, $api_params);
13+
/**rest api call**/
14+
$response = $client->call('GET', 'products', ['limit' => 1]);
15+
print_r($response);
16+
}
17+
catch (\Shopify\Exception\ApiException $e)
18+
{
19+
echo "Errors: ".$e->getError().'<br> status code: '.$e->getCode();
20+
}

0 commit comments

Comments
 (0)