Closed MathieuDerelle closed 6 years ago
Not certain about this, but have you tried "variableName.message.id" without quotes?
Take a look at #242
It wasn't working even with this PR or that's what I thought:
By investigating a bit more, I've found out what's going on.
This gem is giving the message_id as an integer : 1520524314001511398
and the API mentionned above is given it as an hexadecimal string : 1519fcceb86793e6
1520524314001511398.to_s(16) == 1519fcceb86793e6 # => true
edit: so the search with message_id is now working
emails = @gmail.inbox.emails(message_id: 1520524314001511398)
do the search as message_id: integer_message_id.to_s(16) it will work
email.message.message_id.to_s
Is it possible to retrieve the message ID used in this API : https://developers.google.com/gmail/api/v1/reference/users/messages/get i.e.
https://www.googleapis.com/gmail/v1/users/{userId}/messages/{id}
Gmail::Message#uid or msg_id dont do the job
solution : the ID in the rest api is the haxedecimal representation of msg_id (i.e
msg_id.to_s(16)
)