Skip to content

Latest commit

 

History

History
72 lines (51 loc) · 2.55 KB

README.md

File metadata and controls

72 lines (51 loc) · 2.55 KB

primaERP PHP Library

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