Skip to content

Commit

Permalink
🚨🚨 Source Facebook Marketing: Add statuses filters (#32449)
Browse files Browse the repository at this point in the history
Co-authored-by: Anatolii Yatsuk <tolikyatsuk@gmail.com>
  • Loading branch information
iSINUS and tolik0 committed Feb 20, 2024
1 parent e7ab4f5 commit dd01ba3
Show file tree
Hide file tree
Showing 31 changed files with 1,507 additions and 436 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,41 @@ def config_with_wrong_account_fixture(config):


@pytest.fixture(scope="session", name="config_with_include_deleted")
def config_with_include_deleted_fixture(config):
new_config = {**config, "include_deleted": True}
def config_with_include_deleted(config):
new_config = {
**config,
"campaign_statuses": [
"ACTIVE",
"ARCHIVED",
"DELETED",
"IN_PROCESS",
"PAUSED",
"WITH_ISSUES",
],
"adset_statuses": [
"ACTIVE",
"ARCHIVED",
"CAMPAIGN_PAUSED",
"DELETED",
"IN_PROCESS",
"PAUSED",
"WITH_ISSUES",
],
"ad_statuses": [
"ACTIVE",
"ADSET_PAUSED",
"ARCHIVED",
"CAMPAIGN_PAUSED",
"DELETED",
"DISAPPROVED",
"IN_PROCESS",
"PAUSED",
"PENDING_BILLING_INFO",
"PENDING_REVIEW",
"PREAPPROVED",
"WITH_ISSUES",
],
}
new_config.pop("_limit", None)
new_config.pop("end_date", None)
return new_config

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"stream": {
"stream_state": {
"event_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "activities"
Expand All @@ -16,7 +16,7 @@
"stream": {
"stream_state": {
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": ["ARCHIVED"]
},
"stream_descriptor": {
"name": "campaigns"
Expand All @@ -28,7 +28,7 @@
"stream": {
"stream_state": {
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "images"
Expand All @@ -40,7 +40,7 @@
"stream": {
"stream_state": {
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "videos"
Expand All @@ -52,7 +52,7 @@
"stream": {
"stream_state": {
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ad_creatives"
Expand All @@ -64,7 +64,7 @@
"stream": {
"stream_state": {
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": ["ARCHIVED"]
},
"stream_descriptor": {
"name": "ad_sets"
Expand All @@ -76,7 +76,7 @@
"stream": {
"stream_state": {
"updated_time": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": ["ARCHIVED"]
},
"stream_descriptor": {
"name": "ads"
Expand All @@ -88,7 +88,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights"
Expand All @@ -100,7 +100,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_age_and_gender"
Expand All @@ -112,7 +112,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_country"
Expand All @@ -124,7 +124,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_dma"
Expand All @@ -136,7 +136,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_platform_and_device"
Expand All @@ -148,7 +148,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_region"
Expand All @@ -160,7 +160,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_type"
Expand All @@ -172,20 +172,19 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "custommy_custom_insights"
}
}
},

{
"type": "STREAM",
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_carousel_card"
Expand All @@ -197,7 +196,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_conversion_device"
Expand All @@ -209,7 +208,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_product_id"
Expand All @@ -221,7 +220,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_reaction"
Expand All @@ -233,7 +232,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_video_sound"
Expand All @@ -245,7 +244,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_action_video_type"
Expand All @@ -257,7 +256,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_delivery_device"
Expand All @@ -269,7 +268,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_delivery_platform"
Expand All @@ -281,7 +280,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_delivery_platform_and_device_platform"
Expand All @@ -293,7 +292,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_demographics_age"
Expand All @@ -305,7 +304,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_demographics_country"
Expand All @@ -317,7 +316,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_demographics_dma_region"
Expand All @@ -329,7 +328,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "ads_insights_demographics_gender"
Expand All @@ -341,7 +340,7 @@
"stream": {
"stream_state": {
"date_start": "2121-07-25T13:34:26Z",
"include_deleted": true
"filter_statuses": []
},
"stream_descriptor": {
"name": "customcustom_insight_stream"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"start_date": "2023-04-01T00:00:00Z",
"account_id": "account",
"access_token": "wrong_token",
"include_deleted": true
"access_token": "wrong_token"
}
Loading

0 comments on commit dd01ba3

Please sign in to comment.