Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

jeancz/php-baselinker-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

42 Commits

Repository files navigation

Baselinker.com API PHP SDK

Installation

composer require imper86/php-baselinker-api

HTTPlug note

This lib uses HTTPlug so it doesn't depend on any http client. In order to use this lib you must have some PSR-18 http client and PSR-17 http factories. If you don't know which one you shoud install you can require these:

composer require php-http/guzzle6-adapter http-interop/http-factory-guzzle

Usage

Using this library is very simple, fast example should be enough to understand how it works.

<?php
use Imper86\PhpBaselinkerApi\BaselinkerApi;
use Imper86\PhpBaselinkerApi\Model\Orders\GetJournalList\GetJournalListRequest;
use Imper86\PhpBaselinkerApi\Model\ProductsStorage\GetProductsList\GetProductsListRequest;
use Imper86\PhpBaselinkerApi\Plugin\ErrorPlugin;
require_once __DIR__ . '/vendor/autoload.php';
$token = 'your-api-token';
$api = new BaselinkerApi($token);
$api->addPlugin(new ErrorPlugin());
$productsResponse = $api->productsStorage()->getProductsList(new GetProductsListRequest('bl_1'));
var_dump($productsResponse);
$journalResponse = $api->orders()->getJournalList(new GetJournalListRequest(123456));
var_dump($journalResponse);

Contributing

Any help will be very appreciated :)

About

simple wrapper for Baselinker.com API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%

AltStyle によって変換されたページ (->オリジナル) /