PHP SDK for work with Vipip service

0.1.3 2017-05-27 06:43 UTC

This package is not auto-updated.

Last update: 2021-01-23 00:18:06 UTC


Vipip SDK for PHP

VipIP Темная сторона рекламы

Table of contents

  1. Installation
  2. Usage
  3. Modules
  4. Service methods


It is recommended that you install the Vipip SDK library through composer. To do so, add the following lines to your composer.json file.

    "require": {
       "ferrumfist/vipip_sdk": "~0.1"


At the beginning of the library must be initialized by calling the init method

VipIP::init(<access_token>[, $config]);

The following options can be passed as a configuration:

'cache' => [
    'driver' => 'redis',
    'config' => [
        'host' => '',
        'port' => '6379'

More information about the cache options, click here


SDK is divided into modules. You get the module to perform API requests

$user = VipIP::module('user');


getBalance - getting user`s balance


getDiscount - getting user`s discount



Services it is a group of modules which includes Link, Task, Social

create - creating services

$link = VipIP::module('link')->create("My first link", "http://example.com");

getList, getOne- getting list of/one service(s)

$links = VipIP::module('link')->getList([43,648,474]);
$link = VipIP::module('link')->getOne(45);

Service methods

After creating/getting the service you have the object of service. To use a service, use the following methods:

save - saving attributes of service

	'title' => 'new titile',
	'url' => 'http://new_url.org'

changeBalance - changing service balance

changeStatus - changing service status example

if( !$link->changeBalance(3, \Vipip\Service\Service::BALANCE_TYPE_DAYS) ){
   echo $link->getLastError();

The next group of methods gets / sets the objects for the service settings

getTariff - getting tariff

setTariff - setting tariff

getInputReferer - getting inputpoints and referers

setInputReferer - Setting inputpoints and referers

getGeo - getting geography settings

setGeo - setting geography settings

getCalendar - getting calendar settings

setCalendar - setting calendar settings