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

Setting precision fails, outdated docs? #28

Open
GedRap opened this issue Feb 17, 2016 · 2 comments
Open

Setting precision fails, outdated docs? #28

GedRap opened this issue Feb 17, 2016 · 2 comments

Comments

@GedRap
Copy link

GedRap commented Feb 17, 2016

Accordign to this https://github.com/debrouwere/google-analytics/blob/master/googleanalytics/query.py#L614 we can set precision using

query.range('2014-01-01', '2014-01-31', precision='FASTER')

However, it seems to be broken:

TypeError: range() got an unexpected keyword argument 'precision'

range method definition:

range(self, start=None, stop=None, months=0, days=0)

This seems to be working though:

query.precision('HIGHER_PRECISION')

Is it the correct way to set the precision and the docs are simply out of date? If so, I can create a PR fixing this documentation issue :)

@GedRap GedRap changed the title Setting precision Setting precision fails, outdated docs? Feb 17, 2016
@debrouwere
Copy link
Owner

You're right, the documentation seems to be out of date. the range method used to have a lot of different keyword arguments for various things, but I figured it was better to have it only do what it says on the tin: control the reporting range.

Note that I prefer to use the hourly, daily, weekly, monthly and yearly methods myself to be more explicit about the granularity of the report. These will then call range for you.

@debrouwere
Copy link
Owner

Code here:

@utils.immutable

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

No branches or pull requests

2 participants