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

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

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

weibo/ads-sdk-php

Composer 安装命令:

composer require weibo/ads-sdk-php

包简介

php SDK for Weibo AD

README 文档

README

Installation

Require

The PHP SDK requires PHP 5.5 or greater
The PHP SDK requires composer to manage dependencies.

Composer

Add the following configuration to your composer.json file:

{
    "require": {
        "weibo/ads-sdk-php": "1.0.*"
    }
}  
{
  "respositories" : [
    "type":"git",
    "url" : "https://github.com/weiboad/weibo-ads-php-sdk.git"
  ]
}

then install it with composer:

php composer.phar install --no-dev

This SDK and its dependencies will be installed under ./vendor.

Usage

Init api

use WeiboAd\Api;

$api = new Api('your_app_id', 'your_app_secret', 'your_access_token');

Get account

use WeiboAd\Core\AccountApi;  

$accountApi = new AccountApi($this->api);
$account = $accountApi->read();

Add and update Campaign

use WeiboAd\Core\CampaignApi;  
use WeiboAd\Core\Entity\Campaign;
use WeiboAd\Core\Constant\ConfiguredStatus;
use WeiboAd\Core\Constant\MarketingObjective;

//create campaign
$campaignApi = new CampaignApi($this->api);
$campaign = new Campaign();
$campaign->setName('campaign name');
$campaign->setConfiguredStatus(ConfiguredStatus::PAUSE);
$campaign->setObjective(MarketingObjective::BRAND_AWARENESS);
$campaign->setLifetimeBudget(600);
$campaign->setGuaranteedDelivery(false);
$retCampaign = $campaignApi->create($campaign);

//update campaign budget
$campaign = $campaignApi->read($id);
$campaign->setLifetimeBudget(1000);
$retCampaign = $campaignApi->update($campaign);

Tests

Install dependencies

php composer.phar install --dev

Execute unit tests

./vendor/bin/phpunit

Execute unit tests include some integration api tests

find phpunit.xml file then add annotation

<!-- <exclude>tests/IntegrationTest.php</exclude>-->

then execute phpunit command line

./vendor/bin/phpunit

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 9
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2017-10-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固