2017 © Pedro Peláez
 

library blwrap

A very light utility class for the Bricklink API

image

bacanu/blwrap

A very light utility class for the Bricklink API

  • Tuesday, December 29, 2015
  • by bacanu
  • Repository
  • 1 Watchers
  • 1 Stars
  • 105 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

BLWrap

A very thin class that helps you make requests to the BrickLink API, (*1)

The heavy lifting is done by guzzlehttp/guzzle and guzzlehttp/oauth-subscriber.
If you just want a simple way to make and sign request, you can use the above two packages and skip blwrap entirely., (*2)

Installation

composer require bacanu/blwrap

Usage

GET request

$config = [  
        "consumerKey" => "[replace]",  
        "consumerSecret" => "[replace]",  
        "tokenValue" => "[replace]",  
        "tokenSecret" => "[replace]",  
];  
$bl = new Client($config);  

$result = $bl->execute('get', 'inventories/1');  

//OR if you want request parameters

$result = $bl->execute('get', 'orders', [
    "direction" => "in",
    "filed" = "false"
]);  

POST, PUT, DELETE requests

$config = [  
        "consumerKey" => "[replace]",  
        "consumerSecret" => "[replace]",  
        "tokenValue" => "[replace]",  
        "tokenSecret" => "[replace]",  
];  
$bl = new Client($config);  

$result = $bl->execute('put', 'inventories/1', [
    "quantity" => "+2"
]);  

The Versions

29/12 2015

dev-master

9999999-dev

A very light utility class for the Bricklink API

  Sources   Download

MIT

The Requires

 

by Cosmin Bacanu

29/12 2015

v1.0.0

1.0.0.0

A very light utility class for the Bricklink API

  Sources   Download

MIT

The Requires

 

by Cosmin Bacanu