madnesscode / voluum
Voluum SDK for PHP
Installs: 32 947
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 2
Forks: 3
Open Issues: 0
Requires (Dev)
- phpunit/phpunit: 5.6
This package is auto-updated.
Last update: 2025-03-19 17:43:17 UTC
README
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.