2017 © Pedro Peláez
 

library ads-php

Atgames Digital Service PHP Library

image

atgames/ads-php

Atgames Digital Service PHP Library

  • Tuesday, May 17, 2016
  • by iscreen
  • Repository
  • 1 Watchers
  • 0 Stars
  • 169 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

ADS PHP bindings

Requirements

PHP 5.3.3 and later., (*1)

Composer

You can install the bindings via Composer. Run the following command:, (*2)

composer require atgames/ads-php

To use the bindings, use Composer's autoload:, (*3)

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the [latest release](https://gitlab.direct2drive.com/atgames/ads-php releases). Then, to use the bindings, include the init.php file., (*4)

require_once('/path/to/ads-php/init.php');

Getting Started

Simple usage looks like:, (*5)

\Ads\Ads::setApiKey('OTEwMDA6a1I2UkFTelJhUS1lcWNZSkw1blE=');
$data = \Ads\Product::all();
echo $data;

Documentation

Please see https://api.atgames.net/docs/api for up-to-date documentation., (*6)

Custom Request Timeouts

To modify request timeouts (connect or total, in seconds) you'll need to tell the API client to use a CurlClient other than its default. You'll set the timeouts in that CurlClient., (*7)

// set up your tweaked Curl client
$curl = new \Ads\HttpClient\CurlClient();
$curl->setTimeout(10); // default is \Ads\HttpClient\CurlClient::DEFAULT_TIMEOUT
$curl->setConnectTimeout(5); // default is \Ads\HttpClient\CurlClient::DEFAULT_CONNECT_TIMEOUT

echo $curl->getTimeout(); // 10
echo $curl->getConnectTimeout(); // 5

// tell Ads to use the tweaked client
\Ads\ApiRequestor::setHttpClient($curl);

// use the Ads API client as you normally would

Development

Install dependencies:, (*8)

``` bash composer install, (*9)


## Tests Install dependencies as mentioned above (which will resolve [PHPUnit](http://packagist.org/packages/phpunit/phpunit)), then you can run the test suite: ```bash ./vendor/bin/phpunit

Or to run an individual test file:, (*10)

./vendor/bin/phpunit tests/UtilTest.php

The Versions

17/05 2016

1.0.5

1.0.5.0 https://atgames.net/

Atgames Digital Service PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api atgames ads-php digital service

16/05 2016

dev-master

9999999-dev https://atgames.net/

Atgames Digital Service PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api atgames ads-php digital service

02/03 2016

1.0.4

1.0.4.0 https://atgames.net/

Atgames Digital Service PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api atgames ads-php digital service

24/02 2016

1.0.3

1.0.3.0 https://atgames.net/

Atgames Digital Service PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3
  • ext-curl *
  • ext-json *
  • ext-mbstring *

 

The Development Requires

api atgames ads-php digital service