Giter VIP home page Giter VIP logo

voluum's Introduction

Voluum SDK For PHP

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 = '[email protected]';
$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"
]);

Complete documentation is available here.

License

Please see the license file for more information.

voluum's People

Contributors

madnesscode avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.