Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions create_product.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php

session_start();

Expand All @@ -11,7 +11,7 @@

try
{
# Making an API request can throw an exception
// Making an API request can throw an exception
$product = $shopify('POST /admin/products.json', array(), array
(
'product' => array
Expand Down Expand Up @@ -41,17 +41,17 @@
}
catch (shopify\ApiException $e)
{
# HTTP status code was >= 400 or response contained the key 'errors'
// HTTP status code was >= 400 or response contained the key 'errors'
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
print_r($e->getRequest());
print_r($e->getResponse());
}
catch (shopify\CurlException $e)
{
# cURL error
// cURL error
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
print_r($e->getRequest());
print_r($e->getResponse());
}

?>
?>
18 changes: 9 additions & 9 deletions get_products.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php

session_start();

Expand All @@ -11,23 +11,23 @@

try
{
# Making an API request can throw an exception
// Making an API request can throw an exception
$products = $shopify('GET /admin/products.json', array('published_status'=>'published'));
print_r($products);
}
catch (shopify\ApiException $e)
{
# HTTP status code was >= 400 or response contained the key 'errors'
// HTTP status code was >= 400 or response contained the key 'errors'
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
print_r($e->getRequest());
print_r($e->getResponse());
}
catch (shopify\CurlException $e)
{
# cURL error
// cURL error
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
print_r($e->getRequest());
print_r($e->getResponse());
}

?>
?>
18 changes: 9 additions & 9 deletions get_shop.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?
<?php

session_start();

Expand All @@ -11,23 +11,23 @@

try
{
# Making an API request can throw an exception
// Making an API request can throw an exception
$shop = $shopify('GET /admin/shop.json');
print_r($shop);
}
catch (shopify\ApiException $e)
{
# HTTP status code was >= 400 or response contained the key 'errors'
// HTTP status code was >= 400 or response contained the key 'errors'
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
print_r($e->getRequest());
print_r($e->getResponse());
}
catch (shopify\CurlException $e)
{
# cURL error
// cURL error
echo $e;
print_R($e->getRequest());
print_R($e->getResponse());
print_r($e->getRequest());
print_r($e->getResponse());
}

?>
?>