承接 atgames/ads-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

atgames/ads-php

Composer 安装命令:

composer require atgames/ads-php

包简介

Atgames Digital Service PHP Library

README 文档

README

Requirements

PHP 5.3.3 and later.

Composer

You can install the bindings via Composer. Run the following command:

composer require atgames/ads-php

To use the bindings, use Composer's autoload:

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.

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

Getting Started

Simple usage looks like:

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

Documentation

Please see https://api.atgames.net/docs/api for up-to-date documentation.

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.

// 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:

composer install

Tests

Install dependencies as mentioned above (which will resolve PHPUnit), then you can run the test suite:

./vendor/bin/phpunit

Or to run an individual test file:

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

统计信息

  • 总下载量: 171
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固