Skip to content

Commit

Permalink
Ads SDK v2.10 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
windsfantasy6 committed Jul 18, 2017
1 parent b5b6634 commit a366672
Show file tree
Hide file tree
Showing 50 changed files with 678 additions and 53 deletions.
4 changes: 4 additions & 0 deletions lib/facebook_ads/ad_objects/ad.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ class Ad < AdObject
field :last_updated_by_app_id, 'string'
field :name, 'string'
field :recommendations, { list: 'AdRecommendation' }
field :source_ad, 'Ad'
field :source_ad_id, 'string'
field :status, { enum: -> { STATUS }}
field :tracking_specs, { list: 'ConversionActionQuery' }
field :updated_time, 'datetime'
Expand Down Expand Up @@ -159,6 +161,7 @@ class Ad < AdObject
api.has_param :time_increment, 'string'
api.has_param :time_range, 'object'
api.has_param :time_ranges, { list: 'object' }
api.has_param :use_account_attribution_setting, 'bool'
end
edge.post 'AdReportRun' do |api|
api.has_param :action_attribution_windows, { list: { enum: -> { AdsInsights::ACTION_ATTRIBUTION_WINDOWS }} }
Expand All @@ -180,6 +183,7 @@ class Ad < AdObject
api.has_param :time_increment, 'string'
api.has_param :time_range, 'object'
api.has_param :time_ranges, { list: 'object' }
api.has_param :use_account_attribution_setting, 'bool'
end
end

Expand Down
27 changes: 10 additions & 17 deletions lib/facebook_ads/ad_objects/ad_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class AdAccount < AdObject
field :age, 'double'
field :agency_client_declaration, 'AgencyClientDeclaration'
field :amount_spent, 'string'
field :attribution_spec, { list: 'object' }
field :balance, 'string'
field :business, 'Business'
field :business_city, 'string'
Expand All @@ -68,6 +69,7 @@ class AdAccount < AdObject
field :has_migrated_permissions, 'bool'
field :id, 'string'
field :io_number, 'string'
field :is_attribution_spec_system_default, 'bool'
field :is_notifications_enabled, 'bool'
field :is_personal, 'int'
field :is_prepay_account, 'bool'
Expand Down Expand Up @@ -171,9 +173,9 @@ class AdAccount < AdObject
api.has_param :name, 'string'
end
edge.post list: 'AdImage' do |api|
api.has_param :bytes, 'string'
api.has_param :bytes, 'object'
api.has_param :copy_from, 'object'
api.has_param :zipbytes, 'string'
api.has_param :zipbytes, 'object'
api.accepts_files!
end
end
Expand Down Expand Up @@ -259,7 +261,6 @@ class AdAccount < AdObject
api.has_param :promoted_object, 'object'
api.has_param :redownload, 'bool'
api.has_param :rf_prediction_id, 'string'
api.has_param :rtb_flag, 'bool'
api.has_param :start_time, 'datetime'
api.has_param :status, { enum: -> { AdSet::STATUS }}
api.has_param :targeting, 'Targeting'
Expand Down Expand Up @@ -304,6 +305,7 @@ class AdAccount < AdObject
api.has_param :og_object_id, 'string'
api.has_param :og_phrase, 'string'
api.has_param :og_suggestion_mechanism, 'string'
api.has_param :original_fov, 'int'
api.has_param :original_projection_type, { enum: %w{equirectangular cubemap }}
api.has_param :referenced_sticker_id, 'string'
api.has_param :slideshow_spec, 'hash'
Expand Down Expand Up @@ -347,7 +349,6 @@ class AdAccount < AdObject
api.has_param :object_count, 'int'
end
edge.get 'Campaign' do |api|
api.has_param :ad_draft_id, 'string'
api.has_param :date_preset, { enum: -> { Campaign::DATE_PRESET }}
api.has_param :effective_status, { list: { enum: -> { Campaign::EFFECTIVE_STATUS }} }
api.has_param :is_completed, 'bool'
Expand Down Expand Up @@ -408,20 +409,18 @@ class AdAccount < AdObject

has_edge :customconversions do |edge|
edge.post 'CustomConversion' do |api|
api.has_param :aggregation_rule, 'string'
api.has_param :custom_event_type, { enum: -> { CustomConversion::CUSTOM_EVENT_TYPE }}
api.has_param :default_conversion_value, 'double'
api.has_param :description, 'string'
api.has_param :event_source_id, 'string'
api.has_param :name, 'string'
api.has_param :retention_days, 'int'
api.has_param :rule, 'string'
end
end

