Gmail messages are clipped when body is exceeding 102kb. In the UI one can get the entire message with a link in the bottom of the page, however the Gmail API does not display it.
Following the documentation, I did not manage to find any solution whatever the format chosen. The body is well printed but not entire (and no link to read the rest). Am I missing something ?
Short answer : listing messages under threads renders messages with no body limit :)
The documentation does not mention this difference but tried and approved.
Related
I want to make a bot to search through a channel and find a random message by a user. To do that, I need to read past messages. I've looked in the documentation and all it says is GET /channels/{channel.id}/messages.
I'm asking: How could I return the contents of a message and the author of the message (if possible).
If you're using discord.py, take a look at channel.history
I'd like to count the messages of a specific conversation in Telegram. There should be a way using Telegram Desktop and using the debugmode to save the log information (see https://telegram.wiki/desktop/tdesktopcountingmessages). Unfortunately the count-tag is missing in most cases. Any other ideas?
The easiest way to do this currently is by searching for '+' in the conversation of interest. This will retrieve all messages and you can see the count from the search results. See attached image for an example. This conversation contains 32 messages in total.
I've noticed that the messages.json endpoint doesn't seem to return all the data needed to show the likes per message.
Specifically, two things seem to be happening:
List of likers only has info on 3 users.
The avatar images for the likers is not always available when looking up through the "references" array.
We're using the JS SDK for our integration.
Thanks
https://api.yammer.com/api/v1/users/liked_message/:Message_id.json should return user properties of LIKERS, a count of all LIKERS should give you the total LIKES per message.
In practice, you'd need to call the messages endpoint, get the message id, then pass it into users/liked_message/:Message_id.json programatically.
See here for further details - https://developer.yammer.com/docs/usersliked_messagemessage_idjson
A web application sends an email on behalf of a UserA to UserB, using the new Gmail API (Users.messages: send).
The synchronous response contains threadId, messageId which are stored in the database.
We then query the history API for any changes in user's inbox (Users.history: list).
Is there an efficient way to get all the updates since last sync (new replies, read/unread changes)?
One implementation that we tried was to filter the history API results through a custom label. Unfortunately, we noticed that once a thread/message is tagged with a specific label any subsequent responses are not labeled automatically and new replies are not included in the history API response.
A second approach was to query threads using gmail advanced search for a particular label and date (e.g. after:2014/08/29 label:MY_LABEL). The problem was that gmail does not return threads that were created before 2014/08/29 but had a reply on that date.
Any scalable suggestions would be greatly appreciated.
Not sure I understand here, users.history.list was made exactly for this. Given a previous historyId, you can then call history.list(previousHistoryid), iterate through the results to find all the message Ids that have been updated since the previous historyId. Then call messages.get() on all of those--for any messages you already knew about you can just call format=MINIMAL (to see label updates), and for new messages you can use a different format to get the message content if you need it.
Yammer has a feature that allows you to "praise" someone. However, looking at the data that is returned from a "praise" message, it does not appear there is any distinguishing flag or attribute that marks it as a "praise" message. Inside the message, there is an attachment with "type=praise" and then "praised-user-id".
What is the best way to pull this information out of Yammer?
Unfortunately there is no way to pull all praise messages from Yammer at this time. It's worth joining the Yammer Developer Network and tracking updates to the API, but this is not something that I'd expect to see in the near future.
Thinking slightly on a tangent, try using the 'search' API looking for the word 'praised' as this is always in the body. This should return only results containing praised.