mralston / mug
用于操作 My Utility Genius API 的库。
v1.0.1
2023-10-09 13:22 UTC
Requires
- php: ^7.4.15|^8.0
- illuminate/http: ^7.0|^8.0|^9.0|^10.0
- illuminate/support: ^7.0|^8.0|^9.0|^10.0
README
简介
用于操作 My Utility Genius API 的库。
配置
您可以通过以下方式发布配置文件
php artisan vendor:publish --tag=mug-config
将以下项目添加到您的 .env 文件中
MUG_ENDPOINT="${APP_ENV}" MUG_CLIENT_ID= MUG_SECRET=
My Utility Genius 将提供客户端 ID 和密钥。
用法
以下是库的基本功能如何工作
// Determine whether a post code is ready to switch Mug::addressPostcodeReady($this->postCode); // Retrieve addresses matched by a post code Mug::addressRecco($this->postCode); // Retrieve details about a specific address Mug::addressReccoDetails($address); // $address attribute is an array which must contain // mpancore and xoserveAddressCode elements. // You may supply an entry from the collection // returned by Mug::addressRecco() Mug::addressReccoDetails( Mug::addressRecco($this->postCode) ->first() );
安全漏洞
许可证
PDF 是开源软件,在MIT 许可证下授权。