Yammer API - how to get full list of likes using messages endpoint? - yammer

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

Related

How to get historical Slack call id's?

Is there a way to get historical call ID's from the Slack API?
I would like to use the slack calls.info API (https://api.slack.com/methods/calls.info) to get information on past Slack calls. But I cannot find a way to get the ID's of the calls. (The only way per the documentation is the data returned by the calls.add API
I can see evidence in Slack of my past calls with other users, but when I call conversations.history, I do not see any data for calls...just messages.
Unfortunately, there is no method that will return call ids retroactively.Something like calls.list would be helpful. Right now, I think your only option would be to store the ids when you call calls.addmoving forward so that you can then use them in future calls.info calls.

What is the default value of maxResults in contacts API call?

I've read the official document of Google Contacts API version 3.0.
(https://developers.google.com/contacts/v3/)
On the part of 'Retrieving all contacts' there is a note saying below:
The feed may not contain all of the user's contacts, because there's a default limit on the number of results returned. For more information, see the max-results query parameter in Retrieving contacts using query parameters.
I wonder that 'default limit' because I would like to refer to Google's standard for developing.
Is there anyone who knows the number of default limit?
The default max depends upon the API and the method itself. Some of the Youtube methods only return 50 for a max others return 500.
Unfortunately the Google contacts API is a very old API and not well documented. If you dont send a max-results with your request then you will get the default.
You can also send something really big like 100000 if it refuses it it should return an error stating its max.

Mailchimp api: retrieving poll results

Is there a way to get the members to a certain response of poll without the need to create segments?
I am sending mails and have a poll included (basically participating at an event).
Now I would like to easily collect the respondents for an event from various mails (announcement, invitation, reminder 1, reminder 2,..)
Currently I need to create segments for each response where I need to reference the campaigns individually. So whenever I send a campaign (email) I need to update all segments as there need to be a segment per question, which I would like to avaoid.
Hope thats clear enough.
I had a similar question and after a review of the mailchimp API docs, in particular the reports section I realized there was not a way to retrieve poll results.
After my review, I followed-up with mailchimp and they mentioned access to poll results via API is not available - detailed comments with image attached below:
MailChimp Response - Start
"To be completely honest and transparent, there currently wouldn't be a way of accessing the campaign poll result data directly through the report... With that being said, it would be possible to use the API to create segments based on poll response, then call those segments to view the number of responses for each option, as well as the specific subscribers who chose each individual option.
More info here: https://developer.mailchimp.com/documentation/mailchimp/reference/lists/segments/
MailChimp Response - End
As you can see, although accessing poll results via the API is not available, there is a work around using a method.
Good luck!

Efficient way of syncing Gmail Inbox messages using the new Gmail API?

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.

ESPN API, results of College Football teams not showing all teams

A question for the ESPN API team...
I'm using the ESPN API, and when I use the Teams API to pull a list of College Football teams:
I don't get a full list of all NCAA Football Teams
I can't tell what the reasoning of the teams that ARE listed is
(i.e. 1st result is id:2, 2nd result is id:5)
Is there a reason only some Teams show up? And for the teams that DO show up, what is the rhyme or reason to them being the ones that have been selected to show up?
Thanks for the help! I can add additional info or screenshots if needed at all-
If you set the limit to -1, you get all of the teams.
The teams API uses pagination based on the resultLimit, resultOffset and resultCount nodes in the API response. You can use the offset and limit GET parameters to get a larger, smaller result set as well as use them to make multiple requests in order to get all the teams in multiple requests.
For example: try setting limit to something larger than the default of 50.

Resources