public List <Dictionary <string, object> > GetSubPageRecords(int subPageId, int recordId, String token) { SelectQueryResult result = Call <SelectQueryResult>(token, platformClient => platformClient.GetSubpageRecords(subPageId, recordId, string.Empty, string.Empty, 0)); return(MPFormatConversion.MPFormatToList(result)); }
public List <Dictionary <string, object> > GetPageViewRecords(string viewKey, string token, string searchString = "", string sort = "", int top = 0) { var result = Call <SelectQueryResult>(token, platformClient => platformClient.GetPageViewRecords(GetMinistryPlatformId(viewKey), searchString, sort, top)); return(MPFormatConversion.MPFormatToList(result)); }
public List <Dictionary <string, object> > GetSubpageViewRecords(int viewId, int recordId, string token, string searchString = "", string sort = "", int top = 0) { var result = Call <SelectQueryResult>(token, platformClient => platformClient.GetSubpageViewRecords(viewId, recordId, searchString, sort, top)); return(MPFormatConversion.MPFormatToList(result)); }
public List <MpInvitation> GetInvitations(int sourceId, int invitationTypeId) { var mpInvitations = new List <MpInvitation>(); try { var searchString = $",,,\"{invitationTypeId}\",\"{sourceId}\",,false"; var mpResults = _ministryPlatformService.GetRecords(_invitationPageId, ApiLogin(), searchString, string.Empty); var invitations = MPFormatConversion.MPFormatToList(mpResults); // Translate object format from MP to an MpInvitaion object if (invitations != null && invitations.Count > 0) { mpInvitations.AddRange( invitations.Select( p => new MpInvitation { SourceId = p.ToInt("Source_ID"), EmailAddress = p.ToString("Email_address"), GroupRoleId = p.ToInt("Group_Role_ID"), InvitationType = p.ToInt("Invitation_Type_ID"), RecipientName = p.ToString("Recipient_Name"), RequestDate = p.ToDate("Invitation_Date") })); } else { _logger.Debug($"No pending invitations found for SourceId = {sourceId}, InvitationTypeId = {invitationTypeId} "); } } catch (Exception exception) { _logger.Debug($"Exception thrown while retrieving invitations for SourceId = {sourceId}, InvitationTypeId = {invitationTypeId} "); _logger.Debug($"Exception message: {exception.Message} "); } return(mpInvitations); }
public List <Dictionary <string, object> > GetSelectionsDict(int selectionId, String token, String search = "", String sort = "") { return(MPFormatConversion.MPFormatToList(GetSelectionRecords(selectionId, token, search, sort))); }
public List <Dictionary <string, object> > GetRecordsDict(string pageKey, String token, String search = "", String sort = "") { return(MPFormatConversion.MPFormatToList(GetRecords(GetMinistryPlatformId(pageKey), token, search, sort))); }
public List <Dictionary <string, object> > GetLookupRecords(String token, int pageId, string search, string sort, int maxNumberOfRecordsToReturn = 100) { return(MPFormatConversion.MPFormatToList(GetPageLookupRecords(token, pageId, search, sort, maxNumberOfRecordsToReturn))); }
public List <Dictionary <string, object> > GetLookupRecords(int pageId, String token) { return(MPFormatConversion.MPFormatToList(GetPageLookupRecords(token, pageId, string.Empty, string.Empty, 0))); }
public static List <Dictionary <string, object> > GetRecordsDict(int pageId, String token, String search = "", String sort = "") { return(MPFormatConversion.MPFormatToList(GetRecords(pageId, token, search, sort))); }