Get meetings by organizer or attendee email ID using GoToMeeting SDK

135 Views Asked by At

I am using .Net sdk of GoToMeeting.

I want to get meetings organized by particular organizer. I have tried using MeetingsApi.getHistoryMeetings but it does not return me OrganizerKey so I can not filter on particular Organizer.

Is there any way to get meeting(s) based on organizer or even by Attendee email ID by using .Net SDK?

1

There are 1 best solutions below

2
Balaji On

What is the problem you are facing with MeetingsApi.getHistoryMeetings();?

why you need to filter the method, the MeetingsApi.getHistoryMeetings(accessToken,true,date1,date2); itself filtered for a particular user right?

Look on the arguments we are passing in the method?

  1. accessToken - This token is generated as a result of successful authentication of a gotoproduct account. (In API call it can be generated using directlogin orOauth method.
  2. true - this represents whether the meetings returned are past or not.
  3. date1 - Start date range for the meetings.
  4. date2 - End date range for the meetings.

below code is the sample for getting history meetings.

DateTime sdt=DateTime.Parse("07/01/2015");
DateTime edt=DateTime.Parse("07/30/2015");
List<MeetingHistory> historymeets = new System.Collections.Generic.List<MeetingHistory>();
historymeets=meeting.getHistoryMeetings(accesToken, true, sdt, edt);
foreach (var item in historymeets)
{
  Console.WriteLine(item.subject);
}

try it out... The above code will store the meetings in historymeets collection object.

You can do the filter function in that collection object.

UPDATE :

List<MeetingHistory> historymeets = new System.Collections.Generic.List<MeetingHistory>();
historymeets=meeting.getHistoryMeetings(accesToken, true, sdt, edt);
List<AttendeeByMeeting> lstAttendee = new System.Collections.Generic.List<AttendeeByMeeting>();
foreach (var item in historymeets)
{
  Console.WriteLine(item.meetingId);
  lstAttendee=meeting.getAttendeesByMeetings(accesToken, item.meetingId);
  foreach (var itemattendee in lstAttendee)
  {
    Console.WriteLine(itemattendee.attendeeEmail);
  }
}

for comment - It is possible, but not directly because there is no api calls, which supports the meeting by attendee . the above code which i have written is for meeting by organizer . Now you have two options,

  1. get the getHistoryMeetings, now you got the meeting details right? , then get the attendees by meeting id using getAttendeesByMeetings(), filter the two different collection objects with join using LINQ. OR
  2. get the meetingdetails and attendees by executing two different fuinction calls, and store it in database or somewhere else, so that you can access it for doing the filter