We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I noticed today that this call:
Twitter::forApiV2()->getUserByUsername($username);
was returning a JSON string. Reading the docs, I see:
By default responses will be returned as objects. To change this, use the format option in the parameters you pass to any method.
I tried passing 'format' => 'object' but that didn't work. Then I tried 'response_format' => 'object' and that worked.
'format' => 'object'
'response_format' => 'object'
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!
The text was updated successfully, but these errors were encountered:
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.
Sorry, something went wrong.
fixes: #383
d459e04
b1804ce
reliq
No branches or pull requests
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!
The text was updated successfully, but these errors were encountered: