-
I didn't want to enter this as an issue because I might be missing something. The endpoint /users/{userId}/meetings (corresponding method = Meetings.GetAllAsync) returns an array of meetings as the records. I'm curious why the StartTime and Duration properties were omitted from the Meeting class. I saw these in the PastMeeting class but there doesn't appear to be any methods that return that object unless I'm missing something which I think I would have expected in the PastMeetings.GetAsync method. I can also see these properties within the DashboardMetrics for meetings, but unfortunately am not able to use that feature because I am only using a Pro account. Any guidance here would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The abstract For example, What this all means is that you must cast meetings to their concrete class in order to get access to properties that are specific to this type of meeting. You must do this whenever you fetch a single meeting (such as when you invoke the PastMeetings.GetAsync method, for example) or when you retrieve a list of meetings (such as when you invoke Meetings.GetAllAsync, for example). For a code sample showing you how to this when retrieving a single meeting, please refer to this question. As for casting a list of records to their respective concrete class, here's how I do it with the help of the very handy // Retrieve the first 100 meetings
var allMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Scheduled, 100, null, cancellationToken).ConfigureAwait(false);
// Cast the meetings to their concrete class
var scheduledMeetings = allMeetings.Records.OfType<ScheduledMeeting>();
var instantMeetings = allMeetings.Records.OfType<InstantMeeting>();
var recurringMeetings = allMeetings.Records.OfType<RecurringMeeting>(); Let me know if this answers you question. |
Beta Was this translation helpful? Give feedback.
-
IMPORTANT UPDATE ZoomNet version 0.44.0 will be released shortly and will introduce a breaking change that will render obsolete the C# code snippet I previously offered. The type of the data returned by the It was brought to my attention (see here) that when retrieving multiple meetings, the Zoom API returns summary information about the meetings and it does NOT include all information and therefore it does not make sense for ZoomNet to return Here is a code snippet demonstrating how to display the start time for all meetings: // Retrieve the first 100 meetings
var allMeetings = await client.Meetings.GetAllAsync(userId, MeetingListType.Scheduled, 100, null, cancellationToken).ConfigureAwait(false);
// Display the start time for each meeting
foreach (var meeting in paginatedScheduledMeetings.Records)
{
Debug.WriteLine($"Start date/time for meeting {meeting.Id} is {meeting.StartTime}");
} |
Beta Was this translation helpful? Give feedback.
The abstract
Meeting
class contains properties that apply to all meeting types; any property that applies to only a specific type of meeting will be available on the specific meeting type class (i.e.:RecurringMeeting
,InstantMeeting
orScheduledMeeting
).For example,
Password
andCreatedOn
are two properties that apply to all meeting types which explains why they are available on theMeeting
class butRecurrenceInfo
only applies to recurring meetings which explains why it's available on theRecurringMeeting
class and not on theMeeting
class. All this to say that the two properties you mentioned are not available on the abstractMeeting
class because they do not apply to all types of mee…