Download the PHP package ferjul17/sellsy-api without Composer

On this page you can find all versions of the php package ferjul17/sellsy-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sellsy-api

Sellsy API Client Library

Build Status Coverage Status SensioLabsInsight

PHP library which helps to call Sellsy's API

How to install

First of all you need Composer:

php -r "readfile('https://getcomposer.org/installer');" | php

Then add Sellsy API as a dependency of your project:

php composer.phar require ferjul17/sellsy-api

How to use

Setup the library

The library provide you a class called Service which represent a part of the Sellsy's API. The service allows you to call api associated to this module. For instance, the service Accountdatas allows to call all method which start with Accountdatas in Sellsy's API, like Accountdatas.getTaxe or Accountdatas.updateUnit

The Services are created by a factory called Client. So you first need to create a Client before having a Service. To create a client just call its constructor. Its first argument is an array which contains the configuration. You must provide the credentials to call the API which include the user token and secret, and the consumer token and secret that you can find in Sellsy interface.

Call APIs

Once you have you client, you can retreive a Service by calling the method getService($serviceName):

Finally, you can call an API with the method call($methodName, $params):

There's another method callAsync($methodName, $params) which send an asynchronous request and return a Promise:

You can find more information about Promise here.

Handle errors

In order to handle errors, you should use retryable version of the previous methodes: retryableCall($callable) and retryableCallAsync($callable). In case of an error which is handle by the library, this one will try to send again the requests by calling $callable.

$callable must be a function which return the parameters to give to the call() and callAsync() methods.

$callable takes 3 arguments:

How to run tests

If you want to test this library, you can run the test suite clone this repository:

 git clone https://github.com/ferjul17/Sellsy-api.git

then install dependencies:

composer update

than run the tests:

vendor/phpunit/phpunit/phpunit

License

Sellsy API is an open-source project released under the MIT license. See the LICENSE file for more information.


All versions of sellsy-api with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ^6.0
psr/log Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ferjul17/sellsy-api contains the following files

Loading the files please wait ....