static void Main(string[] args) { string[] userName = new string[5]; string[] userPassword = new string[5]; string[] consumerKey = new string[5]; int i; userName[0] = "*****@*****.**"; userPassword[0] = "apprenticeship123"; consumerKey[0] = " deUbbIVOpyiHCpA10ogMAI5VWMJ7GDNb"; userName[1] = "*****@*****.**"; userPassword[1] = "chocolatemuffin01"; consumerKey[1] = " deUbbIVOpyiHCpA10ogMAI5VWMJ7GDNb"; userName[2] = "*****@*****.**"; userPassword[2] = "blueberrymuffin02"; consumerKey[2] = " deUbbIVOpyiHCpA10ogMAI5VWMJ7GDNb"; userName[3] = "*****@*****.**"; userPassword[3] = "Chocolate18"; consumerKey[3] = " deUbbIVOpyiHCpA10ogMAI5VWMJ7GDNb"; userName[4] = "*****@*****.**"; userPassword[4] = "password123"; consumerKey[4] = " deUbbIVOpyiHCpA10ogMAI5VWMJ7GDNb"; var authApi = new AuthenticationApi(); for (i = 0; i < 5; i++) { try { var response = authApi.directLogin(userName[i], userPassword[i], consumerKey[i], "password"); var accessToken = response.access_token; var meetingsApi = new MeetingsApi(); var meetings = meetingsApi.getUpcomingMeetings(accessToken); foreach (var m in meetings) { Console.WriteLine("{0}|{1}|{2}|{3}", userName[i], m.meetingId, m.startTime, m.subject); } } catch { // Stop error on screen } } }
public GoToMeetingClient([NotNull] ILogger log, [NotNull] GoToMeetingCrawlJobData gotomeetingCrawlJobData) //TODO: pass on any extra dependencies { if (log == null) { throw new ArgumentNullException(nameof(log)); } if (gotomeetingCrawlJobData == null) { throw new ArgumentNullException(nameof(gotomeetingCrawlJobData)); } if (string.IsNullOrEmpty(gotomeetingCrawlJobData.AccessToken)) { throw new Exception("CrawlJobData must have valid access token"); } _log = log; _nameCrawlJobData = gotomeetingCrawlJobData; accessToken = _nameCrawlJobData.AccessToken; MeetingsApi = new MeetingsApi(); OrganizersApi = new OrganizersApi(); }
public static string CreateGtmForMeeting(ApplicationDbContext context, MeetingViewModel meeting) { var gtmKeySet = context.GtmKeySets.First(); var userId = gtmKeySet.Email; var password = gtmKeySet.EmailPassword; var oauthToken = ""; // a request to login is created and sent. From the response // we need to store at least the access token to use for further calls var meetingRequestUri = new RequestDirectLogin(gtmKeySet.ConsumerKey, userId, password); string output; var resp = meetingRequestUri.Send(out output); if (resp != null) oauthToken = resp.AccessToken; var meetingsApi = new MeetingsApi(); var newMeeting = new MeetingReqCreate { subject = meeting.Title, starttime = meeting.Start, endtime = meeting.End, passwordrequired = false, conferencecallinfo = "Hybrid", timezonekey = "", meetingtype = MeetingReqCreate.MeetingtypeEnum.scheduled }; try { var meetingCreated = meetingsApi.createMeeting(oauthToken, newMeeting); return meetingCreated.First().joinURL; } catch (Exception ex) { Console.WriteLine(ex); Log4NetHelper.Log("Ceate Gtm Failed", LogLevel.ERROR, "CreateGtmForMeeting", 241, "Tester", ex); return ""; } }