extwitter icon indicating copy to clipboard operation
extwitter copied to clipboard

Email field missing from ExTwitter.Model.User

Open JosephHalter opened this issue 4 years ago • 1 comments

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?

JosephHalter avatar Mar 16 '20 10:03 JosephHalter

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.

avergin avatar Sep 12 '22 08:09 avergin