dhl sdk api unified location finder
3.2.0
Paket DPDHL Unified Location Finder API SDK menawarkan antarmuka ke layanan web berikut:
netresearch/jsonmapper : Mapper untuk deserialisasi pesan respons JSON ke dalam objek PHPphp-http/discovery : Layanan Penemuan untuk Klien HTTP dan Implementasi Pabrik Pesanphp-http/httplug : abstraksi klien http pluggablephp-http/logger-plugin : Plugin Logger Klien HTTP untuk HTTPLUGpsr/http-client : antarmuka klien PSR-18 HTTPpsr/http-factory : PSR-7 HTTP Pesan Antarmuka Pabrikpsr/http-message : antarmuka pesan PSR-7 HTTPpsr/log : PSR-3 Logger Interfacespsr/http-client-implementation : Paket apa pun yang menyediakan klien HTTP PSR-18 yang kompatibelpsr/http-factory-implementation : Paket apa pun yang menyediakan pabrik pesan HTTP PSR-7 yang kompatibelpsr/http-message-implementation : Paket apa pun yang menyediakan pesan HTTP PSR-7nyholm/psr7 : PSR-7 HTTP Pesan Pabrik & Implementasi Pesanphpunit/phpunit : Kerangka Pengujianphp-http/mock-client : implementasi klien mock httplugphpstan/phpstan : Alat Analisis Statissquizlabs/php_codesniffer : alat analisis statisrector/rector : Alat refactoring otomatis untuk membantu peningkatan PHPfig/log-test : utilitas uji untuk 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 mendukung fitur -fitur berikut:
Komponen perpustakaan yang cocok untuk konsumsi terdiri dari
$ 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 hanya akan pernah melempar pengecualian tipe DhlSdkUnifiedLocationFinderExceptionServiceException . Subclass of ServiceException dapat digunakan untuk menggambarkan jenis kesalahan yang terjadi.
A DhlSdkUnifiedLocationFinderExceptionDetailedServiceException menunjukkan bahwa pengecualian memegang pesan kesalahan yang dapat dibaca manusia yang cocok untuk ditampilkan ke pengguna akhir.