Skip to content

Commit 3577139

Browse files
author
Luca Bruno
committed
Deprecate TargetingSearchTypes::CITY and TargetingSearchTypes::REGION
Summary: deprecate /search?type=[adcity|adregion] in favor of /search?type=adgeolocation Test Plan: ./vendor/bin/phpunit -vc test/ test/FacebookAdsTest/Object/TargetingSearchTest.php
1 parent d3e0134 commit 3577139

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/FacebookAds/Object/Search/TargetingSearchTypes.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
*/
3232
class TargetingSearchTypes extends AbstractEnum {
3333

34-
const CITY = 'adcity';
3534
const COUNTRY = 'adcountry';
3635
const EDUCATION = 'adeducationschool';
3736
const EMPLOYER = 'adworkemployer';
@@ -45,7 +44,6 @@ class TargetingSearchTypes extends AbstractEnum {
4544
const MAJOR = 'adeducationmajor';
4645
const POSITION = 'adworkposition';
4746
const RADIUS_SUGGESTION = 'adradiussuggestion';
48-
const REGION = 'adregion';
4947
const TARGETING_CATEGORY = 'adTargetingCategory';
5048
const ZIPCODE = 'adzipcode';
5149
}

test/FacebookAdsTest/Object/TargetingSearchTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
class TargetingSearchTest extends AbstractCrudObjectTestCase {
3232

3333
public function testCrudAccess() {
34-
$cursor = TargetingSearch::search(TargetingSearchTypes::CITY, null, 'Lon');
34+
$cursor = TargetingSearch::search(
35+
TargetingSearchTypes::GEOLOCATION, null, 'Lon');
3536

3637
/* @var $category AbstractCrudObject */
3738
$result = $cursor->current();

0 commit comments

Comments
 (0)