public Task <Classification> GetClassificationDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync <Classification>( RequestHelper.CreateGetRequest(request, ClassificationsPathWithId), HttpStatusCode.OK, request)); }
public Task <IRestResponse> CallGetAttractionDetailsAsync(IApiGetRequest request) { var searchRequest = new RestRequest(AttractionsWithIdPath, Method.GET) { RequestFormat = DataFormat.Json }; searchRequest.AddParameter("id", request.Id, ParameterType.UrlSegment); return(ExecuteRequestAsync(searchRequest, request)); }
public Task <Venue> GetVenueDetailsAsync(IApiGetRequest request) { var searchRequest = new RestRequest(VenuesWithIdPath, Method.GET) { RequestFormat = DataFormat.Json }; searchRequest.AddParameter("id", request.Id, ParameterType.UrlSegment); return(ExecuteRequestAsync <Venue>(searchRequest, HttpStatusCode.OK, request)); }
public Task <GetEventImagesResponse> GetEventImagesAsync(IApiGetRequest request) { var searchRequest = new RestRequest(EventsImagesPath, Method.GET) { RequestFormat = DataFormat.Json }; searchRequest.AddParameter("id", request.Id, ParameterType.UrlSegment); return(ExecuteRequestAsync <GetEventImagesResponse>(searchRequest, HttpStatusCode.OK, request)); }
public Task <Classification> GetClassificationDetailsAsync(IApiGetRequest request) { var searchRequest = new RestRequest(ClassificationsPathWithId, Method.GET) { RequestFormat = DataFormat.Json }; searchRequest.AddParameter("id", request.Id, ParameterType.UrlSegment); return(ExecuteRequestAsync <Classification>(searchRequest, HttpStatusCode.OK, request)); }
public Task <IRestResponse> CallGetEventOffersAsync(IApiGetRequest getRequest) { var searchRequest = new RestRequest(EventOffersPath, Method.GET) { RequestFormat = DataFormat.Json }; searchRequest.AddParameter("id", getRequest.Id, ParameterType.UrlSegment); return(ExecuteRequestAsync(searchRequest, getRequest)); }
public Task <EventOffers> GetEventOffersAsync(IApiGetRequest getRequest) { var searchRequest = new RestRequest(EventOffersPath, Method.GET) { RequestFormat = DataFormat.Json }; searchRequest.AddParameter("id", getRequest.Id, ParameterType.UrlSegment); return(ExecuteRequestAsync <EventOffers>(searchRequest, HttpStatusCode.OK, getRequest)); }
public BaseResult <T> Get <T>(IApiGetRequest <T> request) { string realServerUrl = GetServerUrl(this.serverUrl, request.ApiName); WebUtils webUtils = new WebUtils(); request.UserCode = user_code; request.Key = key; string body = webUtils.DoGet(realServerUrl, request.GetUrlParameters(), null); var rsp = new BaseResult <T>(); try { rsp = JsonConvert.DeserializeObject <BaseResult <T> >(body); } catch (Exception ex) { LogUtil.Error("解释 result 错误:" + ex.Message, ex); } return(rsp); }
public Task <IRestResponse> CallGetEventImagesAsync(IApiGetRequest request) { return(ExecuteRequestAsync(RequestHelper.CreateGetRequest(request, EventsImagesPath), request)); }
public Task <GetEventImagesResponse> GetEventImagesAsync(IApiGetRequest request) { return(ExecuteRequestAsync <GetEventImagesResponse>( RequestHelper.CreateGetRequest(request, EventsImagesPath), HttpStatusCode.OK, request)); }
public Task <IRestResponse> CallGetEventDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync(RequestHelper.CreateGetRequest(request, EventsPathWithId), request)); }
public Task <Event> GetEventDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync <Event>(RequestHelper.CreateGetRequest(request, EventsPathWithId), HttpStatusCode.OK, request)); }
public Task <IRestResponse> CallGetAttractionDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync(RequestHelper.CreateGetRequest(request, AttractionsWithIdPath), request)); }
public Task <Attraction> GetAttractionDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync <Attraction>(RequestHelper.CreateGetRequest(request, AttractionsWithIdPath), HttpStatusCode.OK, request)); }
public Task <Venue> GetVenueDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync <Venue>(RequestHelper.CreateGetRequest(request, VenuesWithIdPath), HttpStatusCode.OK, request)); }
public Task <IRestResponse> CallGetClassificationDetailsAsync(IApiGetRequest request) { return(ExecuteRequestAsync( RequestHelper.CreateGetRequest(request, ClassificationsPathWithId), request)); }