facebook_ads 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.travis.yml +8 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +129 -0
- data/README.markdown +380 -0
- data/bin/console +13 -0
- data/facebook_ads.gemspec +26 -0
- data/lib/facebook_ads.rb +46 -0
- data/lib/facebook_ads/ad.rb +34 -0
- data/lib/facebook_ads/ad_account.rb +126 -0
- data/lib/facebook_ads/ad_campaign.rb +54 -0
- data/lib/facebook_ads/ad_creative.rb +66 -0
- data/lib/facebook_ads/ad_image.rb +28 -0
- data/lib/facebook_ads/ad_insight.rb +24 -0
- data/lib/facebook_ads/ad_set.rb +35 -0
- data/lib/facebook_ads/ad_targeting.rb +61 -0
- data/lib/facebook_ads/base.rb +151 -0
- data/spec/ad_account_spec.rb +78 -0
- data/spec/ad_campaign_spec.rb +13 -0
- data/spec/ad_creative_spec.rb +14 -0
- data/spec/ad_image_spec.rb +11 -0
- data/spec/ad_insight_spec.rb +11 -0
- data/spec/ad_set_spec.rb +13 -0
- data/spec/ad_spec.rb +13 -0
- data/spec/ad_targeting_spec.rb +4 -0
- data/spec/spec_helper.rb +15 -0
- data/spec/support/fixtures.sh +17 -0
- data/spec/support/fixtures/6057330925170.json +1 -0
- data/spec/support/fixtures/6057810634370.json +1 -0
- data/spec/support/fixtures/6057810946970.json +1 -0
- data/spec/support/fixtures/6057824295570.json +1 -0
- data/spec/support/fixtures/act_861827983860489.json +1 -0
- data/spec/support/fixtures/act_861827983860489/adcreatives.json +1 -0
- data/spec/support/fixtures/act_861827983860489/adimages.json +1 -0
- data/spec/support/fixtures/act_861827983860489/ads.json +1 -0
- data/spec/support/fixtures/act_861827983860489/adsets.json +1 -0
- data/spec/support/fixtures/act_861827983860489/campaigns.json +1 -0
- data/spec/support/fixtures/me/adaccounts.json +1 -0
- data/spec/support/rack_facebook.rb +22 -0
- metadata +127 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"data":[{"id":"6057810634370","account_id":"861827983860489","campaign_id":"6056189814370","adset_id":"6057810632770","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-09-06T10:09:04-0700","creative":{"id":"6057824295570"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"7ee84b9fcb644c8c5695f2ecabfe7534","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1138229826220302"]}],"updated_time":"2016-09-06T13:22:53-0700"},{"id":"6057810637170","account_id":"861827983860489","campaign_id":"6056189814370","adset_id":"6057810632770","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-09-06T10:09:06-0700","creative":{"id":"6057824289970"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"df3e41dd4ae57a597aaafeba02797dab","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1138229842886967"]}],"updated_time":"2016-09-06T13:22:52-0700"},{"id":"6057810640170","account_id":"861827983860489","campaign_id":"6056189814370","adset_id":"6057810632770","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-09-06T10:09:08-0700","creative":{"id":"6057824290170"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"47f3ad8f25cf4b19e1bc74e73458e2cb","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1138229846220300"]}],"updated_time":"2016-09-06T13:22:48-0700"},{"id":"6057810963170","account_id":"861827983860489","campaign_id":"6056535031970","adset_id":"6057810946970","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-09-06T10:13:32-0700","creative":{"id":"6057810944970"},"effective_status":"ACTIVE","last_updated_by_app_id":"295802707128640","name":"bdcd18485ab593ef6d907208a2f85456","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1138090379567580"]}],"updated_time":"2016-09-06T10:15:34-0700"},{"id":"6057810959770","account_id":"861827983860489","campaign_id":"6056535031970","adset_id":"6057810946970","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-09-06T10:13:30-0700","creative":{"id":"6057810933570"},"effective_status":"ACTIVE","last_updated_by_app_id":"295802707128640","name":"2787515d6c36791163039e1d2c73d6ab","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1138089849567633"]}],"updated_time":"2016-09-06T10:13:39-0700"},{"id":"6057810951570","account_id":"861827983860489","campaign_id":"6056535031970","adset_id":"6057810946970","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-09-06T10:13:29-0700","creative":{"id":"6057810924370"},"effective_status":"ACTIVE","last_updated_by_app_id":"295802707128640","name":"64903d00c5006db8bc4c8ea9ea199baf","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1138089649567653"]}],"updated_time":"2016-09-06T10:13:36-0700"},{"id":"6053601055170","account_id":"861827983860489","campaign_id":"6053600823970","adset_id":"6053601018370","bid_amount":800,"bid_info":{"ACTIONS":800},"bid_type":"CPA","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]}],"created_time":"2016-07-12T11:29:09-0700","creative":{"id":"6057412226970"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"3221615c45fbce2b8d32dc3892358ea1","tracking_specs":[{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1132794240097194"]}],"updated_time":"2016-09-04T22:12:46-0700"},{"id":"6055637180170","account_id":"861827983860489","campaign_id":"6054871916370","adset_id":"6055637171570","bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install_conversion"],"application":["295802707128640"]}],"created_time":"2016-08-08T14:08:09-0700","creative":{"id":"6057402866970"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"755d05458694471921f058c7097dbb2a","tracking_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1132598693450082"]}],"updated_time":"2016-09-02T11:47:45-0700"},{"id":"6056749333370","account_id":"861827983860489","campaign_id":"6054954017970","adset_id":"6056749316170","bid_amount":1000,"bid_info":{"ACTIONS":1000},"bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]}],"created_time":"2016-08-22T13:36:16-0700","creative":{"id":"6057401882570"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"8c56bf6cdc4a0b194a923431d648cc74 - RS","tracking_specs":[{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1132583800118238"]}],"updated_time":"2016-09-02T11:04:36-0700"},{"id":"6055793535570","account_id":"861827983860489","campaign_id":"6055331059170","adset_id":"6055793519570","bid_amount":850,"bid_info":{"ACTIONS":850},"bid_type":"ABSOLUTE_OCPM","configured_status":"ACTIVE","conversion_specs":[{"action.type":["mobile_app_install"],"application":["295802707128640"]}],"created_time":"2016-08-10T12:03:05-0700","creative":{"id":"6057406466970"},"effective_status":"ACTIVE","last_updated_by_app_id":"624541620938530","name":"ce732437184b013113b8527de30055d5","tracking_specs":[{"action.type":["app_custom_event"],"application":["295802707128640"]},{"action.type":["post_engagement"],"page":["300664329976860"],"post":["1132671490109469"]}],"updated_time":"2016-08-31T14:19:12-0700"}]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"data":[{"id":"6057810946970","account_id":"861827983860489","campaign_id":"6056535031970","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-09-06T10:13:27-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"64903d00c5006db8bc4c8ea9ea199baf","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"PURCHASE","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-09-06T10:13:27-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"flexible_spec":[{"interests":[{"id":"6003348604581","name":"Fashion accessories"}]}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["mobileexternal","mobilefeed"]},"updated_time":"2016-09-06T10:13:27-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"4745","daily_budget":"30000","lifetime_budget":"0"},{"id":"6057810632770","account_id":"861827983860489","campaign_id":"6056189814370","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-09-06T10:09:03-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"7ee84b9fcb644c8c5695f2ecabfe7534","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-09-06T10:09:03-0700","targeting":{"age_max":65,"age_min":29,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["mobileexternal","mobilefeed"]},"updated_time":"2016-09-06T13:22:35-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"7652","daily_budget":"20000","lifetime_budget":"0"},{"id":"6057344414770","account_id":"861827983860489","campaign_id":"6056934849770","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-30T16:05:37-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"094c87e3b86f0ca05f039ccc2bf63cd4","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-30T16:05:37-0700","targeting":{"age_max":65,"age_min":29,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066713581057","name":"Lookalike (US, 8\u0025) - Jewelry-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-08-30T16:05:37-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"81","daily_budget":"600","lifetime_budget":"0"},{"id":"6057344148370","account_id":"861827983860489","campaign_id":"6056189814370","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-30T15:54:43-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"5339d34f4dfaf70b14302e86ef54ee6b","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-30T15:54:43-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116664857","name":"Lookalike (US, 4\u0025) - Fine Jewelry-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-09-05T22:43:54-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"141","daily_budget":"1000","lifetime_budget":"0"},{"id":"6057331318370","account_id":"861827983860489","campaign_id":"6057330925170","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-30T11:15:02-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"431128568bfc91de62927473cb04444c","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-30T11:15:02-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116853057","name":"Lookalike (US, 4\u0025) - Beauty-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-08-30T11:15:02-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"4000","daily_budget":"4000","lifetime_budget":"0"},{"id":"6057331316770","account_id":"861827983860489","campaign_id":"6057330925170","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-30T11:15:00-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"a0d854a0c466ac76547ff124d64233df","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-30T11:15:01-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116853057","name":"Lookalike (US, 4\u0025) - Beauty-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-09-01T16:31:25-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"134","daily_budget":"1000","lifetime_budget":"0"},{"id":"6057331315370","account_id":"861827983860489","campaign_id":"6057330925170","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-30T11:14:59-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"53d9f93fd846f79275160c802edf5c11","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-30T11:14:59-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116853057","name":"Lookalike (US, 4\u0025) - Beauty-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-08-30T11:14:59-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"4000","daily_budget":"4000","lifetime_budget":"0"},{"id":"6057331314370","account_id":"861827983860489","campaign_id":"6057330925170","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-30T11:14:57-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"16ffa5a87c392517521332dcbcd4fdbd","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-30T11:14:57-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116853057","name":"Lookalike (US, 4\u0025) - Beauty-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-08-30T23:04:54-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"143","daily_budget":"1000","lifetime_budget":"0"},{"id":"6057271044770","account_id":"861827983860489","campaign_id":"6056535031970","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-29T15:06:33-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"245a35d22e9e6c16ca4b77984a2a4cfa","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"PURCHASE","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-29T15:06:33-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116697057","name":"Lookalike (US, 4\u0025) - Jewelry-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home","recent"]},"locales":[24,6],"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["instagramstream","mobileexternal","mobilefeed"]},"updated_time":"2016-08-29T15:06:33-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"4000","daily_budget":"4000","lifetime_budget":"0"},{"id":"6057261793170","account_id":"861827983860489","campaign_id":"6056934849770","billing_event":"IMPRESSIONS","configured_status":"ACTIVE","created_time":"2016-08-29T11:31:34-0700","effective_status":"ACTIVE","frequency_cap_reset_period":0,"is_autobid":true,"lifetime_imps":0,"name":"a32846d450fe813b5aa6364a72b11a45 - refuel4","optimization_goal":"OFFSITE_CONVERSIONS","promoted_object":{"application_id":"295802707128640","custom_event_type":"ACHIEVEMENT_UNLOCKED","object_store_url":"http:\/\/play.google.com\/store\/apps\/details?id=com.tophatter"},"rtb_flag":false,"start_time":"2016-08-29T11:31:34-0700","targeting":{"age_max":65,"age_min":18,"app_install_state":"not_installed","excluded_custom_audiences":[{"id":"6068994792257","name":"All-Users-2016-08-30"}],"custom_audiences":[{"id":"6066116697057","name":"Lookalike (US, 4\u0025) - Jewelry-Bidders-2016-06-28"}],"genders":[2],"geo_locations":{"countries":["US"],"location_types":["home"]},"user_device":["Android_Smartphone","Android_Tablet"],"user_os":["Android_ver_4.0_and_above"],"page_types":["mobileexternal","mobilefeed"]},"updated_time":"2016-09-04T19:15:03-0700","use_new_app_click":false,"pacing_type":["standard"],"budget_remaining":"533","daily_budget":"4000","lifetime_budget":"0"}]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"data":[{"id":"6057330925170","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-30T11:06:36-0700","effective_status":"ACTIVE","name":"2016-08-30|android|ACHIEVEMENT_UNLOCKED|CATEGORY|Beauty","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-30T11:14:57-0700","updated_time":"2016-08-30T11:06:36-0700"},{"id":"6057330783570","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-30T11:04:22-0700","effective_status":"ACTIVE","name":"2016-08-30|android|ACHIEVEMENT_UNLOCKED|CATEGORY|Beauty","objective":"MOBILE_APP_INSTALLS","start_time":"1969-12-31T15:59:59-0800","updated_time":"2016-08-30T11:04:22-0700"},{"id":"6057330767570","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-30T11:04:06-0700","effective_status":"ACTIVE","name":"2016-08-30|android|COMPLETE_REGISTRATION|CATEGORY|Beauty","objective":"MOBILE_APP_INSTALLS","start_time":"1969-12-31T15:59:59-0800","updated_time":"2016-08-30T11:04:06-0700"},{"id":"6056934849770","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-24T13:32:20-0700","effective_status":"ACTIVE","name":"2016-08-24|android|ACHIEVEMENT_UNLOCKED|CATEGORY|Home","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-24T14:00:23-0700","updated_time":"2016-08-24T13:32:20-0700"},{"id":"6056934573170","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-24T13:29:50-0700","effective_status":"ACTIVE","name":"2016-08-24|android|ACHIEVEMENT_UNLOCKED|CATEGORY|Other","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-24T13:32:04-0700","updated_time":"2016-08-24T13:29:50-0700"},{"id":"6056535031970","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-19T11:43:37-0700","effective_status":"ACTIVE","name":"2016-08-19|android|PURCHASE|CATEGORY|Jewelry","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-19T12:09:35-0700","updated_time":"2016-08-19T11:43:37-0700"},{"id":"6056276103370","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-16T13:56:31-0700","effective_status":"ACTIVE","name":"2016-08-16|android|ACHIEVEMENT_UNLOCKED|CATEGORY|Apparel","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-16T14:01:18-0700","updated_time":"2016-08-16T13:56:31-0700"},{"id":"6056197784370","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-15T13:19:20-0700","effective_status":"ACTIVE","name":"2016-08-15|android|PURCHASE|CATEGORY|Jewelry","objective":"MOBILE_APP_INSTALLS","start_time":"1969-12-31T15:59:59-0800","updated_time":"2016-08-15T13:19:20-0700"},{"id":"6056189814370","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-15T10:55:36-0700","effective_status":"ACTIVE","name":"2016-08-15|android|ACHIEVEMENT_UNLOCKED|CATEGORY|Jewelry","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-16T14:49:07-0700","updated_time":"2016-08-15T10:55:36-0700"},{"id":"6055712869370","account_id":"861827983860489","buying_type":"AUCTION","can_use_spend_cap":true,"configured_status":"ACTIVE","created_time":"2016-08-09T14:42:23-0700","effective_status":"ACTIVE","name":"2016-08-09|android|CATEGORY|Jewelry","objective":"MOBILE_APP_INSTALLS","start_time":"2016-08-09T14:45:05-0700","updated_time":"2016-08-09T14:42:23-0700"}]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"data":[{"id":"act_1132789356764349","account_id":"1132789356764349","account_status":1,"age":2.0061458333333,"created_time":"2016-08-31T15:14:23-0700","currency":"USD","name":"ReFuel4"},{"id":"act_1115226431853975","account_id":"1115226431853975","account_status":1,"age":25.147824074074,"created_time":"2016-08-10T17:27:49-0700","currency":"USD","name":"Ruby"},{"id":"act_953255011384452","account_id":"953255011384452","account_status":1,"age":315.86306712963,"created_time":"2015-10-26T09:23:16-0700","currency":"USD","name":"Testing"},{"id":"act_1051938118182807","account_id":"1051938118182807","account_status":1,"age":130.98862268519,"created_time":"2016-04-28T17:32:07-0700","currency":"USD","name":"Web"},{"id":"act_10152335766987003","account_id":"10152335766987003","account_status":1,"age":235.80065972222,"created_time":"2014-10-24T14:38:31-0700","currency":"USD","name":"Chris Estreich"},{"id":"act_861827983860489","account_id":"861827983860489","account_status":1,"age":512.10542824074,"created_time":"2015-04-09T16:54:58-0700","currency":"USD","name":"Android"},{"id":"act_39788579","account_id":"39788579","account_status":1,"age":2742.1572916667,"created_time":"2009-03-05T15:04:59-0800","currency":"USD","name":"iOS"}],"paging":{"cursors":{"before":"MjM4NDI1MDgwMDQ5ODA2OTgZD","after":"NjAwMjI0ODMyNTg5NQZDZD"}}}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'sinatra/base'
|
2
|
+
|
3
|
+
class RackFacebook < Sinatra::Base
|
4
|
+
|
5
|
+
get '/v2.6/:object_id' do
|
6
|
+
json_response 200, "#{params['object_id']}.json"
|
7
|
+
end
|
8
|
+
|
9
|
+
get '/v2.6/:object_id/:edge' do
|
10
|
+
json_response 200, "#{params['object_id']}/#{params['edge']}.json"
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def json_response(response_code, file_name)
|
16
|
+
content_type :json
|
17
|
+
status response_code
|
18
|
+
filename = File.dirname(__FILE__) + '/fixtures/' + file_name
|
19
|
+
File.open(filename, 'rb').read
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: facebook_ads
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.5
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Chris Estreich
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activesupport
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: httmultiparty
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: hashie
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.4'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.4'
|
55
|
+
description: This gem allows to easily manage your Facebook ads via Facebook's Marketing
|
56
|
+
API in ruby.
|
57
|
+
email: cestreich@gmail.com
|
58
|
+
executables:
|
59
|
+
- console
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files:
|
62
|
+
- README.markdown
|
63
|
+
files:
|
64
|
+
- ".gitignore"
|
65
|
+
- ".travis.yml"
|
66
|
+
- Gemfile
|
67
|
+
- Gemfile.lock
|
68
|
+
- README.markdown
|
69
|
+
- bin/console
|
70
|
+
- facebook_ads.gemspec
|
71
|
+
- lib/facebook_ads.rb
|
72
|
+
- lib/facebook_ads/ad.rb
|
73
|
+
- lib/facebook_ads/ad_account.rb
|
74
|
+
- lib/facebook_ads/ad_campaign.rb
|
75
|
+
- lib/facebook_ads/ad_creative.rb
|
76
|
+
- lib/facebook_ads/ad_image.rb
|
77
|
+
- lib/facebook_ads/ad_insight.rb
|
78
|
+
- lib/facebook_ads/ad_set.rb
|
79
|
+
- lib/facebook_ads/ad_targeting.rb
|
80
|
+
- lib/facebook_ads/base.rb
|
81
|
+
- spec/ad_account_spec.rb
|
82
|
+
- spec/ad_campaign_spec.rb
|
83
|
+
- spec/ad_creative_spec.rb
|
84
|
+
- spec/ad_image_spec.rb
|
85
|
+
- spec/ad_insight_spec.rb
|
86
|
+
- spec/ad_set_spec.rb
|
87
|
+
- spec/ad_spec.rb
|
88
|
+
- spec/ad_targeting_spec.rb
|
89
|
+
- spec/spec_helper.rb
|
90
|
+
- spec/support/fixtures.sh
|
91
|
+
- spec/support/fixtures/6057330925170.json
|
92
|
+
- spec/support/fixtures/6057810634370.json
|
93
|
+
- spec/support/fixtures/6057810946970.json
|
94
|
+
- spec/support/fixtures/6057824295570.json
|
95
|
+
- spec/support/fixtures/act_861827983860489.json
|
96
|
+
- spec/support/fixtures/act_861827983860489/adcreatives.json
|
97
|
+
- spec/support/fixtures/act_861827983860489/adimages.json
|
98
|
+
- spec/support/fixtures/act_861827983860489/ads.json
|
99
|
+
- spec/support/fixtures/act_861827983860489/adsets.json
|
100
|
+
- spec/support/fixtures/act_861827983860489/campaigns.json
|
101
|
+
- spec/support/fixtures/me/adaccounts.json
|
102
|
+
- spec/support/rack_facebook.rb
|
103
|
+
homepage: https://github.com/cte/facebook-ads-sdk-ruby
|
104
|
+
licenses:
|
105
|
+
- MIT
|
106
|
+
metadata: {}
|
107
|
+
post_install_message:
|
108
|
+
rdoc_options: []
|
109
|
+
require_paths:
|
110
|
+
- lib
|
111
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '2.0'
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
requirements: []
|
122
|
+
rubyforge_project:
|
123
|
+
rubygems_version: 2.4.8
|
124
|
+
signing_key:
|
125
|
+
specification_version: 4
|
126
|
+
summary: Facebook Marketing API SDK for Ruby.
|
127
|
+
test_files: []
|