bear / python-twitter

A Python wrapper around the Twitter API.
Apache License 2.0
3.41k stars 957 forks source link

GetSearch include_entities documentation is confusing #652

Open jlevers opened 4 years ago

jlevers commented 4 years ago

The documentation for the include_entities kwarg on GetSearch (here) says that each Status object will have an entities node with metadata like hashtags, urls, etc. That led me to believe that I could access (for example) the hashtags data on a Status object s like so:

s.entities.hashtags

In practice, there was no entities property on Status objects, regardless of whether or not I passed include_entities=True. After stepping through the code, I realized that passing the include_entities kwarg added the hashtags, urls, etc, as direct attributes on the Status object. In other words, those pieces of metadata are accessible via s.hashtags, s.urls, etc, rather than via s.entities.hashtags, s.entities.urls, and so on.

If I'm misunderstanding something and this is totally off base, please let me know. Thanks!