seregatte/shopify-guzzle-api

A Wrapper using Guzzle for a Shopify API and compatible with Google AppEngine

v1.0.0 2015-04-06 01:24 UTC

This package is not auto-updated.

Last update: 2024-05-21 16:18:47 UTC


README

A Wrapper using Guzzle for a Shopify API and compatible with Google AppEngine

This library is mean to be a Oriented Object Way to access a Shopify Api using the Guzzle instead of CURL, because of that, this library is compatible with Google App Engine.

##Usage

What you need to do for get this library, is putting the following code into your composer.json file:

"require": {
     "seregatte/shopify-guzzle-api: "dev-master",
}

And to use our library into you PHP code, like this:

<?php
require_once __DIR__.'/vendor/autoload.php';
use seregatte\ShopifyGuzzleApi;

$shopId = 'shopname.myshopify.com';
$shopToken = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
$app_api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; //App Api Key
$app_credential_secret = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; //App Credential Sets

$client = new ShopifyGuzzleApi\Api(
				$shopId, 
				$app_api_key, 
				$shopToken, 
				$app_credential_secret
		);

$queryParams = ['published_status'=>'published'];

$response = $client->setParams($queryParams)->get('/admin/products.json');

$json = $response->json();

var_dump($json['products'])

TODO

  • Make a better documentation, with more examples.
  • Cover the code with unit tests.
  • Make a Skeleton App using this library.