定制 tracker-my-com/mytracker-client-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

tracker-my-com/mytracker-client-php

最新稳定版本:1.1.0

Composer 安装命令:

composer require tracker-my-com/mytracker-client-php

包简介

A PHP library to interact with API of tracker.my.com

README 文档

README

  • Thin & minimal HTTP client to interact with MyTracker's API
  • Supports php ^8.0.
  • Adheres to PSR-18, PSR-17 and PSR-7 principles under the hood.

💡 Getting Started

First, install MyTracker PHP API Client via the composer package manager:

composer require tracker-my-com/mytracker-client-php

Then, use \MyTracker\ExportApi\*Client classes in your code:

use Http\Discovery\Psr18Client;
use MyTracker\ExportApi\QuotasClient;
use MyTracker\ExportApi\RawDataClient;

$psr18Client = new Psr18Client();

$quotasClient = new QuotasClient('appUserId', 'apiSecretKey', $psr18Client);
$result = $quotasClient->get();
echo $result->getBody();

$rawDataClient = new RawDataClient('appUserId', 'apiSecretKey', $psr18Client);
$result = $rawDataClient->create([
    'event' => 'payments',
    'selectors' => 'idCountry,waid,idAccount,iosVendorId',
    'dateTo' => '2017-11-30',
    'dateFrom' => '2017-11-02',
    'timezone' => 'Europe/Moscow',
]);
echo $result->getBody();

$result = $rawDataClient->get(123 /* idRawExport from the previous request */);
echo $result->getBody();

$reportClient = new ReportClient('appUserId', 'apiSecretKey', $psr18Client);
$result = $reportClient->create([
    'settings' => [
        'filter' => [
            'date' => [
                'from' => '2020-07-10',
                'to' => '2020-07-17',
            ],
        ],
        'selectors' => 'idApp,countInstall',
        'idCurrency' => 643,
        'tz' => 'Europe/Moscow',
        'precision' => 2,
        'retIndent' => 3600,
    ]
]);

$result = $reportClient->get(123 /* idReportFile from the previous request */);
echo $result->getBody();

For full documentation, visit the MyTracker Export API docs.

❓ Troubleshooting

Encountering an issue? Contact us!

📄 License

MyTracker PHP API Client is an open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-20