public IActionResult GetDPlanId(string userId) { var Likes = string.IsNullOrEmpty(HttpContext.Request.Query["showLikes"]) ? "" : (string)HttpContext.Request.Query["showLikes"]; var Notes = string.IsNullOrEmpty(HttpContext.Request.Query["showNotes"]) ? "" : (string)HttpContext.Request.Query["showNotes"]; var ImageInfo = string.IsNullOrEmpty(HttpContext.Request.Query["showImageInfo"]) ? "" : (string)HttpContext.Request.Query["showImageInfo"]; var UserAction = string.IsNullOrEmpty(HttpContext.Request.Query["showUserActions"]) ? "" : (string)HttpContext.Request.Query["showUserActions"]; var HomeInfo = string.IsNullOrEmpty(HttpContext.Request.Query["showHomeInfo"]) ? "" : (string)HttpContext.Request.Query["showHomeInfo"]; // var bookmarkIds = string.IsNullOrEmpty(HttpContext.Request.Query["bookmarkIds"]) ? "" : (string)HttpContext.Request.Query["bookmarkIds"]; var bookmarkId = string.IsNullOrEmpty(HttpContext.Request.Query["bookmarkId"]) ? "" : (string)HttpContext.Request.Query["bookmarkId"]; var templateId = string.IsNullOrEmpty(HttpContext.Request.Query["templateId"]) ? "" : (string)HttpContext.Request.Query["templateId"]; _req.RestRequestGet("api/v2/User/BookmarkData"); _req.AddPartnerId(); _req.Addquerryparams("userId", userId); if (Likes == "true") { _req.Addquerryparams("showLikes", Likes); } if (Notes == "true") { _req.Addquerryparams("showNotes", Notes); } if (ImageInfo == "true") { _req.Addquerryparams("showImageInfo", ImageInfo); } if (UserAction == "true") { _req.Addquerryparams("showUserActions", UserAction); } if (HomeInfo == "true") { _req.Addquerryparams("showHomeInfo", HomeInfo); } if (bookmarkId != "") { _req.Addquerryparams("bookmarkId", bookmarkId); } if (templateId != "") { _req.Addquerryparams("templateId", templateId); } ApiResultModel <List <ApiBoardData> > result; try { result = _req.FetchgetRequest <ApiResultModel <List <ApiBoardData> > >(); if (result.Status != "OK") { return(BadRequest()); } } catch (Exception e) { return(BadRequest(e)); } return(new OkObjectResult(result)); }
public IActionResult GetLoc(string location) { _req.RestRequestGet("api/v2/Typeahead/Locations"); _req.AddPartnerId(); _req.Addquerryparams("searchTerm", location); if (!string.IsNullOrEmpty(HttpContext.Request.Query["type "])) { _req.Addquerryparams("types", (string)HttpContext.Request.Query["type"]); } return(new OkObjectResult(_req.FetchgetRequest <List <Location> >())); }
public IActionResult GetDPlanId(string planId) { var specID = string.IsNullOrEmpty(HttpContext.Request.Query["specId"]) ? "" : (string)HttpContext.Request.Query["specId"]; _req.RestRequestGet("api/v2/Detail/Home"); _req.AddPartnerId(); if (specID != "") { _req.Addquerryparams("specId", specID); } _req.Addquerryparams("planId", planId); ApiHomeDetails result; try { result = _req.FetchgetRequest <ApiHomeDetails>(); } catch (Exception e) { return(BadRequest(e)); } return(new OkObjectResult(result)); }
public IActionResult GetDPlanId(string userId) { var logonName = string.IsNullOrEmpty(HttpContext.Request.Query["logonName"]) ? "" : (string)HttpContext.Request.Query["logonName"]; _req.RestRequestGet("api/v2/User/Profile"); _req.AddPartnerId(); if (logonName != "") { _req.Addquerryparams("logonName", logonName); } _req.Addquerryparams("userId", userId); ApiResultModel <List <ModelsRepository.Models.Profile.UserProfile> > result; try { result = _req.FetchgetRequest <ApiResultModel <List <ModelsRepository.Models.Profile.UserProfile> > >(); } catch (Exception e) { return(BadRequest(e)); } return(new OkObjectResult(result)); }