public async Task <Result <string> > Get() { this.logger.LogDebug("Get"); try { return(Result <string> .Success(await client.GetMap())); } catch (Exception e) { this.logger.LogError(e, "Get"); return(Result <string> .Failure(e)); } }
public ActionResult GetMapById(int mapIdFrom) { var mapClient = new MapClient(apiConfig.GetString("ImxApiMediaUrl"), apiConfig.GetString("oAuthConsumerKey"), apiConfig.GetString("oAuthConsumerSecret"), 1); ImxMap mapInfo = mapClient.GetMap(mapIdFrom); return Json(mapInfo, JsonRequestBehavior.AllowGet); }