Skip to content

elabuwa/shopifyapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

elabuwa/shopifyapi

This is a simple wrapper for Shopify's APIs. This will initially focus on GET requests on the customer and product APIs and move to build on other endpoints as well. PRs are most welcome.

Installation

A simple composer install is all you need to get things running.

$ composer require elabuwa/shopifyapi

Development

The response is a Guzzle Response object

$credentials = [
    'userName' => env('SHOPIFY_USERNAME', ''),
    'password' => env('SHOPIFY_PASSWORD', ''),
    'apiVersion' => env('SHOPIFY_API_VERSION', ''),
    'storeShopifyUrl' => env('SHOPIFY_URL', '')
];
$customerObj = new shopifyCustomers($credentials);
$response = $customerObj->customerInfo('customerID');
var_dump($response['customer']);

Plugins

Guzzle is the only plugin used at the moment. Guzzle by default has an option to throw exceptions on http error codes. However, this has been disabled to allow you to handle errors the way you see fit. If you wish to enable this, simply set $http_errors = true.

Todos

  • Add extra endpoints
  • Write Tests

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages