lsv/glsdk-parcelshop-api-bundle

为GLS ParcelShop提供web服务的Symfony扩展包

1.1 2016-07-20 10:45 UTC

This package is auto-updated.

Last update: 2024-08-27 22:00:54 UTC


README

安装

Composer

将以下内容添加到您的composer中

"lsv/glsdk-parcelshop-api-bundle": "~1.0"

或者运行

composer require lsv/glsdk-parcelshop-api-bundle

AppKernel

将以下内容添加到您的 AppKernel.php 中

new Lsv\GlsdkApiBundle\LsvGlsdkApiBundle()

用法

服务

$this->get('glsdk.parcelshop')

方法

$this->get('glsdk.parcelshop')->getParcelshop( ID )

$this->get('glsdk.parcelshop')->getParcelshopsFromZipcode( ZIPCODE )

$this->get('glsdk.parcelshop')->getParcelshopsNearAddress( STREET, ZIPCODE, LIMIT )

$this->get('glsdk.parcelshop')->getAllParcelshops()

扩展包主页上了解更多关于这些方法的作用

添加自己的guzzle客户端,例如如果您想要缓存或重试服务

用您自己的客户端覆盖参数 glsdk.parcelshop.client

或者您可以使用参数 glsdk.parcelshop.class 覆盖整个类