Microsoft Graph版本1.8。+何时可以使用?创建在线会议时遇到问题

时间:2020-07-14 10:42:42

标签: microsoft-graph-api microsoft-graph-sdks microsoft-graph-teams microsoft-graph-calendar

在最新版本的Microsoft Graph Java SDK 1.7.1中,我无法在Event.java类中找到字段isOnlineMeeting和onlineMeetingProvider或枚举OnlineMeetingTypeProvider 这是我的代码:

IGraphServiceClient graphClient = GraphServiceClient.builder().authenticationProvider(authProvider ).buildClient();

    Event event = new Event();
    event.subject = "Let's go for lunch";
    ItemBody body = new ItemBody();
    body.contentType = BodyType.HTML;
    body.content = "Does next month work for you?";
    event.body = body;
    DateTimeTimeZone start = new DateTimeTimeZone();
    start.dateTime = "2020-07-15T12:00:00";
    start.timeZone = "Pacific Standard Time";
    event.start = start;
    DateTimeTimeZone end = new DateTimeTimeZone();
    end.dateTime = "2019-03-10T14:00:00";
    end.timeZone = "Pacific Standard Time";
    event.end = end;
    Location location = new Location();
    location.displayName = "Harry's Bar";
    event.location = location;
    LinkedList<Attendee> attendeesList = new LinkedList<Attendee>();
    Attendee attendees = new Attendee();
    EmailAddress emailAddress = new EmailAddress();
    emailAddress.address = "Jagriti.Pandey@mind-infotech.com";
    emailAddress.name = "Jagriti Pandey";
    attendees.emailAddress = emailAddress;
    attendees.type = AttendeeType.REQUIRED;
    attendeesList.add(attendees);
    event.attendees = attendeesList;
//---------------This is the line of code I am facing challenge.----
    event.isOnlineMeeting = true;
    event.onlineMeetingProvider = OnlineMeetingProviderType.TEAMS_FOR_BUSINESS;
  //--------------------***-----------------------------


    graphClient.me().calendars("AAMkAGViNDU9zAAAAAGtlAAA=").events()
//graphClient.me().drive();
    .buildRequest()
    .post(event);

}

0 个答案:

没有答案