Skip to content

markmarushak/curlapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

curl API SDK For PHP

Build Status Latest Stable Version Total Downloads License

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

Installation

The Curl API can be installed with Composer. Run this command:

composer require markmarushak/curlapi

Usage

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

Example

$argument_1 = 'test@example.com';
$argument_2 = 'test';

$client = new Voluum\Client\API(new Voluum\Auth\PasswordCredentials($argument_1, $argument_2));

$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"
]);

documentation voluum! here. documentation adsBridge here.

License

Please see the license file for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages