dhl sdk api unified location finder
3.2.0
DPDHL Unified Location Finder API SDK 패키지는 다음 웹 서비스에 대한 인터페이스를 제공합니다.
netresearch/jsonmapper : JSON 응답 메시지를 PHP 객체로의 사로화하기위한 맵퍼php-http/discovery : HTTP 클라이언트 및 메시지 공장 구현을위한 디스커버리 서비스php-http/httplug : 플러그 가능한 HTTP 클라이언트 추상화php-http/logger-plugin : HTTPLUG 용 HTTP 클라이언트 로거 플러그인psr/http-client : PSR-18 HTTP 클라이언트 인터페이스psr/http-factory : PSR-7 HTTP 메시지 공장 인터페이스psr/http-message : PSR-7 HTTP 메시지 인터페이스psr/log : PSR-3 로거 인터페이스psr/http-client-implementation : PSR-18 호환 HTTP 클라이언트를 제공하는 모든 패키지psr/http-factory-implementation : PSR-7 호환 HTTP 메시지 공장을 제공하는 패키지psr/http-message-implementation : PSR-7 HTTP 메시지를 제공하는 패키지nyholm/psr7 : PSR-7 HTTP 메시지 공장 및 메시지 구현phpunit/phpunit : 테스트 프레임 워크php-http/mock-client : HTTPLUG MOCK 클라이언트 구현phpstan/phpstan : 정적 분석 도구squizlabs/php_codesniffer : 정적 분석 도구rector/rector : PHP 업그레이드에 도움이되는 자동 리팩토링 도구fig/log-test : psr/log 대한 테스트 유틸리티 $ composer require dhl/sdk-api-unified-location-finder$ composer remove dhl/sdk-api-unified-location-finder$ ./vendor/bin/phpunit -c test/phpunit.xmlDPDHL Unified Location Finder API SDK는 다음과 같은 기능을 지원합니다.
소비에 적합한 라이브러리의 구성 요소가 구성됩니다
$ consumerKey = ' Your application consumer key ' ;
$ logger = new Psr Log NullLogger ();
$ serviceFactory = new Dhl Sdk UnifiedLocationFinder Service ServiceFactory ();
$ service = $ serviceFactory -> createLocationFinderService ( $ consumerKey , $ logger );
try {
/** @var DhlSdkUnifiedLocationFinderApiDataLocationInterface $locations */
$ locations = $ service -> getPickUpLocations (
$ countryCode = ' DE ' ,
$ postalCode = ' 04129 ' ,
$ city = ' Leipzig ' ,
$ street = ' Nonnenstraße 11d ' ,
$ service = ' parcel-eu ' ,
$ radius = 2000 ,
$ limit = 25
);
} catch ( Dhl Sdk UnifiedLocationFinder Exception ServiceException $ e ) {
// handle errors
} SDK는 DhlSdkUnifiedLocationFinderExceptionServiceException 유형의 예외 만 제외합니다. ServiceException 의 서브 클래스는 발생한 오류의 종류를 설명하는 데 사용될 수 있습니다.
a DhlSdkUnifiedLocationFinderExceptionDetailedServiceException 예외가 최종 사용자에게 표시하기에 적합한 사람이 읽을 수있는 오류 메시지를 보유하고 있음을 나타냅니다.