Get Mailchimp list of unsubscribed users for the last month from API - mailchimp-api-v3.0

I want to receive the list of unsubscribed users from Mailchimp mailing list from Marketing API. I use this endpoint:
https://{{dc}}.api.mailchimp.com/3.0/lists/{{list_id}}/activity
but it returns only the count of subscribed/unsubscribed users. I want also to retrieve email addresses of all unsubscribed users.
Endpoints with campaigns reports doesn't seems to retrieve such a data too.
Is this possible? Is there any other endpoint that can return my demands?
Also it would be helpful if the results will be trimmed by the date - in my case last month.
Thanks for help.

OK I have figured it out. It was this endpoint:
https://{{dc}}.api.mailchimp.com/3.0//lists/{list_id}/members?status=unsubscribed&since_last_changed={{ISO_DATE}}

Related

List of all users who subscribed for Laravel Cashier in given date range

There are many functions in Laravel Cashier to get a lot of subscription information for a particular user. What if I need to get the list of all users who have subscribed in a given date range or who have cancelled in a given date range.
User::subscription()->where doesn't work
You can check subscriptions with the method subscribed('packageName'). Non tested I should be something like
User::where('subscription', User::subscribed('packageName')->between('created_at', [$start, $end])->get()

Office 365 Group Calendar: Invite Group with categories

I am using the Graph API to create an event in a group calendar and I invite another group.
Group A creates Event E and invites Group B.
In the POST request, I will set categories which are correctly shown for Group A.
But using a GET request to get the meeting that arrived at Group B the categories are gone in the JSON response.
Yes, categories are not synchrnoized between groups, but I would assume that when sending a meeting request to a group, the categories should still get send?
Please go ahead and raise a feature request to synchronize categories between groups here https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests so that the corresponding team can look into the possibility of picking it up for implementation in the future.

Mailchimp API - Method to get list of campaigns per user

I am using the Mailchimp API to collect info about list members (per email), and campaigns. However, I am not seeing a method to collect a list of campaigns that were sent to a specific email/list member.
Am I missing something?
First get list of all campains. And in loop of campains, and check if user exists in list. mailchimp provide api ti check if user contains in list.

how do I get calendar_id from Google Calendar API

I know you can get it on the settings page.
I have multiple calendars on a single account.
I can get the names back with
service.list_calendar_lists(page_token: page_token)
but how do I can the calendar ids associated with the names of the calendars
The structure that's returned from service.list_calendar_lists is a JSON that has an entry items
items is an array of calendar list items, and each array element includes id which is what you're asking for.
So something like
array_of_ids = service.list_calendar_lists(page_token: page_token)['items']map{|i| i['id']}
You can use CalendarList() with a GET request as shown in the Google Calendar API here. I tested this by retrieving my own calendar id by passing in the "primary" keyword as described in the documentation linked above.

Group ID for "All Company" Group in Yammer

I'm using the Yammer REST API to fetch data about messages posted in our Yammer network.
I can get messages from any group by passing the group ID.
But I don't know the group ID for the All Company group.
How can I find the group ID for the All Company group?
Use https://www.yammer.com/api/v1/messages/general.json.
You can see the other built-in feed type endpoints such as my_feed and private here: http://developer.yammer.com/restapi/#rest-messages
Yammer API POST call with parameter group_id allows posting message to a group, but not to AllCompany.
Same POST call with parameter feed_id allows posting message to a group and to AllCompany group (feed).
Use feed_id instead of group_id and all as id.
first get all the groups
using this API
https://www.yammer.com/api/v1/groups.json
in that group array check out the group full name. and you can use id of that array item. that will be your group id.
Use https://www.yammer.com/api/v1/messages.json.
This will give All public messages in the user’s (whose access token is being used to make the API call henceforth referred to as current user) Yammer network. Corresponds to “All” conversations in the Yammer web interface.
also refer answer from by #mleroy in earlier message.
use "all" as feed id for All company group.
I know this post is a bit old but it might help someone.
On every group page of Yammer, there is a section called Access Options on the right had side.
Click on the link "Embed this group in your side". It will give you JS code for the group which will include Feed ID as well.
Using this api you can able access all messages
https://www.yammer.com/api/v1/messages.json
from the response json you can see the group id of all message groups.You can notice that 'group_created_id' is null for all company group.
I dont think that group id for all company is 'All',because that parameter is an integer,So just pass null.
Its a bit weird, but I found out that the group_created_id field is null when the message belongs to "All Company"
So you can use messages.json as mentioned before to get all public messages,
or if you want to search for messages by groups, you can get a list of groups ids and use :
https://www.yammer.com/api/v1/messages/in_group/{group-id}.json
and after that use messages.json, and go over the messages and search for those who has the field group_created_id set as null
Hope it will help someone someday :P
I had a similar requirement of embedding Yammer All company feed for which I needed the Feed ID and this worked for me-
feedType: "general",
feedId: "all"
Hope this helps!

Resources