Class Model_Advertiser

Description

This file contains the code for the Advertiser API Service.

PHP versions 4 and 5

LICENSE: This source file is subject to version 2.02 of the PHP license, that is bundled with this package in the file LICENSE, and is available at through the world-wide-web at http://api.yesup.net/. If you did not receive a copy of the PHP license and are unable to obtain it through the world-wide-web, please send a note to <admin@yesup.com> so we can mail you a copy immediately.


	
			
Method Summary
Model_Advertiser __construct ()
array addCampaign (int $adsid, string $security, array $extra_arr)
array addKeywords (int $adsid, int $cid, array $keywords_array, array $max_bid_array, array $match_type_array, string $security, [array $extra_arr = ""])
array advertiserAccountSummary (int $adsid, string $security)
array campaignDetailReport (int $adsid, int $cid, int $pageStart, int $limitNumPerPage, string $report_type, string $date_from, string $date_to, [string $filter_type = "search"], [string $filter_cmp = ">="], [string $filter_val = 0], [int $quickpick = 0], string $security)
array categoryList (string $security)
array changeKeywordStatus (int $adsid, int $cid, string $action, array $keywords_id_array, string $security, [array $extra_arr = ""])
array countryList (string $security)
array creditCampaign (int $adsid, int $cid, string $security, array $data_arr)
array delCampaign (int $adsid, int $cid, string $security)
array delTimeTarget (int $adsid, int $cid, string $security)
array getAccountByEmail (string $email, string $security)
array getAccountByIdEmail (int $adsid, string $email, string $security)
array getAdvertiser (int $adsid, string $security)
array getAllCampaigns (int $adsid, int $pageStart, int $limitNumPerPage, string $security, [array $extra = ""])
array getCampaign (int $adsid, int $cid, string $security)
array getCampBanner (int $adsid, int $cid, string $security)
array getCampChannelTarget (int $adsid, int $cid, string $security, [string $cpx = ''])
array getCampCityTarget (int $cid, string $security)
array getCampKeywords (int $adsid, int $cid, int $pageStart, int $limitNumPerPage, string $security, [array $extra_arr = ""])
array getCampLanguageTarget (int $adsid, int $cid, string $security)
array getCampTextAds (int $adsid,  $cid, string $security)
array getCampUnsupportCountry (int $adsid, int $cid, string $security)
array getContinentCountry (string $security)
array getDeletedCampaigns (int $adsid, [boolean $simple = false], [int $num_per_page = 10], string $security)
int getNetworkID (string $security)
array getNetworkInfo (string $security)
array getNetworkSetting (string $security)
array getNumofCampaigns (int $adsid, string $security, [array $extra = ""])
array getReportOfAllCampaigns (int $adsid, [boolean $simple = false], [int $page_start = 1], [int $num_per_page = 10], string $statustype, [array $extra_data = ''], [string $date_from = ''], [string $date_to = ''], string $security)
array getTimeTarget (int $adsid, int $cid, string $security)
array login (int $adsid, string $password, string $security)
array pauseCamp (int $adsid, int $cid, string $cpx, [int $bannerType = ""], string $security)
array removeCampBanner (int $adsid, int $cid, int $creativeid, string $security)
array resumeCamp (int $adsid, int $cid, string $cpx, string $security)
array searchCity (string $city_name, string $security)
array searchCityNeighbor (int $geoid, float $distance, string $security)
array setTimeTarget (int $adsid, int $cid, string $security, array $timedatapost)
array signup (string $email, string $password, int $adminid, string $admin_name, string $security, [array $extra_arr = array()])
array timezoneList (string $security)
array updateAccount (int $adsid, string $security, array $extra_arr)
array updateCampaign (int $adsid, int $cid, string $security, array $extra_arr)
array updateCampChannelTarget (int $adsid, int $cid, string $security, array $ok_cate_bid_array)
array updateCampCityTarget (int $adsid, int $cid, string $security, array $geo_id)
array updateCampUnsupportCountry (int $adsid, int $cid, string $security, array $country_code_array)
array updateKeywords (int $adsid, int $cid, array $keywords_id_array, array $keywords_array, array $max_bid_array, array $match_type_array, string $security, [array $extra_arr = ""])
array updateLanguageTarget (int $adsid, int $cid, array $language_targeting_codes_array, string $security)
array updateTextAds ( $adsid, int $cid, string $security, array $txt_ads_data)
array uploadCampBanner (int $adsid, int $cid, string $security, array $bannerData)
array getPackageList (int $adsid, string $cpx, string $security)
array getPackage (int $pkgid, string $security)
array createPackageCamp (int $pkgid, int $cid, string $security, array $extra_arr)
Methods
Constructor __construct (line 34)
  • access: public
