vitexsoftware/primaerp

PHP Based Library for easy interaction with primaERP api

dev-master 2017-10-09 12:07 UTC

This package is auto-updated.

Last update: 2020-02-25 02:55:24 UTC


README

PHP Library for easy interaction with ABRA's primaERP

Source Code Latest Version Software License Build Status Code Coverage Total Downloads Latest stable

Installation

composer require vitexsoftware/primaerp

Configuration

Please set up following constants:

/*
 * primaERP API user comany/account name
 */
define('PRIMAERP_COMPANY', 'vitexsoftware');

/*
 * URL primaERP API
 */
define('PRIMAERP_URL',
    'https://'.constant('PRIMAERP_COMPANY').'.api.primaerp.com');

/*
 * Login is Email primaERP API user
 */
define('PRIMAERP_LOGIN', 'email@domain.tld');

/*
 * primaERP API user password
 */
define('PRIMAERP_PASSWORD', 'password');

/*
 * primaERP API KEY
 */
define('PRIMAERP_APIKEY', '1af7a44b-81f1-4de1-11e7-1e675acb1221');

nebo je možné přihlašovací údaje zadávat při vytváření instance třídy.

$projector = new ApiClient(null, ['section' => 'time','user'=>'email@some.ser','password'=>'XXXX','apikey'=>'1af7a44b-81f1-4de1-11e7-1e675acb1221']);
$projects  = $projector->requestData('projects');

Tento způsob nastavení má vyšší prioritu než výše uvedené definovaní konstant.

Debian/Ubuntu

Pro Linux jsou k dispozici .deb balíčky. Prosím použijte repo:

wget -O - http://v.s.cz/info@vitexsoftware.cz.gpg.key|sudo apt-key add -
echo deb http://v.s.cz/ stable main > /etc/apt/sources.list.d/ease.list
aptitude update
aptitude install php-primaerp