Download the PHP package antibodies-online/dhl-rest-sdk without Composer
On this page you can find all versions of the php package antibodies-online/dhl-rest-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download antibodies-online/dhl-rest-sdk
More information about antibodies-online/dhl-rest-sdk
Files in antibodies-online/dhl-rest-sdk
Package dhl-rest-sdk
Short Description PHP SDK for DHL REST API
License MIT
Homepage https://www.antibodies-online.com/
Informations about the package dhl-rest-sdk
DHL API Rest
This package provides PHP classes to interact with the DHL REST API.
Each Class is generated by Jane OpenAPI Generator. The OpenAPI Specification is provided byDHL which can be found in the root folder.
Installation
Usage
You can use following client to interact with the DHL API.
The selected client in this example is from Psr package and is used to send the request to the DHL API. The chosen endpoint is "rates/many" It's also needed to put in the right credentials in the AuthenticationPlugin.
Therefore you need an account at DHL and you need to create an API key. Visit https://developer.dhl.com/
Generate Classes
With following command you can generate the classes from the OpenAPI Specification.
Have a look in composer.json for the script and the configuration from file .jane. It tells jane where the origin file location is and where to put the generated files. Additionally you can set a namespace for the generated files.
Export OpenAPI Specification
By adding the package "jane-php/open-api-runtime" you are able to export the OpenAPI Specification from the generated classes. We assume you use a Symfony project. Therefore you can use the following command to export the OpenAPI Specification.
Documentations
https://developer.dhl.com/api-reference/dhl-express-mydhl-api#get-started-section/
Contributing
Really appreciate bug reports. Feel free to ask for additional functionality/fields. But be aware not all feature may be implemented. A Pull Request for your Features would be amazing.
License
The MIT License (MIT). Please see License File for more information.