Skip to content

Commit

Permalink
Merge pull request #4 from techworkspulse/upgrade-version
Browse files Browse the repository at this point in the history
@Muizz-DS thank you for your contribution
  • Loading branch information
gladyshev authored Jun 21, 2023
2 parents 69d408e + 22b7309 commit 14b5bad
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/OAuth2Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function advertiserGet(

$request = new \GuzzleHttp\Psr7\Request(
'GET',
$apiBaseUrl . '/open_api/v1.2/oauth2/advertiser/get/?' . $query,
$apiBaseUrl . '/open_api/v1.3/oauth2/advertiser/get/?' . $query,
[
'Accept' => 'application/json'
]
Expand Down Expand Up @@ -95,7 +95,7 @@ public function getAccessToken(
): array {
$request = new \GuzzleHttp\Psr7\Request(
'POST',
$apiBaseUrl . '/open_api/v1.2/oauth2/access_token/',
$apiBaseUrl . '/open_api/v1.3/oauth2/access_token/',
[
'Content-Type' => 'application/json'
],
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Ad.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function getAds(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/ad/get/',
'/open_api/v1.3/ad/get/',
[
'advertiser_id' => $advertiserId,
'fields' => $fields,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/AdGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function get(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/adgroup/get/',
'/open_api/v1.3/adgroup/get/',
[
'advertiser_id' => $advertiserId,
'fields' => $fields,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Advertiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function info(array $advertiserIds, array $fields)
{
return $this->requestApi(
'GET',
'/open_api/v1.2/advertiser/info/',
'/open_api/v1.3/advertiser/info/',
[
'advertiser_ids' => $advertiserIds,
'fields' => $fields
Expand Down
12 changes: 6 additions & 6 deletions src/Service/Bc.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function get(?int $bcId = null, ?int $page = null, ?int $pageSize = null)
{
return $this->requestApi(
'GET',
'/open_api/v1.2/bc/get/',
'/open_api/v1.3/bc/get/',
[
'bc_id' => $bcId,
'page' => $page,
Expand All @@ -62,7 +62,7 @@ public function balanceGet(int $bcId): array
{
return $this->requestApi(
'GET',
'/open_api/v1.2/bc/balance/get/',
'/open_api/v1.3/bc/balance/get/',
[
'bc_id' => $bcId,
]
Expand Down Expand Up @@ -94,7 +94,7 @@ public function advertiserBalanceGet(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/advertiser/balance/get/',
'/open_api/v1.3/advertiser/balance/get/',
[
'bc_id' => $bcId,
'filtering' => $filtering,
Expand Down Expand Up @@ -131,7 +131,7 @@ public function advertiserCreate(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/bc/advertiser/create/',
'/open_api/v1.3/bc/advertiser/create/',
[
'bc_id' => $bcId,
'advertiser_info' => $advertiserInfo,
Expand Down Expand Up @@ -167,7 +167,7 @@ public function transfer(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/bc/transfer/',
'/open_api/v1.3/bc/transfer/',
[
'bc_id' => $bcId,
'advertiser_id' => $advertiserId,
Expand Down Expand Up @@ -206,7 +206,7 @@ public function transactionGet(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/advertiser/transaction/get/',
'/open_api/v1.3/advertiser/transaction/get/',
[
'bc_id' => $bcId,
'filtering' => $filtering,
Expand Down
8 changes: 4 additions & 4 deletions src/Service/Campaign.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function get(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/campaign/get/',
'/open_api/v1.3/campaign/get/',
[
'advertiser_id' => $advertiserId,
'fields' => $fields,
Expand Down Expand Up @@ -70,7 +70,7 @@ public function create(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/campaign/create/',
'/open_api/v1.3/campaign/create/',
[
'advertiser_id' => $advertiserId,
'budget' => $budget,
Expand Down Expand Up @@ -109,7 +109,7 @@ public function update(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/campaign/update/',
'/open_api/v1.3/campaign/update/',
[
'advertiser_id' => $advertiserId,
'budget' => $budget,
Expand Down Expand Up @@ -137,7 +137,7 @@ public function updateStatus(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/campaign/update/status/',
'/open_api/v1.3/campaign/update/status/',
[
'advertiser_id' => $advertiserId,
'campaign_ids' => $campaignIds,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Creatives.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function reportsGet(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/creative/reports/get/',
'/open_api/v1.3/creative/report/get/',
[
'advertiser_id' => $advertiserId,
'material_type' => $materialType,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Images.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function imageAdInfo(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/file/image/ad/info/',
'/open_api/v1.3/file/image/ad/info/',
[
'advertiser_id' => $advertiserId,
'image_ids' => $imageIds
Expand Down
18 changes: 9 additions & 9 deletions src/Service/Leads.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function createTestLead(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/pages/leads/mock/create/',
'/open_api/v1.3/page/lead/mock/create/',
[
'advertiser_id' => $advertiserId,
'library_id' => $libraryId,
Expand Down Expand Up @@ -64,7 +64,7 @@ public function getTestLeads(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/pages/leads/mock/get/',
'/open_api/v1.3/page/lead/mock/get/',
[
'advertiser_id' => $advertiserId,
'library_id' => $libraryId,
Expand Down Expand Up @@ -92,7 +92,7 @@ public function deleteTestLead(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/pages/leads/mock/delete/',
'/open_api/v1.3/page/lead/mock/delete/',
[
'advertiser_id' => $advertiserId,
'lead_id' => $leadId
Expand All @@ -119,7 +119,7 @@ public function createLeadDownloadTask(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/pages/leads/task/',
'/open_api/v1.3/page/lead/task/',
[
'advertiser_id' => $advertiserId,
'ad_id' => $adId,
Expand Down Expand Up @@ -148,7 +148,7 @@ public function getLeadDownloadTask(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/pages/leads/task/',
'/open_api/v1.3/page/lead/task/',
[
'advertiser_id' => $advertiserId,
'task_id' => $taskId
Expand All @@ -173,7 +173,7 @@ public function downloadLeads(
int $taskId
): string {
$url = $this->credentials->getApiBaseUrl()
. '/open_api/v1.2/pages/leads/task/download/'
. '/open_api/v1.3/page/lead/task/download/'
. '?' . $this->prepareGetParams([
'advertiser_id' => $advertiserId,
'task_id' => $taskId
Expand Down Expand Up @@ -246,7 +246,7 @@ public function subscribeToLeads(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/subscription/subscribe/',
'/open_api/v1.3/subscription/subscribe/',
[
'app_id' => $appId,
'secret' => $secret,
Expand Down Expand Up @@ -276,7 +276,7 @@ public function cancelSubscription(
): array {
return $this->requestApi(
'POST',
'/open_api/v1.2/subscription/unsubscribe/',
'/open_api/v1.3/subscription/unsubscribe/',
[
'app_id' => $appId,
'secret' => $secret,
Expand Down Expand Up @@ -307,7 +307,7 @@ public function getSubscriptions(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/subscription/get/',
'/open_api/v1.3/subscription/get/',
[
'app_id' => $appId,
'secret' => $secret,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function get(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/pages/get/',
'/open_api/v1.3/page/get/',
[
'advertiser_id' => $advertiserId,
'page' => $page,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Report.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function integratedGet(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/reports/integrated/get/',
'/open_api/v1.3/report/integrated/get/',
[
'advertiser_id' => $advertiserId,
'service_type' => $serviceType,
Expand Down
10 changes: 5 additions & 5 deletions src/Service/Tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function language(int $advertiserId): array
{
return $this->requestApi(
'GET',
'/open_api/v1.2/tools/language/',
'/open_api/v1.3/tool/language/',
[
'advertiser_id' => $advertiserId
]
Expand All @@ -39,7 +39,7 @@ public function actionCategory(int $advertiserId): array
{
return $this->requestApi(
'GET',
'/open_api/v1.2/tools/action_category/',
'/open_api/v1.3/tool/action_category/',
[
'advertiser_id' => $advertiserId
]
Expand All @@ -57,7 +57,7 @@ public function carrier(int $advertiserId): array
{
return $this->requestApi(
'GET',
'/open_api/v1.2/tools/carrier/',
'/open_api/v1.3/tool/carrier/',
[
'advertiser_id' => $advertiserId
]
Expand All @@ -76,7 +76,7 @@ public function osVersion(int $advertiserId, string $osType): array
{
return $this->requestApi(
'GET',
'/open_api/v1.2/tools/os_version/',
'/open_api/v1.3/tool/os_version/',
[
'advertiser_id' => $advertiserId,
'os_type' => $osType
Expand All @@ -99,7 +99,7 @@ public function interestCategory(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/tools/interest_category/',
'/open_api/v1.3/tool/interest_category/',
[
'advertiser_id' => $advertiserId,
'version' => $version,
Expand Down
2 changes: 1 addition & 1 deletion src/Service/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function info(): array
{
return $this->requestApi(
'GET',
'/open_api/v1.2/user/info/'
'/open_api/v1.3/user/info/'
);
}
}
2 changes: 1 addition & 1 deletion src/Service/Video.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function videoAdInfo(
): array {
return $this->requestApi(
'GET',
'/open_api/v1.2/file/video/ad/info/',
'/open_api/v1.3/file/video/ad/info/',
[
'advertiser_id' => $advertiserId,
'video_ids' => $videoIds
Expand Down

0 comments on commit 14b5bad

Please sign in to comment.