Program(string user, string pass) { Api = new CatalogApi.CatalogApi(user, pass); var login = Api.Authenticate().Result; if (!login) { throw new UnauthorizedAccessException("Could not authenticate to myPurdue with the supplied credentials."); } }
/// <summary> /// Instantiate a new TermSync with the specified term /// </summary> /// <param name="code">Term code as specified by Purdue catalog (e.g. 201510)</param> /// <param name="name">Term name (e.g. Fall 2015)</param> public TermSync(string code, string name, CatalogApi.CatalogApi api) { TermCode = code; TermName = name; Api = api; }