pezhvak/onlinenic-api
Composer 安装命令:
composer require pezhvak/onlinenic-api
包简介
A simple and useful onlinenic standalone package (with laravel support)
README 文档
README
onlinenic-api
A simple and useful onlinenic standalone package (with laravel support)
since there was no library written for APIv4 of onlinenic i written one. this package contains all methods described in their documentation, howevern it's poorly written and most of the endpoints are now testable in sandbox mode.
Onlinenice API v4 Documentation
Installation
The recommended way to install this library is through Composer:
$ composer require pezhvak/onlinenic-api
If you're not familiar with composer follow the installation instructions for
Linux/Unix/Mac or
Windows, and then read the
basic usage introduction.
Laravel 5.5 and up
You don't have to do anything else, this package uses the Package Auto-Discovery feature, and should be available as soon as you install it via Composer.
Laravel 5.4 or 5.3
Add the following Service Provider to your config/app.php providers array:
Pezhvak\OnlinenicApi\OnlinenicServiceProvider::class,
Publish Laravel Configuratino Files (All Versions)
php artisan vendor:publish --provider="Pezhvak\OnlinenicApi\OnlinenicServiceProvider"
Environment Variables
ONLINENIC_SANDBOX=TRUE
ONLINENIC_ACCOUNT=
ONLINENIC_PASSWORD=
ONLINENIC_KEY=
Standalone Usage
after installing with composer you can simply initiate a new instance of Onlinenic class:
$onlinenic = new Pezhvak\OnlinenicApi\Onlinenic($account_id, $password, $api_key, $sandbox); // use the method you want, ex: var_dump($onlinenic->checkDomain('universe.space'));
Laravel Usage
you can use dependency injection feature in any method of your controller or resolve it through laravel service container:
using dependency injection:
Route::get('/', function (\Pezhvak\OnlinenicApi\Onlinenic $onlinenic) { dd($onlinenic->checkDomain('universe.space')); });
using service container:
$onlinenic = resolve('Pezhvak\\OnlinenicApi\\Onlinenic'); dd($onlinenic->checkDomain('universe.space'));
Dependencies
The library uses Guzzle as its HTTP communication layer.
License
The MIT License (MIT). Please see License File for more information.
pezhvak/onlinenic-api 适用场景与选型建议
pezhvak/onlinenic-api 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 331 次下载、GitHub Stars 达 3, 最近一次更新时间为 2018 年 12 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 pezhvak/onlinenic-api 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pezhvak/onlinenic-api 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 331
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-12-27