has_edge :delivery_estimate do |edge|
edge.get 'DeliveryEstimate' do |api|
api.has_param :optimization_goal, 'adaccountdelivery_estimate_optimization_goal_enum_param'
edge.get 'AdAccountDeliveryEstimate' do |api|
api.has_param :optimization_goal, { enum: -> { AdAccountDeliveryEstimate::OPTIMIZATION_GOAL }}
api.has_param :promoted_object, 'object'
api.has_param :targeting_spec, 'Targeting'
end
Expand Down Expand Up @@ -463,6 +462,7 @@ class AdAccount < AdObject
api.has_param :time_increment, 'string'
api.has_param :time_range, 'object'
api.has_param :time_ranges, { list: 'object' }
api.has_param :use_account_attribution_setting, 'bool'
end
edge.post 'AdReportRun' do |api|
api.has_param :action_attribution_windows, { list: { enum: -> { AdsInsights::ACTION_ATTRIBUTION_WINDOWS }} }
Expand All @@ -484,6 +484,7 @@ class AdAccount < AdObject
api.has_param :time_increment, 'string'
api.has_param :time_range, 'object'
api.has_param :time_ranges, { list: 'object' }
api.has_param :use_account_attribution_setting, 'bool'
end
end

Expand All @@ -507,14 +508,6 @@ class AdAccount < AdObject
edge.get
end

has_edge :offlineconversions do |edge|
edge.post do |api|
api.has_param :event, 'string'
api.has_param :payload, { list: 'object' }
api.has_param :pixel_id, 'string'
end
end

has_edge :offsitepixels do |edge|
edge.get 'OffsitePixel'
edge.post 'OffsitePixel' do |api|
Expand Down Expand Up @@ -546,7 +539,7 @@ class AdAccount < AdObject
api.has_param :opt_out_link, 'string'
api.has_param :parent_audience_id, 'int'
api.has_param :product_set_id, 'string'
api.has_param :subtype, { enum: %w{CUSTOM WEBSITE APP OFFLINE_CONVERSION CLAIM PARTNER MANAGED VIDEO LOOKALIKE ENGAGEMENT DATA_SET BAG_OF_ACCOUNTS STUDY_RULE_AUDIENCE }}
api.has_param :subtype, { enum: %w{CUSTOM WEBSITE APP OFFLINE_CONVERSION CLAIM PARTNER MANAGED VIDEO LOOKALIKE ENGAGEMENT DATA_SET BAG_OF_ACCOUNTS STUDY_RULE_AUDIENCE FOX }}
api.has_param :tags, { list: 'string' }
end
end
Expand Down
63 changes: 63 additions & 0 deletions lib/facebook_ads/ad_objects/ad_account_delivery_estimate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
#
# You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
# copy, modify, and distribute this software in source code or binary form for use
# in connection with the web services and APIs provided by Facebook.
#
# As with any software that integrates with the Facebook platform, your use of
# this software is subject to the Facebook Platform Policy
# [http://developers.facebook.com/policy/]. This copyright notice shall be
# included in all copies or substantial portions of the software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# FB:AUTOGEN

module FacebookAds
# This class is auto-genereated.

# For any issues or feature requests related to this class, please let us know
# on github and we'll fix in our codegen framework. We'll not be able to accept
# pull request for this class.

class AdAccountDeliveryEstimate < AdObject
OPTIMIZATION_GOAL = [
"NONE",
"APP_INSTALLS",
"BRAND_AWARENESS",
"CLICKS",
"ENGAGED_USERS",
"EVENT_RESPONSES",
"IMPRESSIONS",
"LEAD_GENERATION",
"LINK_CLICKS",
"OFFER_CLAIMS",
"OFFSITE_CONVERSIONS",
"PAGE_ENGAGEMENT",
"PAGE_LIKES",
"POST_ENGAGEMENT",
"REACH",
"SOCIAL_IMPRESSIONS",
"VIDEO_VIEWS",
"APP_DOWNLOADS",
"LANDING_PAGE_VIEWS",
]


field :bid_estimate, 'object'
field :daily_outcomes_curve, { list: 'OutcomePredictionPoint' }
field :estimate_dau, 'object'
field :estimate_mau, 'object'
field :estimate_ready, 'bool'
has_no_id
has_no_get
has_no_post
has_no_delete

end
end
7 changes: 6 additions & 1 deletion lib/facebook_ads/ad_objects/ad_account_targeting_unified.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class AdAccountTargetingUnified < AdObject
"effective_audience_network_positions",
"excluded_publisher_categories",
"excluded_publisher_list_ids",
"excluded_publisher_domains",
"publisher_visibility_categories",
"user_device",
"mobile_device_model",
Expand All @@ -106,6 +105,7 @@ class AdAccountTargetingUnified < AdObject
"moms",
"office_type",
"targeting_optimization",
"direct_install_devices",
"engagement_specs",
"excluded_engagement_specs",
"product_audience_specs",
Expand All @@ -118,6 +118,11 @@ class AdAccountTargetingUnified < AdObject
"fb_deal_id",
"interest_defaults_source",
"alternate_auto_targeting_option",
"contextual_targeting_categories",
"topic",
"format",
"trending",
"gatekeepers",
]


