eelcol/laravel-tradedoubler
最新稳定版本:1.0.6
Composer 安装命令:
composer require eelcol/laravel-tradedoubler
包简介
Laravel wrapper for the TradeDoubler API
关键字:
README 文档
README
composer require eelcol/laravel-tradedoubler
Setup .env
Change your .env to include the following variables:
TRADEDOUBLER_CLIENT_ID=...
TRADEDOUBLER_CLIENT_SECRET=...
TRADEDOUBLER_USERNAME=...
TRADEDOUBLER_PASSWORD=...
Read the following docs to get a clientId and clientSecret:
https://tradedoubler.docs.apiary.io/#/reference/o-auth-2-0/bearer-and-refresh-token
Publish assets
php artisan vendor:publish --tag=laravel-tradedoubler
php artisan vendor:publish --provider="Spatie\LaravelSettings\LaravelSettingsServiceProvider" --tag="migrations"
Also run the migrations after publishing:
php artisan migrate
Fetch data
Load transactions
use Eelcol\LaravelTradedoubler\Support\Facades\Tradedoubler;
// last 7 days
Tradedoubler::getTransactions(now()->subDays(7), now());
// today only
Tradedoubler::getTransactions(now());
Make another GET call
Currently, only the call to load transactions is build-in. To make another GET call:
use Eelcol\LaravelTradedoubler\Support\Facades\Tradedoubler;
Tradedoubler::get('path', ['param1' => 123]);
统计信息
- 总下载量: 2.37k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-21