Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in chart calls which break down by specific tags #69

Open
pwsiegel opened this issue Nov 16, 2018 · 0 comments
Open

Bug in chart calls which break down by specific tags #69

pwsiegel opened this issue Nov 16, 2018 · 0 comments

Comments

@pwsiegel
Copy link
Contributor

pwsiegel commented Nov 16, 2018

Consider a call of the form

BWQueries().get_chart(name='My Query', startDate='YYYY-MM-DD', x_axis='days', y_axis='volume', breakdown_by='tags', dim2Args=['first_tag, 'second_tag'])

The SDK makes a call which looks like:

https://api.brandwatch.com/projects/<project id>/data/volume/days/tags?queryId=<query id>&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&dim2Args=<tag id>&dim2Args=<tag id>&access_token=<token>

But this returns a response with all data and values fields empty. The reason is that the API expects tag names instead of tag id's; the following call gives the desired result:

https://api.brandwatch.com/projects/<project id>/data/volume/days/tags?queryId=<query id>&startDate=YYYY-MM-DD&endDate=YYYY-MM-DD&dim2Args=first_tag&dim2Args=second_tag&access_token=<token>

I think the same issue came up when formulating get_mentions requests with tag filters; for some mysterious reason the API expects category ID's but tag names. 🤷‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant