Giter Club home page Giter Club logo

baselinker's Introduction

Build Status

PHP BaseLinker API

php-baselinker is a PHP library for accessing the BaseLinker service.

Currently the library has BETA status

Library not implement each of method from BaseLinker API Documentation yet.

Installation

To install php-baselinker, install Composer and issue the following command:

composer require solizion/php-baselinker

Usage

Create a client object and pass as parameters api url and generated api key. To generate an api key, you must first have an existing baselinker account, and then go to "My account" -> "API" -> type name of application and click "Generate token".

use BaselinkerClient\Client;

$apiUrl = "https://api.baselinker.com/connector.php";
$apiKey = "verySecretApiKey"

$client = new Client($apiUrl, $apiKey);

Example

Get logs kind of "create new order", "change order status" from the journal.

use BaselinkerClient\Client;
use BaselinkerClient\Journal\GetJournalListParameters;

$apiUrl = "https://api.baselinker.com/connector.php";
$apiKey = "verySecretApiKey"

$client = new Client($apiUrl, $apiKey);

$parameters = new GetJournalListParameters(
    1, // last_log_id
    [
        GetJournalListParameters::CREATE_ORDER,
        GetJournalListParameters::REMOVE_ORDER,
    ], // log_types
    null, // order_id
);

$journal = $client->getJournalList($parameters);

Errors

BaseLinker return field "status" with values "SUCCESS" or "ERROR".

When status is "ERROR" then fields error_message and error_code are added to the response.

Developed methods

Name Description
GetJournalList Get list of events

Versioning

Versioning is based on semver.

New version is release by a new tag.

Licence

This library is distributed under the BSD 3 Licence, see LICENSE for more information.

Contributing

Authors of this library are Kamil Ciekalski, Dawid Miklas and Marcisz Szczot

If you want to help with development it - fork me!

baselinker's People

Contributors

ciekals11 avatar avatec avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.