承接 1ff/tapfiliate-php-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

1ff/tapfiliate-php-sdk

最新稳定版本:v2.0.1

Composer 安装命令:

composer require 1ff/tapfiliate-php-sdk

包简介

Client for tapfiliate.com

README 文档

README

A PHP wrapper around the Tapfiliate API

Install

Install http://getcomposer.org/ and run the following command:

php composer.phar require 1ff/tapfiliate-php-sdk

PHP SDK Configuration

To use SDK you need:

  • Configure an ApiClient
  • Configure handler which will perform an action

How to configure an ApiClient?

You just need to fill in the required arguments

$logger = new NullLogger();
$helper = new ModelFiller();
$api = new ApiClient($logger, '<Your API key>');

How to get an API key?

  • Go to Tapfiliate platform.
  • Login to your publisher account.
  • Click on your account image.
  • Then choose Profile settings > API key
  • And copy the value from API key text field

How to get a Tapfiliate host?

By default, it's set to: https://api.tapfiliate.com
But you can modify host by adding your own data to ApiClient constructor

How to configure a handler?

Example of ClicksHandler configuration:

$clickHandler = new ClicksHandler($api, $helper);

Example of click creation:

$clicks = new Click();
// You can set specific data to Click model (e.g referral code)
$clicks->setReferralCode('<referral code>');
$clickHandler->createClick($clicks);

After executing createClick action it will return a Clicks object filled with API response.
Example of response:

object(Tapfiliate\Models\Click) {
    ["id":"Tapfiliate\Models\Click":private]=> string(36) "<click id>"
    ["referralCode":"Tapfiliate\Models\Click":private]=> string(6) "<referral code>"
    ["sourceId":"Tapfiliate\Models\Click":private]=> NULL
    ["referrer":"Tapfiliate\Models\Click":private]=> NULL
    ["landingPage":"Tapfiliate\Models\Click":private]=> NULL
    ["userAgent":"Tapfiliate\Models\Click":private]=> NULL
    ["ip":"Tapfiliate\Models\Click":private]=> NULL
    ["metaData":"Tapfiliate\Models\Click":private]=> array(0) {
    }
}

If something goes wrong ClicksHandler will throw an exception.

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-18