Skip to content
New issue

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

Email field missing from ExTwitter.Model.User #125

Open
JosephHalter opened this issue Mar 16, 2020 · 1 comment
Open

Email field missing from ExTwitter.Model.User #125

JosephHalter opened this issue Mar 16, 2020 · 1 comment

Comments

@JosephHalter
Copy link

JosephHalter commented Mar 16, 2020

Updating extwitter from 0.9.6 to 0.12.0, I found out that ExTwitter.Model.User no longer has an email field, I'm already calling ExTwitter.verify_credentials(include_email: true) so the user email field is returned but ExTwitter.Model.User doesn't has an email field so I don't know how to fetch it.

I was surprised to discover no information about that issue in the changelogs for extwitter 0.10.0 and no indication on how to get around it. What's the recommended workaround apart from staying on extwitter 0.9.6?

@avergin
Copy link

avergin commented Sep 12, 2022

You can get it from the raw_data attribute, which dumps all the json response from the Twitter API.

user = ExTwitter.verify_credentials(include_email: true)
user.raw_data.email

will return the email.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants