2017 © Pedro Peláez
 

library api-client

Guzzle based client for Thelia API

image

thelia/api-client

Guzzle based client for Thelia API

  • Wednesday, December 3, 2014
  • by thelia
  • Repository
  • 2 Watchers
  • 1 Stars
  • 202 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Thelia API client

What is this ?

This is a PHP client for Thelia API., (*1)

How to use it ?

First, add thelia/api-client to your composer.json, (*2)

{
    "require": {
        # ...
        "thelia/api-client": "~1.0"
    }
}

Then, create an instance of Thelia\Api\Client\Client with the following parameters:, (*3)

$client = new Thelia\Api\Client\Client("my api token", "my api key", "http://mysite.tld");

You can access to your resources by using the 'do*' methods, (*4)

<?php
list($status, $data) = $client->doList("products");
list($status, $data) = $client->doGet("products/1/image", 1);
list($status, $data) = $client->doPost("products", ["myData"]);
list($status, $data) = $client->doPut("products", ["myData"]);
list($status, $data) = $client->doDelete("products", 1);

Or you can use magic methods that are composed like that: methodEntity, (*5)

<?php
list($status, $data) = $client->listProducts();
list($status, $data) = $client->getTaxes(42);
list($status, $data) = $client->postPse($data);
list($status, $data) = $client->putTaxRules($data);
list($status, $data) = $client->deleteAttributeAvs(42);

Tests

To run the tests, edit the file tests/server.txt and place your thelia address, (*6)

The Versions

03/12 2014

dev-master

9999999-dev

Guzzle based client for Thelia API

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Benjamin Perche

03/12 2014

1.0.0

1.0.0.0

Guzzle based client for Thelia API

  Sources   Download

GPL-3.0+

The Requires

 

The Development Requires

by Benjamin Perche