extwitter
extwitter copied to clipboard
Email field missing from ExTwitter.Model.User
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?
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.