2017 © Pedro Peláez
 

library czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

image

salamek/czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

  • Monday, June 11, 2018
  • by Salamek
  • Repository
  • 1 Watchers
  • 1 Stars
  • 39 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

Czech post API client in PHP (Parsing podani online)

Build Status Donate, (*1)

Czech post API client in PHP (Parsing podani online) with custom Label generator, (*2)

Requirements

  • PHP 5.4 or higher

Installation

Install salamek/czech-post-api using Composer, (*3)

$ composer require salamek/czech-post-api

or if you want master branch code:, (*4)

$ composer require salamek/czech-post-api:dev-master

Usage

Create Packages

Creates package/s on Ceska posta, (*5)


$username = 'my_api_username'; $password = 'my_api_password'; $cookieJar = __DIR__.'/cookieJar.txt'; $czechPostApi = new Salamek\CzechPostApi\Api($username, $password, $cookieJar); $sender = new Salamek\CzechPostApi\Model\Sender('C9569', 'Olomouc', 'My Compamy s.r.o.', 'My Address', '77900', 'info@example.com', '+420123456789', 'http://www.example.cz', Country::CZ); $recipient = new Salamek\CzechPostApi\Model\Recipient('Olomouc', 'Adam Schubert', 'My Address', '77900', 'adam@example.com', '+420123456789', 'http://www.salamek.cz', Country::CZ, 'My Compamy a.s.'); $myPackageIdFromNumberSeries = 115; $weight = 3.15; $insurance = 100; $package = new Salamek\CzechPostApi\Model\Package($myPackageIdFromNumberSeries, Product::PACKAGE_TO_HAND, $sender, $recipient, null, null, $insurance, [], 'Package desc', 1, 1, null); try { $czechPostApi->createPackages([$package]); } catch (\Exception $e) { echo $e->getMessage() . PHP_EOL; }

Get Labels

Returns PDF with label/s for print on paper, two decompositions are supported, LabelDecomposition::FULL (one A4 Label per page) or LabelDecomposition::QUARTER (one label per 1/4 of A4 page), (*6)


$sender = new Salamek\CzechPostApi\Model\Sender('Olomouc', 'My Compamy s.r.o.', 'My Address', '77900', 'info@example.com', '+420123456789', 'http://www.example.cz', Country::CZ); $recipient = new Salamek\CzechPostApi\Model\Recipient('Olomouc', 'Adam Schubert', 'My Address', '77900', 'adam@example.com', '+420123456789', 'http://www.salamek.cz', Country::CZ, 'My Compamy a.s.'); $myPackageIdFromNumberSeries = 115; $weight = 3.15; $insurance = 100; $package = new Salamek\CzechPostApi\Model\Package($myPackageIdFromNumberSeries, Product::PACKAGE_TO_HAND, $sender, $recipient, null, null, $insurance, [], 'Package desc', 1, 1, null); $rawPdf = Label::generateLabels([$package]); file_put_contents($package->getPackageNumber() . '.pdf', $rawPdf);

The Versions

11/06 2018

dev-master

9999999-dev https://github.com/Salamek/czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

The Development Requires

api czech post Česká pošta

11/06 2018

v1.0.3

1.0.3.0 https://github.com/Salamek/czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

The Development Requires

api czech post Česká pošta

15/11 2017

v1.0.2

1.0.2.0 https://github.com/Salamek/czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

The Development Requires

api czech post Česká pošta

13/09 2017

v1.0.1

1.0.1.0 https://github.com/Salamek/czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

The Development Requires

api czech post Česká pošta

08/09 2017

v1.0

1.0.0.0 https://github.com/Salamek/czech-post-api

Czech Post api(unofficial), parsing html of filings online portal

  Sources   Download

GPL-3.0 BSD-3-Clause

The Requires

 

The Development Requires

api czech post Česká pošta