Model_Advertiser __construct ()
addCampaign (line 728)

Add new campaign

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array addCampaign (int $adsid, string $security, array $extra_arr)
  • int $adsid: Advertiser ID
  • string $security: Developer security key
  • array $extra_arr: Array keys:camp_name,funds,dailyLimit,low_balance_reminder,cap,status,lastStatus,url,title,description1,description2, adminid(default is null),captype,expirehour,maxBid,hasAdult,geoTarget,country_target ,imageOnly, cpx, bannerType, auto_refill ,auto_optimize
addKeywords (line 999)

Add keywords a for a campaign

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array addKeywords (int $adsid, int $cid, array $keywords_array, array $max_bid_array, array $match_type_array, string $security, [array $extra_arr = ""])
  • int $adsid
  • int $cid
  • array $keywords_array: Format:
  • array $max_bid_array: Format:
  • array $match_type_array: Format:
  • string $security: Developer security key
  • array $extra_arr
advertiserAccountSummary (line 608)

Advertiser account summary

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array advertiserAccountSummary (int $adsid, string $security)
  • int $adsid: Advertiser ID
  • string $security: Developer security key
campaignDetailReport (line 3675)

Campaign detail report

  • return: 'info'=>success and 'data'=>array
  • access: public
array campaignDetailReport (int $adsid, int $cid, int $pageStart, int $limitNumPerPage, string $report_type, string $date_from, string $date_to, [string $filter_type = "search"], [string $filter_cmp = ">="], [string $filter_val = 0], [int $quickpick = 0], string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • int $pageStart
  • int $limitNumPerPage
  • string $report_type
  • string $date_from
  • string $date_to
  • string $filter_type
  • string $filter_cmp
  • string $filter_val
  • int $quickpick
  • string $security: Developer security key
categoryList (line 359)

List all categories

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array categoryList (string $security)
  • string $security: Developer security key
changeKeywordStatus (line 1200)

Change Keywords Status , available actions: "pause" , "unpause" or "disable"

  • return: Success return: 'info'=>success and 'data'=>affected number
  • access: public
array changeKeywordStatus (int $adsid, int $cid, string $action, array $keywords_id_array, string $security, [array $extra_arr = ""])
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $action: Values: "pause" or "unpause" or "disable"
  • array $keywords_id_array: Format: array("45","56","789")
  • string $security: Developer security key
  • array $extra_arr
countryList (line 311)

List all countries for advertiser account register

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array countryList (string $security)
  • string $security: Developer security key
creditCampaign (line 3519)

Credit Campaign ,add fund for campaign

  • return: 'info'=>success and 'data'=>array
  • access: public
array creditCampaign (int $adsid, int $cid, string $security, array $data_arr)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $data_arr: Array keys:credit_amt,auto_refill,low_balance
delCampaign (line 1555)

Disable campaign

those disabled campaign will not be displayed in advertiser area, all fund in this campaign will return to advertiser account

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array delCampaign (int $adsid, int $cid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
delTimeTarget (line 2558)

Delete Time Target

  • return: Success return: 'info'=>success
  • access: public
array delTimeTarget (int $adsid, int $cid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
getAccountByEmail (line 2969)

Get Account By Advertiser's Email

  • return: 'info'=>success and 'data'=>array
  • access: public
array getAccountByEmail (string $email, string $security)
  • string $email
  • string $security: Developer security key
getAccountByIdEmail (line 3001)

Get by Advertiser Account By Id Email

  • return: 'info'=>success and 'data'=>array
  • access: public
array getAccountByIdEmail (int $adsid, string $email, string $security)
  • int $adsid: Advertiser ID
  • string $email
  • string $security: Developer security key
getAdvertiser (line 578)

Get advertoser infomations

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getAdvertiser (int $adsid, string $security)
  • int $adsid: Advertiser ID
  • string $security: Developer security key
getAllCampaigns (line 2859)

Get All Campaigns

  • return: 'info'=>success and 'data'=>array
  • access: public
array getAllCampaigns (int $adsid, int $pageStart, int $limitNumPerPage, string $security, [array $extra = ""])
  • int $adsid: Advertiser ID
  • int $pageStart: First page is 1
  • int $limitNumPerPage
  • string $security: Developer security key
  • array $extra: As default $extra=""
getCampaign (line 1474)

Get campaign information

  • return: 'info'=>success and 'data'=>array
  • access: public
array getCampaign (int $adsid, int $cid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
getCampBanner (line 2768)

Get Campaign Banner

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getCampBanner (int $adsid, int $cid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
getCampChannelTarget (line 2370)

Get Campaign Channel Target

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getCampChannelTarget (int $adsid, int $cid, string $security, [string $cpx = ''])
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • string $cpx
getCampCityTarget (line 1700)

This function get campaign targetted cities

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getCampCityTarget (int $cid, string $security)
  • int $cid: Campaign ID
  • string $security: Developer security key
getCampKeywords (line 1287)

Get Campaign keywords Target listing

  • access: public
array getCampKeywords (int $adsid, int $cid, int $pageStart, int $limitNumPerPage, string $security, [array $extra_arr = ""])
  • int $adsid
  • int $cid
  • int $pageStart: First page is 1
  • int $limitNumPerPage
  • string $security
  • array $extra_arr: Default value is null could be: $extra_arr['searchKeyword'],$extra_arr['searchStatus'],$extra_arr['searchMaxBid'], $extra_arr['searchRank'],$extra_arr['searchOutbid'],$$extra_arr['exactMatch']
getCampLanguageTarget (line 879)

get Campaign Language Target

  • access: public
array getCampLanguageTarget (int $adsid, int $cid, string $security)
  • int $adsid
  • int $cid
  • string $security
getCampTextAds (line 2197)

Get campaign Text creative Ads

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getCampTextAds (int $adsid,  $cid, string $security)
  • int $adsid: Advertiser ID
  • string $security: Developer security key
  • $cid
getCampUnsupportCountry (line 1516)

Get campaign countries list that was not listed in getCountryTargetSetting()

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getCampUnsupportCountry (int $adsid, int $cid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
getContinentCountry (line 280)

Get countries under Continents

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getContinentCountry (string $security)
  • string $security: Developer security key
getCountryTargetSetting (line 220)

get normal countries list

  • access: public
array getCountryTargetSetting ()
getDeletedCampaigns (line 3219)

Get Deleted Campaigns

  • return: 'info'=>success and 'data'=>array
  • access: public
array getDeletedCampaigns (int $adsid, [boolean $simple = false], [int $num_per_page = 10], string $security)
  • int $adsid: Advertiser ID
  • boolean $simple
  • int $num_per_page
  • string $security: Developer security key
getLanguageCodeNameList (line 854)

get most used languages in the web

Top Ten AND other most Used Languages in the Web

  • access: public
Array getLanguageCodeNameList ()
getNetworkID (line 135)

get NetworkID by security key

  • access: public
int getNetworkID (string $security)
  • string $security: Developer security key
getNetworkInfo (line 657)

Get network information

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getNetworkInfo (string $security)
  • string $security: Developer security key
getNetworkSetting (line 693)

Get network setting : setting_id, pub_share, max_pub_share, pub_refer_share, ads_refer_share, cpc_min_bid,

cpm_min_bid, cpv_min_bid, cpi_min_bid, cpc_max_bid, cpm_max_bid, cpv_max_bid, cpi_max_bid, payment_method, paypal_data, 2co_data, partner_visible, publisher_payment_invoice, new_site_status, btcpc_min_bid, btcpc_max_bid, btcpv_min_bid, btcpv_max_bid

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getNetworkSetting (string $security)
  • string $security: Developer security key
getNumofCampaigns (line 2928)

Get total number of campaigns for advertiser

  • return: 'info'=>success and 'data'=>array
  • access: public
array getNumofCampaigns (int $adsid, string $security, [array $extra = ""])
  • int $adsid: Advertiser ID
  • string $security: Developer security key
  • array $extra: As default $extra="", for further use
getReportOfAllCampaigns (line 3034)

Get Report Of All Campaigns

  • return: 'info'=>success and 'data'=>array
  • access: public
array getReportOfAllCampaigns (int $adsid, [boolean $simple = false], [int $page_start = 1], [int $num_per_page = 10], string $statustype, [array $extra_data = ''], [string $date_from = ''], [string $date_to = ''], string $security)
  • int $adsid: Advertiser ID
  • boolean $simple
  • int $page_start
  • int $num_per_page
  • string $statustype
  • array $extra_data: As default $extra_data="", Array keys:camp_name,cid
  • string $date_from
  • string $date_to
  • string $security: Developer security key
getTimeTarget (line 2419)

Get Time Target

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array getTimeTarget (int $adsid, int $cid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
login (line 192)

Advertiser Login

  • return: Success return: 'info'=>'logged in'
  • access: public
array login (int $adsid, string $password, string $security)
  • int $adsid: Advertiser ID , format xxx-A-xxxx
  • string $password: Advertiser password
  • string $security: Developer security key
pauseCamp (line 2446)

Pause Campaign

  • return: Success return: 'info'=>success
  • access: public
array pauseCamp (int $adsid, int $cid, string $cpx, [int $bannerType = ""], string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $cpx
  • int $bannerType
  • string $security: Developer security key
removeCampBanner (line 2820)

Remove Campaign Banner

  • return: 'info'=>success and 'data'=>array
  • access: public
array removeCampBanner (int $adsid, int $cid, int $creativeid, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • int $creativeid
  • string $security: Developer security key
resumeCamp (line 2511)

Resume Campaign

  • return: Success return: 'info'=>success
  • access: public
array resumeCamp (int $adsid, int $cid, string $cpx, string $security)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $cpx
  • string $security: Developer security key
searchCity (line 384)

Search city by name

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array searchCity (string $city_name, string $security)
  • string $city_name: City name
  • string $security: Developer security key
searchCityNeighbor (line 416)

Search city neighbors with distance

  • return: Success return: 'info'=>success and 'data'=>array
  • link: Example
  • access: public
array searchCityNeighbor (int $geoid, float $distance, string $security)
  • int $geoid: Geoid
  • float $distance: Distance from searched city
  • string $security: Developer security key
setTimeTarget (line 2586)

Set Time Target

  • return: Success return: 'info'=>success
  • access: public
array setTimeTarget (int $adsid, int $cid, string $security, array $timedatapost)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $timedatapost: Array : $timedatapost['date_from'],$timedatapost['date_to']
signup (line 459)

Advertiser Sign up

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array signup (string $email, string $password, int $adminid, string $admin_name, string $security, [array $extra_arr = array()])
  • string $email: Email address
  • string $password: Advertiser login password
  • int $adminid: Advertiser account admin ID, can be null
  • string $admin_name: Advertiser account admin name, can be null
  • string $security: Developer security key
  • array $extra_arr: Advertiser details, data array keys:phone,address,city,state,province,zipcode,country,timezone_id,website,ipaddr(custmer IP address)
timezoneList (line 335)

List all timezone

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array timezoneList (string $security)
  • string $security: Developer security key
updateAccount (line 533)

Update advertiser account

  • return: Success return: 'info'=>success
  • access: public
array updateAccount (int $adsid, string $security, array $extra_arr)
  • int $adsid: Advertiser ID
  • string $security: Developer security key
  • array $extra_arr: Account detail,array keys: paypal,password,name,company,email,phone,address,city,state,zipcode,country,timezone_id,website
updateCampaign (line 1743)

This function update campaign setting information

  • return: Success return: 'info'=>success and 'data'=>array(updated field)
  • access: public
array updateCampaign (int $adsid, int $cid, string $security, array $extra_arr)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $extra_arr: Array keys:camp_name,dailyLimit,url,title,description1,description2,maxBid,hasAdult,geoTarget,country_target,imageOnly,cpx,bannerType,auto_optimize
updateCampChannelTarget (line 2249)

Update Campaign Channel Target

  • return: Success return: 'info'=>success
  • access: public
array updateCampChannelTarget (int $adsid, int $cid, string $security, array $ok_cate_bid_array)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $ok_cate_bid_array: Category array : $category[]['id'],$category[]['bid']
updateCampCityTarget (line 1914)

Update campaign city target

  • return: Success return: 'info'=>success
  • access: public
array updateCampCityTarget (int $adsid, int $cid, string $security, array $geo_id)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $geo_id: GeoIDs
updateCampUnsupportCountry (line 1992)

Update unsupported country targeting to city targeting table

  • return: Success return: 'info'=>success
  • access: public
array updateCampUnsupportCountry (int $adsid, int $cid, string $security, array $country_code_array)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $country_code_array: Country code array
updateKeywords (line 1104)

Update keywords for campaign

  • return: Success return: 'info'=>success and 'data'=>array
  • access: public
array updateKeywords (int $adsid, int $cid, array $keywords_id_array, array $keywords_array, array $max_bid_array, array $match_type_array, string $security, [array $extra_arr = ""])
  • int $adsid
  • int $cid
  • array $keywords_id_array: Format: array("1","2")
  • array $keywords_array: Format: array("tv on sale","discount tv")
  • array $max_bid_array: Format: array("0.5","0.6")
  • array $match_type_array: Format: array("exact","board")
  • string $security: Developer security key
  • array $extra_arr
updateLanguageTarget (line 913)

Update campaign languages targetting

  • access: public
array updateLanguageTarget (int $adsid, int $cid, array $language_targeting_codes_array, string $security)
  • int $adsid
  • int $cid
  • array $language_targeting_codes_array: Format:array("en","zh")
  • string $security
updateTextAds (line 2087)

Update text creative

  • return: Success return: 'info'=>success
  • access: public
array updateTextAds ( $adsid, int $cid, string $security, array $txt_ads_data)
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $txt_ads_data: Array keys:url,title,description1,description2
  • $adsid
uploadCampBanner (line 2651)

Upload Campaign Banner

  • return: Success return: 'info'=>success
  • access: public
array uploadCampBanner (int $adsid, int $cid, string $security, array $bannerData)
  • int $adsid: Advertiser ID
  • int $cid: Campaign ID
  • string $security: Developer security key
  • array $bannerData: Array keys:img_url(saved in database),from_url(banner images dispalyable url),banner_id,click_url,cpx,replace_key,language_target
getPackageList (line3362)

Get Traffic Package List

  • return: Success return: 'info'=>success
  • access: public
array getPackageList (int $adsid, string $cpx, string $security)
  • int $adsid: Advertiser ID
  • string $cpx: CPX Type (cpc,cpm,cpi,cpv)
  • string $security: Developer security key
getPackage (line3524)

Get Traffic Package Detail

  • return: Success return: 'info'=>success
  • access: public
array getPackage (int $pkgid, string $security)
  • int $pkgid: Package ID
  • string $security: Developer security key
createPackageCamp (line3695)

Create Traffic Package Campaign

  • return: Success return: 'info'=>success
  • access: public
array createPackageCamp (int $pkgid, int $cid, string $security, array $extra_arr)
  • int $pkgid: Package ID
  • int $cid: Campaign ID, got by addCampaign(), the campaign created and associated with the package,
  • string $security: Developer security key
  • array $extra_arr: Array keys:cpx(cpx type),adsid(advertiser ID),admin_id(optional)

Documentation generated on Fri, 05 Nov 2010 15:15:58 -0400 by phpDocumentor 1.4.1