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
Impressions returned as unicode string, not int #71
Comments
Hey Patrick! Looks like this is probably just a documentation error. The correct return type should be a numeric string (or just string). I'll update the docs. Thanks for flagging this! Evan |
Thanks for getting back to me so quickly - out of curiosity, why would impressions (a numerical statistic) be returned as a string while every other numerical statistic is returned as an integer or a float? |
We usually return numeric values that can get very large (ids typically) as strings to avoid possible integer overflow issues. It makes it safer to ingest for languages that care about int/bigint. Since this value is typically only used for display (rather than operations), it makes sense to be safe and return a string. |
That does make sense, thank you for clarifying so quickly. I have one last question for you regarding the SDK - what is the status on making asynchronous calls directly from the SDK? I saw it was in development in January, and I'm wondering if it's available yet. Thank you again, |
Hey @phuston, it's probably the most requested feature for the SDK and we're working on trying to get it released for 2.4 |
I understand if you can't divulge this information, but do you have Thanks, Patrick On Fri, Jun 19, 2015, 4:49 PM Evan Chen notifications@github.com wrote:
|
I just picked up the task for myself and will try and get it out for you well before then. Feel free to ping me mid next week if you don't see progress. :) Evan |
Wow! I really appreciate your help in navigating my way through migrating Best, On Fri, Jun 19, 2015, 5:27 PM Evan Chen notifications@github.com wrote:
|
@ebzlo, I figured I'd check in again to see how the implementation of the asynchronous calls is coming, and if you have a better feel for an ETA. -Patrick |
In the Insights documentation, the stated return type for the Impressions general field is said to be of type Int:
When I am making a get_insight call on an AdAccount object, however, the Impressions field is returned as a unicode string. Here's an example call:
What is returned looks like this, and calling type() on the value for "impressions" returns unicode:
Am I missing something here, or are impressions just incorrectly being returned as a unicode string?
The text was updated successfully, but these errors were encountered: