Closed ChrisHardie closed 2 years ago
Hi @ChrisHardie, thank you for reporting this. For API v2 the response format defaults to JSOn, see https://github.com/atymic/twitter/blob/main/src/Concern/ApiV2Behavior.php#L24
I will make an adjustment in the readme to reflect this.
I noticed today that this call:
Twitter::forApiV2()->getUserByUsername($username);
was returning a JSON string. Reading the docs, I see:
I tried passing
'format' => 'object'
but that didn't work. Then I tried'response_format' => 'object'
and that worked.Could you clarify what the expected default return format is? Should I submit a PR to clarify the param key name in the docs? Thanks!