geduldig / TwitterAPI

Minimal python wrapper for Twitter's REST and Streaming APIs
936 stars 263 forks source link

Add comment about hydrate_type == NONE side effect #203

Closed NeodymiumFerBore closed 2 years ago

NeodymiumFerBore commented 2 years ago

Related issue: #202

As described in the issue, hydrate_type=HydrateType.NONE in the TwitterAPI.request method does not return includes field at all (it's lost). By design, the _RestIterable object yielding a list (made of response['data']), it's not necessary to try to merge includes to data, as the hydration feature already does so.

So, this commit just adds a comment about this for documentation sake, and to avoid having to read the code to understand why includes vanishes from the responses.

This behavior is true for non-streaming queries only.