2017 © Pedro Peláez
 

library russian-post-bundle

Бандл для работы с сервисом отслеживания Почты России

image

3mg/russian-post-bundle

Бандл для работы с сервисом отслеживания Почты России

  • Sunday, June 19, 2016
  • by 3mg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 21 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

RussianPost Bundle

Библиотека для работы с сервисом отслеживания Почты России. Можно использовать standalone и как symfony bundle., (*1)

Installation

There are two recommended ways to install the bundle via Composer:, (*2)

  • using the composer require command:
composer require '3mg/russian-post-bundle:dev-master'
  • adding the dependency to your composer.json file:
"require": {
    ..
    "3mg/russian-post-bundle" : "dev-master",
    ..
}

if it fails try add, (*3)

"minimum-stability": "dev",

Using with symfony

add to AppKernel.php

...
new a3mg\RussianPostBundle\a3mgRussianPostBundle(),
...

add to config.yml

...
# a3mgRussianPostBundle
a3mg_russian_post:
    login: 'your_login'
    password: 'your_password'
...

get service

$api = $this->container->get('russian_post_api');

try {
    /** @var \a3mg\RussianPostBundle\Model\OperationHistoryData $object */
    $object = $api->getTrackOperationHistory("EE123456785KR");
    ...
} catch (\a3mg\RussianPostBundle\Exception\InvalidTrackException $e) {
    ...
} catch (\a3mg\RussianPostBundle\Exception\RussianPostApiException $e) {
    ...
}

Using stand alone

use a3mg\RussianPostBundle\Service\RussianPostApiFactory;
...
$api = RussianPostApiFactory::createApi("your_login", "your_password");
try {
    /** @var \a3mg\RussianPostBundle\Model\OperationHistoryData $object */
    $object = $api->getTrackOperationHistory("EE123456785KR");
    ...
} catch (\a3mg\RussianPostBundle\Exception\InvalidTrackException $e) {
    ...
} catch (\a3mg\RussianPostBundle\Exception\RussianPostApiException $e) {
    ...
}

Development

Updating api model

  • composer install
  • composer run-script build_rus_post
  • composer run-script build_rus_post_metadata

Run tests

./vendor/bin/phpunit --config phpunit.xml.dist

The Versions

19/06 2016

dev-master

9999999-dev https://github.com/3mg/russian-post-bundle

Бандл для работы с сервисом отслеживания Почты России

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nickolay Savchenko

russian post

14/09 2015

v0.1

0.1.0.0 https://github.com/3mg/russian-post-bundle

Бандл для работы с сервисом отслеживания Почты России

  Sources   Download

MIT

The Requires

 

The Development Requires

by Nickolay Savchenko

russian post