Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client.Meetings.GetAsync does not return all meeting information #45

Closed
xantari opened this issue Aug 16, 2020 · 2 comments
Closed

client.Meetings.GetAsync does not return all meeting information #45

xantari opened this issue Aug 16, 2020 · 2 comments
Assignees
Labels
question Someone is asking a question

Comments

@xantari
Copy link
Contributor

xantari commented Aug 16, 2020

When you get a meeting using GetAsync, it doesn't return the StartTime data of the meeting.

It seems that you need to return the proper type of meeting depending on the type of meeting.

In this case it should be ScheduledMeeting when the type is scheduled.

@Jericho Jericho self-assigned this Aug 17, 2020
@Jericho Jericho added the question Someone is asking a question label Aug 17, 2020
@Jericho
Copy link
Owner

Jericho commented Aug 17, 2020

The Meeting.GetAsync method is already designed to return a InstantMeeting, ScheduledMeeting or RecurringMeeting depending on the type of the meeting you are retrieving and all relevant properties should be populated. My guess is that you are simply not casting the retrieved meeting to the ScheduledMeeting class which would explain why you are not seeing the StartTime property; but this is just a guess on my part.

Here is the code sample I used to retrieve a scheduled meeting and to validate that the start date is populated as expected:

var start = DateTime.UtcNow.AddMonths(1);
var duration = 30;
var settings = new MeetingSettings()
{
  ApprovalType = MeetingApprovalType.Manual
};
var trackingFields = new Dictionary<string, string>()
{
  { "field1", "value1"},
  { "field2", "value2"}
};

var newScheduledMeeting = await client.Meetings.CreateScheduledMeetingAsync(userId, "ZoomNet Integration Testing: scheduled meeting", "The agenda", start, duration, "p@ss!w0rd", settings, trackingFields, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"Scheduled meeting {newScheduledMeeting.Id} created").ConfigureAwait(false);

var scheduledMeeting = (ScheduledMeeting)await client.Meetings.GetAsync(newScheduledMeeting.Id, null, cancellationToken).ConfigureAwait(false);
await log.WriteLineAsync($"The meeting is scheduled to start on {scheduledMeeting.StartTime.ToLongDateString()} at {scheduledMeeting.StartTime.ToLongTimeString()}").ConfigureAwait(false);

Here is what gets displayed in the console:

image

@xantari
Copy link
Contributor Author

xantari commented Aug 17, 2020

Ahh ok. Closing.

@xantari xantari closed this as completed Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Someone is asking a question
Projects
None yet
Development

No branches or pull requests

2 participants