facebook / facebook-python-business-sdk

Python SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
1.28k stars 631 forks source link

AdAccount class is missing method to get ad rules library #523

Closed fakeplant closed 5 years ago

fakeplant commented 5 years ago

There is a way to get_ad_rules_history or create_ad_rules_library but no way to get_ad_rules_library.

I'm looking to read all rules on an account, as mentioned in this documenation: https://developers.facebook.com/docs/marketing-api/ad-rules-getting-started/#api-calls

example:

curl -G   \
-d 'fields=name,evaluation_spec,execution_spec,status'   \
-d 'access_token=<ACCESS_TOKEN>'   \
https://graph.facebook.com/<VERSION>/<AD_ACCOUNT_ID>/adrules_library
jingping2015 commented 5 years ago

We already add this function https://github.com/facebook/facebook-python-business-sdk/blob/456ebfa8389f1968fe9f511dd058da7b21a4de51/facebook_business/adobjects/adaccount.py#L1610 Thanks for reporting this bug.