public static List <AttendeeView> SearchAttendees(string sessionId, AttendeeFilter filter) { Perculus perculus = Common.CreatePerculusClient(); List <AttendeeView> result = perculus.Attendees.SearchAttendees(sessionId, filter, out ApiErrorResponse error); if (error != null) { Common.HandleErrorResponse(error); } return(result); }
public static bool DeleteAttendee(string sessionId, string userIdOrAttendanceCode) { Perculus perculus = Common.CreatePerculusClient(); bool result = perculus.Attendees.DeleteByAttendanceCodeOrUserId(sessionId, userIdOrAttendanceCode, out ApiErrorResponse error); if (error != null) { Common.HandleErrorResponse(error); } return(result); }
public static AttendeeView AddAttendeeByUserId(string sessionId, string userId) { Perculus perculus = Common.CreatePerculusClient(); AttendeeView attendee = perculus.Attendees.AddByUserId(sessionId, userId, "a", out ApiErrorResponse error); if (error != null) { Common.HandleErrorResponse(error); } return(attendee); }
public static AttendeeView AddAttendee(string sessionId, PostAttendeeView newAttendee) { Perculus perculus = Common.CreatePerculusClient(); (AttendeeView attendee, ApiErrorResponse error) = perculus.Attendees.AddAttendee(sessionId, newAttendee); if (error != null) { Common.HandleErrorResponse(error); } return(attendee); }
public static AttendeesPostResult AddMultipleAttendeesByUserId(string sessionId, string userId) { Perculus perculus = Common.CreatePerculusClient(); List <UserIdRoleAttendee> userIdsWithRoles = new List <UserIdRoleAttendee>(); userIdsWithRoles.Add(new UserIdRoleAttendee { UserId = userId, Role = "" //Default is "u". Possible values: e a u e+ }); (AttendeesPostResult result, ApiErrorResponse error) = perculus.Attendees.AddMultipleByUserId(sessionId, userIdsWithRoles); if (error != null) { Common.HandleErrorResponse(error); } return(result); }
public static Perculus CreatePerculusClient(bool createNewInstance = false) { Perculus client = null; if (!createNewInstance && _perculusClient != null) { return(_perculusClient); } var config = Config.GetInstance(); client = new Perculus(new Uri(config.API_URL), new Uri(config.AUTH_URL), config.ACCOUNT_ID, config.USERNAME, config.PASSWORD, config.LOG_FILE_PATH); if (!createNewInstance) { _perculusClient = client; } return(client); }