Skip to content

Instantly share code, notes, and snippets.

@4aiman
4aiman / appointment.ts
Created July 26, 2022 09:48 — forked from gautamsi/appointment.ts
Fetch Appointments using ews-javascript-api
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.
@4aiman
4aiman / readme.md
Created May 2, 2024 09:58
4aiman's card