Skip to content

Commit

Permalink
Merge pull request #4 from Artistan/doc_updates
Browse files Browse the repository at this point in the history
updated docs
  • Loading branch information
Artistan authored Oct 5, 2018
2 parents 651f54c + ac8683a commit 9ab2a4f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
13 changes: 7 additions & 6 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
| public | <strong>deleteAgency(</strong><em>int</em> <strong>$agencyId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a specified agency.</em> |
| public | <strong>deleteBanner(</strong><em>int</em> <strong>$bannerId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a banner from the banner object.</em> |
| public | <strong>deleteCampaign(</strong><em>int</em> <strong>$campaignId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a campaign from the campaign object.</em> |
| public | <strong>deleteChannel(</strong><em>int</em> <strong>$channelId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a Channel from the channel object.</em> |
| public | <strong>deletePublisher(</strong><em>int</em> <strong>$publisherId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a publisher from the publisher object.</em> |
| public | <strong>deleteUser(</strong><em>int</em> <strong>$userId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a user from the user object.</em> |
| public | <strong>deleteZone(</strong><em>int</em> <strong>$zoneId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a zone from the zone object.</em> |
Expand Down Expand Up @@ -352,13 +353,13 @@ $rpc->setChannelTargeting($channel_id,$targeting);
| public | <strong>deletePublisher(</strong><em>int</em> <strong>$publisherId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a publisher from the publisher object.</em> |
| public | <strong>deleteUser(</strong><em>int</em> <strong>$userId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a user from the user object.</em> |
| public | <strong>deleteZone(</strong><em>int</em> <strong>$zoneId</strong>)</strong> : <em>mixed result</em><br /><em>This method deletes a zone from the zone object.</em> |
| public | <strong>generateTags(</strong><em>mixed</em> <strong>$zoneId</strong>, <em>mixed</em> <strong>$codeType</strong>, <em>mixed</em> <strong>$aParams=null</strong>)</strong> : <em>void</em> |
| public | <strong>generateTags(</strong><em>int</em> <strong>$zoneId</strong>, <em>string</em> <strong>$codeType</strong>, <em>array/null</em> <strong>$aParams=null</strong>)</strong> : <em>boolean result</em><br /><em>This method unlinks a campaign from a zone.</em> |
| public | <strong>getAdvertiser(</strong><em>int</em> <strong>$advertiserId</strong>)</strong> : <em>[\Artistan\ReviveXmlRpc\AdvertiserInfo](#class-artistanrevivexmlrpcadvertiserinfo)</em><br /><em>This method returns AdvertiserInfo for a specified advertiser.</em> |
| public | <strong>getAdvertiserListByAgencyId(</strong><em>int</em> <strong>$agencyId</strong>)</strong> : <em>array array AgencyInfo objects</em><br /><em>This method returns a list of advertisers by Agency ID.</em> |
| public | <strong>getAgency(</strong><em>int</em> <strong>$agencyId</strong>)</strong> : <em>[\Artistan\ReviveXmlRpc\AgencyInfo](#class-artistanrevivexmlrpcagencyinfo)</em><br /><em>This method returns the AgencyInfo for a specified agency.</em> |
| public | <strong>getAgencyList()</strong> : <em>array array AgencyInfo objects</em><br /><em>This method returns AgencyInfo for all agencies.</em> |
| public | <strong>getBanner(</strong><em>int</em> <strong>$bannerId</strong>)</strong> : <em>[\Artistan\ReviveXmlRpc\BannerInfo](#class-artistanrevivexmlrpcbannerinfo)</em><br /><em>This method returns BannerInfo for a specified banner.</em> |
| public | <strong>getBannerListByCampaignId(</strong><em>int</em> <strong>$campaignId</strong>)</strong> : <em>array array CampaignInfo objects</em><br /><em>This method returns a list of banners for a specified campaign.</em> |
| public | <strong>getBannerListByCampaignId(</strong><em>int</em> <strong>$campaignId</strong>)</strong> : <em>array array BannerInfo objects</em><br /><em>This method returns a list of banners for a specified campaign.</em> |
| public | <strong>getBannerTargeting(</strong><em>int</em> <strong>$bannerId</strong>)</strong> : <em>array</em><br /><em>This method returns TargetingInfo for a specified banner.</em> |
| public | <strong>getCampaign(</strong><em>int</em> <strong>$campaignId</strong>)</strong> : <em>[\Artistan\ReviveXmlRpc\CampaignInfo](#class-artistanrevivexmlrpccampaigninfo)</em><br /><em>This method returns CampaignInfo for a specified campaign.</em> |
| public | <strong>getCampaignListByAdvertiserId(</strong><em>int</em> <strong>$advertiserId</strong>)</strong> : <em>array array CampaignInfo objects</em><br /><em>This method returns a list of campaigns for an advertiser.</em> |
Expand All @@ -368,8 +369,8 @@ $rpc->setChannelTargeting($channel_id,$targeting);
| public | <strong>getUserListByAccountId(</strong><em>int</em> <strong>$accountId</strong>)</strong> : <em>array array UserInfo objects</em><br /><em>This method returns a list of users by Account ID.</em> |
| public | <strong>getZone(</strong><em>int</em> <strong>$zoneId</strong>)</strong> : <em>[\Artistan\ReviveXmlRpc\ZoneInfo](#class-artistanrevivexmlrpczoneinfo)</em><br /><em>This method returns ZoneInfo for a specified zone.</em> |
| public | <strong>getZoneListByPublisherId(</strong><em>int</em> <strong>$publisherId</strong>)</strong> : <em>array array ZoneInfo objects</em><br /><em>This method returns a list of zones for a specified publisher.</em> |
| public | <strong>linkBanner(</strong><em>mixed</em> <strong>$zoneId</strong>, <em>mixed</em> <strong>$bannerId</strong>)</strong> : <em>void</em> |
| public | <strong>linkCampaign(</strong><em>mixed</em> <strong>$zoneId</strong>, <em>mixed</em> <strong>$campaignId</strong>)</strong> : <em>void</em> |
| public | <strong>linkBanner(</strong><em>int</em> <strong>$zoneId</strong>, <em>int</em> <strong>$bannerId</strong>)</strong> : <em>boolean result</em><br /><em>This method links a banner to a zone.</em> |
| public | <strong>linkCampaign(</strong><em>int</em> <strong>$zoneId</strong>, <em>int</em> <strong>$campaignId</strong>)</strong> : <em>boolean result</em><br /><em>This method links a campaign to a zone.</em> |
| public | <strong>logoff()</strong> : <em>boolean "Was the remote logoff() call successful?"</em><br /><em>This method logs off from web wervices.</em> |
| public | <strong>modifyAdvertiser(</strong><em>[\Artistan\ReviveXmlRpc\AdvertiserInfo](#class-artistanrevivexmlrpcadvertiserinfo)</em> <strong>$oAdvertiserInfo</strong>)</strong> : <em>mixed result</em><br /><em>This method modifies an advertiser.</em> |
| public | <strong>modifyAgency(</strong><em>[\Artistan\ReviveXmlRpc\AgencyInfo](#class-artistanrevivexmlrpcagencyinfo)</em> <strong>$oAgencyInfo</strong>)</strong> : <em>mixed result</em><br /><em>This method sends a call to the AgencyXmlRpcService and passes the AgencyInfo object with the session to modify an agency.</em> |
Expand All @@ -384,8 +385,8 @@ $rpc->setChannelTargeting($channel_id,$targeting);
| public | <strong>publisherDailyStatistics(</strong><em>int</em> <strong>$publisherId</strong>, <em>\Carbon\Carbon</em> <strong>$oStartDate=null</strong>, <em>\Carbon\Carbon</em> <strong>$oEndDate=null</strong>)</strong> : <em>array result data</em><br /><em>This method returns daily statistics for a publisher for a specified period.</em> |
| public | <strong>publisherZoneStatistics(</strong><em>int</em> <strong>$publisherId</strong>, <em>\Carbon\Carbon</em> <strong>$oStartDate=null</strong>, <em>\Carbon\Carbon</em> <strong>$oEndDate=null</strong>)</strong> : <em>array result data</em><br /><em>This method returns zone statistics for a publisher for a specified period.</em> |
| public | <strong>setBannerTargeting(</strong><em>integer</em> <strong>$bannerId</strong>, <em>array</em> <strong>$aTargeting</strong>)</strong> : <em>bool</em><br /><em>This method takes an array of targeting info objects and a banner id and sets the targeting for the banner to the values passed in</em> |
| public | <strong>unlinkBanner(</strong><em>mixed</em> <strong>$zoneId</strong>, <em>mixed</em> <strong>$bannerId</strong>)</strong> : <em>void</em> |
| public | <strong>unlinkCampaign(</strong><em>mixed</em> <strong>$zoneId</strong>, <em>mixed</em> <strong>$campaignId</strong>)</strong> : <em>void</em> |
| public | <strong>unlinkBanner(</strong><em>int</em> <strong>$zoneId</strong>, <em>int</em> <strong>$bannerId</strong>)</strong> : <em>boolean result</em><br /><em>This method unlinks a banner from a zone.</em> |
| public | <strong>unlinkCampaign(</strong><em>int</em> <strong>$zoneId</strong>, <em>int</em> <strong>$campaignId</strong>)</strong> : <em>boolean result</em><br /><em>This method unlinks a campaign from a zone.</em> |
| public | <strong>updateSsoUserId(</strong><em>int</em> <strong>$oldSsoUserId</strong>, <em>int</em> <strong>$newSsoUserId</strong>)</strong> : <em>bool</em><br /><em>This method updates users SSO User Id</em> |
| public | <strong>updateUserEmailBySsoId(</strong><em>int</em> <strong>$ssoUserId</strong>, <em>string</em> <strong>$email</strong>)</strong> : <em>bool</em><br /><em>This method updates users email by his SSO User Id</em> |
| public | <strong>zoneAdvertiserStatistics(</strong><em>int</em> <strong>$zoneId</strong>, <em>\Carbon\Carbon</em> <strong>$oStartDate=null</strong>, <em>\Carbon\Carbon</em> <strong>$oEndDate=null</strong>)</strong> : <em>array result data</em><br /><em>This method returns advertiser statistics for a zone for a specified period.</em> |
Expand Down
38 changes: 37 additions & 1 deletion src/OpenAdsV1ApiXmlRpc.php
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ function setBannerTargeting($bannerId, $aTargeting)
*
* @param int $campaignId
*
* @return array array CampaignInfo objects
* @return array array BannerInfo objects
*/
function getBannerListByCampaignId($campaignId)
{
Expand Down Expand Up @@ -1136,27 +1136,63 @@ function zoneBannerStatistics($zoneId, $oStartDate = null, $oEndDate = null)
$oEndDate);
}

/**
* This method links a banner to a zone.
*
* @param int $zoneId
* @param int $bannerId
* @return boolean result
*/
function linkBanner($zoneId, $bannerId)
{
return (bool)$this->_sendWithSession('ZoneXmlRpcService.php', 'linkBanner', [(int)$zoneId, (int)$bannerId]);
}

/**
* This method links a campaign to a zone.
*
* @param int $zoneId
* @param int $campaignId
* @return boolean result
*/
function linkCampaign($zoneId, $campaignId)
{
return (bool)$this->_sendWithSession('ZoneXmlRpcService.php', 'linkCampaign', [(int)$zoneId, (int)$campaignId]);
}

/**
* This method unlinks a banner from a zone.
*
* @param int $zoneId
* @param int $bannerId
* @return boolean result
*/
function unlinkBanner($zoneId, $bannerId)
{
return (bool)$this->_sendWithSession('ZoneXmlRpcService.php', 'unlinkBanner', [(int)$zoneId, (int)$bannerId]);
}

/**
* This method unlinks a campaign from a zone.
*
* @param int $zoneId
* @param int $campaignId
* @return boolean result
*/
function unlinkCampaign($zoneId, $campaignId)
{
return (bool)$this->_sendWithSession('ZoneXmlRpcService.php', 'unlinkCampaign',
[(int)$zoneId, (int)$campaignId]);
}

/**
* This method unlinks a campaign from a zone.
*
* @param int $zoneId
* @param string $codeType
* @param array|null $aParams
* @return boolean result
*/
function generateTags($zoneId, $codeType, $aParams = null)
{
if (! isset($aParams)) {
Expand Down

0 comments on commit 9ab2a4f

Please sign in to comment.