Skip to content

Commit

Permalink
Merge pull request #63 from hborras/v5
Browse files Browse the repository at this point in the history
V5
  • Loading branch information
hborras authored Aug 20, 2019
2 parents 600f6d9 + 0cc0349 commit f1984f9
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 50 deletions.
2 changes: 1 addition & 1 deletion src/TwitterAds.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
class TwitterAds extends Config
{
const API_VERSION = '4';
const API_VERSION = '5';
const API_REST_VERSION = '1.1';
const API_HOST = 'https://ads-api.twitter.com';
const API_HOST_SANDBOX = 'https://ads-api-sandbox.twitter.com';
Expand Down
2 changes: 1 addition & 1 deletion src/TwitterAds/Campaign/TargetingCriteria.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class TargetingCriteria extends Resource
*/
public function line_item_all($line_item_id, $params = [])
{
$params[TargetingCriteriaFields::LINE_ITEM_ID] = $line_item_id;
$params[TargetingCriteriaFields::LINE_ITEM_IDS] = [$line_item_id];

$resource = str_replace(static::RESOURCE_REPLACE, $this->getTwitterAds()->getAccountId(), static::RESOURCE_COLLECTION);
$request = $this->getTwitterAds()->get($resource, $params);
Expand Down
9 changes: 0 additions & 9 deletions src/TwitterAds/Creative/ImageAppDownloadCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class ImageAppDownloadCard extends Resource

/** Read Only */
protected $id;
protected $preview_url;
protected $created_at;
protected $updated_at;
protected $deleted;
Expand Down Expand Up @@ -50,14 +49,6 @@ public function getId()
return $this->id;
}

/**
* @return mixed
*/
public function getPreviewUrl()
{
return $this->preview_url;
}

/**
* @return mixed
*/
Expand Down
9 changes: 0 additions & 9 deletions src/TwitterAds/Creative/ImageConversationCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class ImageConversationCard extends Resource

/** Read Only */
protected $id;
protected $preview_url;
protected $created_at;
protected $updated_at;
protected $deleted;
Expand Down Expand Up @@ -48,14 +47,6 @@ public function getId()
return $this->id;
}

/**
* @return mixed
*/
public function getPreviewUrl()
{
return $this->preview_url;
}

/**
* @return mixed
*/
Expand Down
9 changes: 0 additions & 9 deletions src/TwitterAds/Creative/VideoAppDownloadCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class VideoAppDownloadCard extends Resource

/** Read Only */
protected $id;
protected $preview_url;
protected $video_url;
protected $video_poster_url;
protected $created_at;
Expand Down Expand Up @@ -54,14 +53,6 @@ public function getId()
return $this->id;
}

/**
* @return mixed
*/
public function getPreviewUrl()
{
return $this->preview_url;
}

/**
* @return mixed
*/
Expand Down
9 changes: 0 additions & 9 deletions src/TwitterAds/Creative/VideoConversationCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class VideoConversationCard extends Resource

/** Read Only */
protected $id;
protected $preview_url;
protected $video_url;
protected $video_poster_url;
protected $created_at;
Expand Down Expand Up @@ -52,14 +51,6 @@ public function getId()
return $this->id;
}

/**
* @return mixed
*/
public function getPreviewUrl()
{
return $this->preview_url;
}

/**
* @return mixed
*/
Expand Down
1 change: 1 addition & 0 deletions src/TwitterAds/Fields/CampaignFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class CampaignFields extends Fields
const SORT_BY = 'sort_by';
const ENTITY_STATUS = 'entity_status';
const WITH_TOTAL_COUNT = 'with_total_count';
const WITH_DRAFT = 'with_draft';

