numberly / appnexus-client

:snake: General purpose Python client for the AppNexus API
https://appnexus-client.readthedocs.io
MIT License
39 stars 19 forks source link

Budget Splitter doesn't use query params #48

Open JPonte opened 4 years ago

JPonte commented 4 years ago

The budget splitter api requires a line_item_id but unlike the usual behaviour, it is not passed as a query parameter:

https://wiki.xandr.com/display/api/Splits+Service

It's https://api.appnexus.com/budget-splitter/LINE-ITEM-ID/splits instead of https://api.appnexus.com/budget-splitter?line_item_id=LINE-ITEM-ID

rambobinator commented 4 years ago

Hi,

Thanks for your feedback. A work-arround could be to use the client get method like the following snippet.

client.get("budget-splitter/{}/splits".format(id), raw=True)

There is also PR #36 that implement splits as an ALI class property, but we don't always need it that way. Feel free to suggest a better alternative.