Expand Down
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_async_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class AdAsyncRequest < AdObject
field :result, 'hash'
field :scope_object_id, 'string'
field :status, { enum: -> { STATUS }}
field :type, 'string'
field :updated_time, 'datetime'
has_no_post
has_no_delete
Expand Down
63 changes: 63 additions & 0 deletions lib/facebook_ads/ad_objects/ad_campaign_delivery_estimate.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright (c) 2017-present, Facebook, Inc. All rights reserved.
#
# You are hereby granted a non-exclusive, worldwide, royalty-free license to use,
# copy, modify, and distribute this software in source code or binary form for use
# in connection with the web services and APIs provided by Facebook.
#
# As with any software that integrates with the Facebook platform, your use of
# this software is subject to the Facebook Platform Policy
# [http://developers.facebook.com/policy/]. This copyright notice shall be
# included in all copies or substantial portions of the software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

# FB:AUTOGEN

module FacebookAds
# This class is auto-genereated.

# For any issues or feature requests related to this class, please let us know
# on github and we'll fix in our codegen framework. We'll not be able to accept
# pull request for this class.

class AdCampaignDeliveryEstimate < AdObject
OPTIMIZATION_GOAL = [
"NONE",
"APP_INSTALLS",
"BRAND_AWARENESS",
"CLICKS",
"ENGAGED_USERS",
"EVENT_RESPONSES",
"IMPRESSIONS",
"LEAD_GENERATION",
"LINK_CLICKS",
"OFFER_CLAIMS",
"OFFSITE_CONVERSIONS",
"PAGE_ENGAGEMENT",
"PAGE_LIKES",
"POST_ENGAGEMENT",
"REACH",
"SOCIAL_IMPRESSIONS",
"VIDEO_VIEWS",
"APP_DOWNLOADS",
"LANDING_PAGE_VIEWS",
]


field :bid_estimate, 'object'
field :daily_outcomes_curve, { list: 'OutcomePredictionPoint' }
field :estimate_dau, 'object'
field :estimate_mau, 'object'
field :estimate_ready, 'bool'
has_no_id
has_no_get
has_no_post
has_no_delete

end
end
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_creative.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class AdCreative < AdObject
"REGISTER_NOW",
"REQUEST_TIME",
"SEE_MENU",
"EMAIL_NOW",
"OPEN_MOVIES",
]

Expand Down
2 changes: 2 additions & 0 deletions lib/facebook_ads/ad_objects/ad_creative_link_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class AdCreativeLinkData < AdObject
field :offer_id, 'string'
field :page_welcome_message, 'string'
field :picture, 'string'
field :retailer_item_ids, { list: 'string' }
field :show_multiple_images, 'bool'
has_no_id
has_no_get
has_no_post
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class AdCreativeLinkDataCallToAction < AdObject
"REGISTER_NOW",
"REQUEST_TIME",
"SEE_MENU",
"EMAIL_NOW",
"OPEN_MOVIES",
]

Expand Down
2 changes: 2 additions & 0 deletions lib/facebook_ads/ad_objects/ad_creative_video_data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module FacebookAds

class AdCreativeVideoData < AdObject

field :additional_image_index, 'int'
field :branded_content_sponsor_page_id, 'string'
field :branded_content_sponsor_relationship, 'string'
field :call_to_action, 'AdCreativeLinkDataCallToAction'
Expand All @@ -36,6 +37,7 @@ class AdCreativeVideoData < AdObject
field :message, 'string'
field :offer_id, 'string'
field :page_welcome_message, 'string'
field :retailer_item_ids, { list: 'string' }
field :targeting, 'Targeting'
field :title, 'string'
field :video_id, 'string'
Expand Down
4 changes: 2 additions & 2 deletions lib/facebook_ads/ad_objects/ad_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class AdImage < AdObject
field :url, 'string'
field :url_128, 'string'
field :width, 'int'
field :bytes, 'string'
field :bytes, 'object'
field :copy_from, 'object'
field :zipbytes, 'string'
field :zipbytes, 'object'
has_no_post
has_no_delete

Expand Down
2 changes: 2 additions & 0 deletions lib/facebook_ads/ad_objects/ad_preview.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class AdPreview < AdObject
"INSTANT_ARTICLE_STANDARD",
"INSTREAM_VIDEO_DESKTOP",
"INSTREAM_VIDEO_MOBILE",
"SUGGESTED_VIDEO_DESKTOP",
"SUGGESTED_VIDEO_MOBILE",
]


Expand Down
1 change: 1 addition & 0 deletions lib/facebook_ads/ad_objects/ad_report_run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class AdReportRun < AdObject
field :time_increment, 'string'
field :time_range, 'object'
field :time_ranges, { list: 'object' }
field :use_account_attribution_setting, 'bool'
has_no_post
has_no_delete

Expand Down
Loading

0 comments on commit a366672

Please sign in to comment.