【问题标题】:How to get list of today meetings from EWS using ews-javascript-api?如何使用 ews-javascript-api 从 EWS 获取今天的会议列表?
【发布时间】:2018-08-31 12:12:57
【问题描述】:

我有 MS Exchange 帐户的电子邮件/密码。

另外,我有时间表(今天)。

那么我怎样才能获得今天 MS EXchange 帐户的所有会议的列表呢?

谢谢。

【问题讨论】:

    标签: node.js exchangewebservices ews-javascript-api


    【解决方案1】:

    好像ews-javascript-api的作者这里有一个例子:

    https://gist.github.com/gautamsi/ba0561da1b4a2b29478943ba5f002328

    import { ExchangeService, ExchangeVersion, WebCredentials, Uri, DateTime, CalendarView, WellKnownFolderName, EwsLogging } from "ews-javascript-api";
    import credentials = require("./credentials"); //for username and password
    EwsLogging.DebugLogEnabled = false;
    
    var service = new ExchangeService(ExchangeVersion.Exchange2010);
    service.Credentials = new WebCredentials(credentials.userName, credentials.password);
    service.Url = new Uri("https://outlook.office365.com/Ews/Exchange.asmx");
    
    var view = new CalendarView(DateTime.Now.Add(-1, "week"), DateTime.Now); // appointments in last one week.
    service.FindAppointments(WellKnownFolderName.Calendar, view).then((response) => {
        let appointments = response.Items;
        let appointment = appointments[0];
        console.log("Subject: " + appointment.Subject);
        console.log("Start Time: " + appointment.Start);
        console.log("End Time: " + appointment.End);
        console.log("Recipients: ");
        appointment.RequiredAttendees.Items.forEach((a) => {
            console.log(a.Address);
        });
        console.log("unique id: " + appointment.Id.UniqueId, true, true);
    
    }, function (error) {
        console.log(error)
    })
    

    【讨论】:

      猜你喜欢
      • 2018-08-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-20
      • 1970-01-01
      相关资源
      最近更新 更多