// [Consumes(MediaTypeNames.RealtimePagedDataExchange.Version1, System.Net.Mime.MediaTypeNames.Application.Json)] public HttpResponseMessage GetOpenDataFeed(string feedname, long?afterTimestamp = (long?)null, string afterId = null, long?afterChangeNumber = (long?)null) { try { // Note only a subset of these parameters will be supplied when this endpoints is called // They are all provided here for the bookingEngine to choose the correct endpoint return(_bookingEngine.GetOpenDataRPDEPageForFeed(feedname, afterTimestamp, afterId, afterChangeNumber).GetContentResult()); } catch (KeyNotFoundException kn) { return(Request.CreateResponse(System.Net.HttpStatusCode.NotFound)); } }
// [Consumes(MediaTypeNames.RealtimePagedDataExchange.Version1, System.Net.Mime.MediaTypeNames.Application.Json)] public async Task <HttpResponseMessage> GetOpenDataFeed(string feedname, long?afterTimestamp = (long?)null, string afterId = null, long?afterChangeNumber = (long?)null) { try { // Note only a subset of these parameters will be supplied when this endpoints is called // They are all provided here for the bookingEngine to choose the correct endpoint return((await _bookingEngine.GetOpenDataRPDEPageForFeed(feedname, afterTimestamp, afterId, afterChangeNumber)).GetContentResult()); } catch (OpenBookingException obe) { return(obe.ErrorResponseContent.GetContentResult()); } }
public async Task <IActionResult> GetOpenDataFeed([FromServices] IBookingEngine bookingEngine, string feedName, long?afterTimestamp, string afterId, long?afterChangeNumber) { try { // Note only a subset of these parameters will be supplied when this endpoints is called // They are all provided here for the bookingEngine to choose the correct endpoint return((await bookingEngine.GetOpenDataRPDEPageForFeed(feedName, afterTimestamp, afterId, afterChangeNumber)).GetContentResult()); } catch (OpenBookingException obe) { return(obe.ErrorResponseContent.GetContentResult()); } }