2017 © Pedro Peláez
 

library vipip_sdk

PHP SDK for work with Vipip service

image

ferrumfist/vipip_sdk

PHP SDK for work with Vipip service

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 26 % Grown

The README.md

Vipip SDK

Vipip SDK for PHP, (*1)

VipIP Темная сторона рекламы, (*2)

# Table of contents

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

# Installation

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

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

# Usage

At the beginning of the library must be initialized by calling the init method, (*4)

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

The following options can be passed as a configuration:, (*5)

[
'lang'=>'ru',
'cache' => [
    'driver' => 'redis',
    'config' => [
        'host' => '127.0.0.1',
        'port' => '6379'
    ]
]

More information about the cache options, click here, (*6)

# Modules

SDK is divided into modules. You get the module to perform API requests, (*7)

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

User

getBalance - getting user`s balance, (*8)

$user->getBalance();

getDiscount - getting user`s discount, (*9)

$user->getDiscount();

Services

Services it is a group of modules which includes Link, Task, Social, (*10)

create - creating services, (*11)

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

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

$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:, (*13)

save - saving attributes of service, (*14)

$link->save([
    'title' => 'new titile',
    'url' => 'http://new_url.org'
]);

changeBalance - changing service balance, (*15)

changeStatus - changing service status example, (*16)

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, (*17)

getTariff - getting tariff, (*18)

setTariff - setting tariff, (*19)

getInputReferer - getting inputpoints and referers, (*20)

setInputReferer - Setting inputpoints and referers, (*21)

getGeo - getting geography settings, (*22)

setGeo - setting geography settings, (*23)

getCalendar - getting calendar settings, (*24)

setCalendar - setting calendar settings, (*25)

The Versions

17/05 2018

dev-readOnlyParams

dev-readOnlyParams

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip

27/05 2017

dev-master

9999999-dev

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip

27/05 2017

0.1.3

0.1.3.0

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip

16/03 2017

dev-poll_method

dev-poll_method

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip

16/03 2017

0.1.2

0.1.2.0

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip

22/02 2017

0.1.1

0.1.1.0

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip

21/02 2017

0.1

0.1.0.0

PHP SDK for work with Vipip service

  Sources   Download

MIT

The Requires

 

by Spirin Yaroslav

sdk vipip