const ACCOUNT_ID = 'account_id';
const CAMPAIGN_IDS = 'campaign_ids';
Expand Down
1 change: 0 additions & 1 deletion src/TwitterAds/Fields/ImageAppDownloadCardFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class ImageAppDownloadCardFields
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
const DELETED = 'delete';
const PREVIEW_URL = 'preview_url';
const NAME = 'name';
const COUNTRY_CODE = 'country_code';
const IPHONE_APP_ID = 'iphone_app_id';
Expand Down
1 change: 0 additions & 1 deletion src/TwitterAds/Fields/ImageConversationCardFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class ImageConversationCardFields
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
const DELETED = 'delete';
const PREVIEW_URL = 'preview_url';
const NAME = 'name';
const TITLE = 'title';
const FIRST_CTA = 'first_cta';
Expand Down
11 changes: 6 additions & 5 deletions src/TwitterAds/Fields/LineItemFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ class LineItemFields
const SORT_BY = 'sort_by';
const ENTITY_STATUS = 'entity_status';
const WITH_TOTAL_COUNT = 'with_total_count';
const TARGET_CPA_LOCAL_MICRO = 'target_cpa_local_micro';
const CATEGORIES = 'categories';
const CURRENCY = 'currency';
const TRACKING_TAGS = 'tracking_tags';
const LOOKALIKE_EXPANSION = 'lookalike_expansion';
const TARGET_CPA_LOCAL_MICRO = 'target_cpa_local_micro';
const CATEGORIES = 'categories';
const CURRENCY = 'currency';
const TRACKING_TAGS = 'tracking_tags';
const LOOKALIKE_EXPANSION = 'lookalike_expansion';
const WITH_DRAFT = 'with_draft';

const CAMPAIGN_IDS = 'campaign_ids';
const FUNDING_INSTRUMENT_IDS = 'funding_instrument_ids';
Expand Down
1 change: 1 addition & 0 deletions src/TwitterAds/Fields/TargetingCriteriaFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TargetingCriteriaFields
const UPDATED_AT = 'updated_at';
const DELETED = 'delete';
const LINE_ITEM_ID = 'line_item_id';
const LINE_ITEM_IDS = 'line_item_ids';
const TARGETING_TYPE = 'targeting_type';
const TARGETING_VALUE = 'targeting_value';
const TAILORED_AUDIENCE_EXPANSION = 'tailored_audience_expansion';
Expand Down
3 changes: 1 addition & 2 deletions src/TwitterAds/Fields/VideoAppDownloadCardFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@ class VideoAppDownloadCardFields
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
const DELETED = 'delete';
const PREVIEW_URL = 'preview_url';
const VIDEO_URL = 'video_url';
const VIDEO_POSTER_URL = 'video_poster_url';
const NAME = 'name';
const COUNTRY_CODE = 'country_code';
const COUNTRY_CODE = 'country_code';
const IPHONE_APP_ID = 'iphone_app_id';
const IPHONE_DEEP_LINK = 'iphone_deep_link';
const IPAD_APP_ID = 'ipad_app_id';
Expand Down
1 change: 0 additions & 1 deletion src/TwitterAds/Fields/VideoConversationCardFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class VideoConversationCardFields
const DELETED = 'delete';
const VIDEO_URL = 'video_url';
const VIDEO_POSTER_URL = 'video_poster_url';
const PREVIEW_URL = 'preview_url';
const NAME = 'name';
const TITLE = 'title';
const FIRST_CTA = 'first_cta';
Expand Down
1 change: 0 additions & 1 deletion src/TwitterAds/Fields/VideoFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class VideoFields
const READY_TO_TWEET = 'ready_to_tweet';
const DURATION = 'duration';
const REASONS_NOT_SERVABLE = 'reasons_not_servable';
const PREVIEW_URL = 'preview_url';
const TITLE = 'title';
const DESCRIPTION = 'description';
const VIDEO_MEDIA_ID = 'video_media_id';
Expand Down
1 change: 0 additions & 1 deletion src/TwitterAds/Fields/WebsiteCardFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ class WebsiteCardFields
const CREATED_AT = 'created_at';
const UPDATED_AT = 'updated_at';
const DELETED = 'deleted';
const PREVIEW_URL = 'preview_url';
const WEBSITE_TITLE = 'website_title';
const WEBSITE_URL = 'website_url';
const IMAGE_MEDIA_ID = 'image_media_id';
Expand Down

0 comments on commit f1984f9

Please sign in to comment.