- Calling `del object['key']` will correctly update the change history, thus removing the key as a parameter in API request.
- `CanArchive` mixin has been added which allows campaigns, ad sets, and ad groups to be archived by calling `remote_archive()`
- Error handling has been much improved
try:
account = AdAccount('invalid-account-id')
account.remote_read()
except FacebookRequestError, e:
print e.api_error_message()
print e.api_error_code()
Check the exceptions.FacebookRequestError object for more method calls!
- Fixed `activities` endpoints.
- You can now reference `EdgeIterator` objects as if they're arrays:
adgroups = account.get_ad_groups() returns EdgeIterator object
print adgroups[0]
print adgroups[1]
- Calling `remote_update()` will now return a correctly updated object without having to call `remote_read()` again. Note: This is optimistic-- we do not re-fetch the data.
adgroup = AdGroup(123123)
adgroup.remote_read(fields=['name'])
print adgroup['name'] Outputs "Hello World"
adgroup['name'] = 'Changed Name'
print adgroup.remote_update()
Output:
<AdGroup> {
"name": "Changed Name"
}
- `CustomAudience` fields are now all defined
- Examples for `CustomAudience` have been added.