whitelabeled/daisycon-api-client
Composer 安装命令:
composer require whitelabeled/daisycon-api-client
包简介
Daisycon API client
README 文档
README
Library to retrieve sales from the Daisycon publisher API.
Usage:
Login
<?php require 'vendor/autoload.php'; session_start(); $client = new \whitelabeled\DaisyconApi\DaisyconClient( '123456', '848840-9900301-99494595-3994984', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'http://localhost/verify.php' ); $login = $client->login(); $_SESSION['state'] = $login->state; $_SESSION['pkce'] = $login->pkceCode; echo 'Login URL: ' . $login->loginUrl;
Verify
<?php require 'vendor/autoload.php'; session_start(); $client = new \whitelabeled\DaisyconApi\DaisyconClient( '123456', '848840-9900301-99494595-3994984', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'http://localhost/verify.php' ); $refreshToken = $client->verifyAuthCode($_SESSION['state'], $_SESSION['pkce'], $_GET['state'], $_GET['code']); // Store refreshtoken in database or persistent storage
Get transactions
<?php require 'vendor/autoload.php'; $client = new \whitelabeled\DaisyconApi\DaisyconClient( '123456', '848840-9900301-99494595-3994984', 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'http://localhost/verify.php' ); // Refresh token, store new token in DB: $refreshToken = $client->refreshAccessToken($refreshToken); // Optional: //$client->mediaIds = ['666666', '777777']; $transactions = $client->getTransactions(new DateTime('2016-10-30 00:00:00')); /* * Returns: Array ( [0] => whitelabeled\DaisyconApi\Transaction Object ( [id] => 1KMDIMF49503095MFJULCM [partId] => F7I6 [transactionDate] => DateTime Object ( [date] => 2016-10-30 22:07:22.000000 [timezone_type] => 3 [timezone] => Europe/Berlin ) [clickDate] => DateTime Object ( [date] => 2016-10-30 21:54:09.000000 [timezone_type] => 3 [timezone] => Europe/Berlin ) [approvalDate] => [lastModifiedDate] => DateTime Object ( [date] => 2016-10-30 22:07:22.000000 [timezone_type] => 3 [timezone] => Europe/Berlin ) [programId] => 9999 [countryId] => 222 [regionId] => 0 [gender] => [age] => 0 [deviceType] => pc [program] => Advertisements Inc. [ipAddress] => ?.22.33.44 [status] => open [disapprovedReason] => [subId] => 222 [subId2] => 958503 [subId3] => [reference] => [commissionAmount] => 6 [totalCommissionAmount] => 6 [sharedCommission] => 0 [commissionPercentage] => 100 [revenueSharePartner] => [revenue] => 0 [extra1] => [extra2] => [extra3] => [extra4] => [extra5] => [publisherDescription] => Exciting product [mediaId] => 123456 [mediaName] => Super interesting website ) ) */
License
© Keuze.nl BV
MIT license, see LICENSE.txt for details.
whitelabeled/daisycon-api-client 适用场景与选型建议
whitelabeled/daisycon-api-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6.97k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 11 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 whitelabeled/daisycon-api-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 whitelabeled/daisycon-api-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 6.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-04