//public async Task<InpowerResult> getAllBooks() //{ // InpowerResult resp = null; // try // { // resp = await _helper.Get<InpowerResult>(GlobalConstant.BookShelfUrls.getAllBooksUrl.ToString()); // return resp; // } // catch (Exception ex) // { // CrashReportService crashReport = new CrashReportService(); // CrashReportModel CR = new CrashReportModel(); // CR.Filename = "BookShelfService"; // CR.Eventname = "GetAllBooks"; // // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; // CR.ErrorMsg = ex.Message + ex.StackTrace; // await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); // return resp; // } //} public async Task <InpowerResult> GetAllBooks(PaginationModel paginationModel) { BooksMapViewModel model = new BooksMapViewModel(); model.IsRead = paginationModel.Status; model.SkipRecords = paginationModel.SkipRecords; model.TakeRecords = paginationModel.TakeRecords; model.SearchText = (String.IsNullOrEmpty(paginationModel.SearchText)?"": paginationModel.SearchText); InpowerResult resp = null; try { resp = await _helper.Post <BooksMapViewModel>(model, GlobalConstant.BookShelfUrls.getAllBooksUrl.ToString()); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "BookShelfService"; CR.Eventname = "PostBook"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async Task <InpowerResult> UpdateBook(BooksMapViewModel model) { InpowerResult resp = null; try { resp = await _helper.Post <BooksMapViewModel>(model, GlobalConstant.BookShelfUrls.UpdateBookUrl.ToString()); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "BookShelfService"; CR.Eventname = "PostBook"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async Task <InpowerResult> PostSuggestInterest(SuggestedInterestsRequestViewModel model) { InpowerResult resp = null; try { resp = await _helper.Post <SuggestedInterestsRequestViewModel>(model, GlobalConstant.CommonUrls.PostSuggestInterestServiceUrl); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "Interst"; CR.Eventname = "InetrestService"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async Task <InpowerResult> GetChatMessagesUptoId(long contactId, string unixTimeStamp) { InpowerResult resp = null; try { resp = await _helper.Get <InpowerResult>(GlobalConstant.ChatUrls.PrivateChatMessage.ToString() + "?contactId=" + contactId);//&unixTicks=" + unixTimeStamp return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "Registration"; CR.Eventname = "AccountService"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async Task <InpowerResult> PostChat(ChatMessageViewModel model) { InpowerResult resp = null; try { resp = await _helper.Post <ChatMessageViewModel>(model, GlobalConstant.ChatUrls.PostChat.ToString()); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "Registration"; CR.Eventname = "AccountService"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async Task <InpowerResult> PostUnBlockUserInterest(userdetails BlockUser) { InpowerResult resp = null; try { resp = await _helper.Post(BlockUser, GlobalConstant.SettingUrls.postUnBlockUserUrl); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "Interst"; CR.Eventname = "InetrestService"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }
public async Task <InpowerResult> getBlockedContactAll() { InpowerResult resp = null; try { resp = await _helper.Get <InpowerResult>(GlobalConstant.SettingUrls.getblockedContacturl.ToString()); return(resp); } catch (Exception ex) { CrashReportService crashReport = new CrashReportService(); CrashReportModel CR = new CrashReportModel(); CR.Filename = "Registration"; CR.Eventname = "AccountService"; // CR.UserID = GlobalClass.UserID == null ? "0" : GlobalClass.UserID; CR.ErrorMsg = ex.Message + ex.StackTrace; await crashReport.SendCrashReport(CR, GlobalConstant.CrashUrl); return(resp); } }