What purpose does `Tweet.state` hold?
srfsh opened this issue · comments
Hey, there. Firstly, many thanks for the great work you have done. It is invaluable to many of us, I can assure you. :)
I was looking at the docs regarding what is presented over to us and I encountered this field called state
. I wasn't quite sure what it was, but it sure was related to the views count somehow. I took a quest online to find out what that field might be used for and if it is any use to me, but my inquiry resulted with no useful information at hand. I tried to have a look at the the "raw" response1 from Twitter (using pbd), but that didn't bear any useful result either.
The only thing I know is that the value "EnabledWithCount"
is somehow involved with this field, but as I wasn't able to inspect the other possible values of that field, I can't quite conclude something sensible. It would be greatly appreciated if you could offer your insights on this, and possibly, update the docs accordingly.
Many thanks, cheers!
Footnotes
-
"views": {
"count": "",
"state": "EnabledWithCount"
}, ↩
It seems that "state" indicates whether the view count of a tweet is valid. To make this clearer I plan to rename the field from "state" to "view_count_state" in the next update.
Thank you for your report.
I realized something quite interesting while performing some experiments. It appears that, when state
is "Enabled"
(another value I've just discovered), the view_count
is None
. I discovered this while iterating over some posts. This is something to note about.
"state" indicates whether the view count of a tweet is valid.
What does "valid" refer to here? Because if the value is "Enabled"
, then it seems that the view_count
is not available somehow.