定制 madnesscode/voluum 二次开发

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

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

madnesscode/voluum

最新稳定版本:1.2

Composer 安装命令:

composer require madnesscode/voluum

包简介

Voluum SDK for PHP

关键字:

README 文档

README

Build Status Latest Stable Version Total Downloads License

This repository contains the open source PHP SDK that allows you to access the Voluum REST API

Installation

The Voluum PHP SDK can be installed with Composer. Run this command:

composer require madnesscode/voluum

Usage

Note: This version of the Voluum SDK for PHP requires PHP 5.6 or greater.

Example

use MadnessCODE\Voluum;

Use voluum account email and password for credentials:

$email = 'test@example.com';
$password = 'test';

$client = new Voluum\Client\API(new Voluum\Auth\PasswordCredentials($email, $password));

$report_api = new Voluum\API($client);

Or use access id and key:

$access_key_id = "access_key_id";
$access_key = "access_key";

$client = new Voluum\Client\API(new Voluum\Auth\AccessKeyCredentials($access_key_id, $access_key));

$report_api = new Voluum\API($client);

How to get report:

$result = $report_api->get("report", [
   "from" => date("Y-m-d"),
   "to" => date("Y-m-d"),
   "groupBy" => "campaign"
]);

//Get result as json
echo $result->getJson();

//Get result as object
var_dump($result->getData());

Create new lander:

$result = $report_api->post("lander", [
   "namePostfix" => "Test",
   "url" => "http://example.com"
]);

Edit lander:

$result = $report_api->put("lander/xxxxx-xxxxxx-xxxxxx-xxxxx", [
   "namePostfix" => "Test 1",
   "url" => "http://example.com"
]);

Delete lander:

$result = $report_api->delete("lander", [
   "ids" => "xxxxx-xxxxxx-xxxxxx-xxxxxx"
]);

Upload conversion:

$result = $report_api->csv("conversion", 
    "POST", 
    "c384EFV6JHQODRN70575OK6,1.2,abc123,app_install");

Complete documentation is available here.

License

Please see the license file for more information.

统计信息

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

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知