public List <LocalDeal> Get(string location, string preferences) { return(ApiProvider.Process(new LocalDealsRequest())); return(new List <LocalDeal> { new LocalDeal { Title = "StarBucks", Description = "We are thrilled to open registration for Big Data Day LA 2018, tentatively scheduled for Saturday, August 11th, 2018 at University of Southern California", Time = "Saturday, August 11th, 2018", Venue = "University of Southern California", ImageUrl = "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F41503594%2F1961717567%2F1%2Foriginal.jpg?w=800&auto=compress&rect=583%2C389%2C1944%2C972&s=e068139d3d0c3fcb38c8385afd60109f", Id = "43642378529" }, new LocalDeal { Title = "Big Data Day LA 2018", Description = "We are thrilled to open registration for Big Data Day LA 2018, tentatively scheduled for Saturday, August 11th, 2018 at University of Southern California", Time = "Saturday, September 11th, 2018", Venue = "University of Southern California", ImageUrl = "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F41503594%2F1961717567%2F1%2Foriginal.jpg?w=800&auto=compress&rect=583%2C389%2C1944%2C972&s=e068139d3d0c3fcb38c8385afd60109f", Id = "43642378529" }, new LocalDeal { Title = "Big Data Day LA 2018", Description = "We are thrilled to open registration for Big Data Day LA 2018, tentatively scheduled for Saturday, August 11th, 2018 at University of Southern California", Time = "Saturday, October 11th, 2018", Venue = "University of Southern California", ImageUrl = "https://img.evbuc.com/https%3A%2F%2Fcdn.evbuc.com%2Fimages%2F41503594%2F1961717567%2F1%2Foriginal.jpg?w=800&auto=compress&rect=583%2C389%2C1944%2C972&s=e068139d3d0c3fcb38c8385afd60109f", Id = "43642378529" } }); }
public ShopResponse Post([FromBody] ShopRequest request) { var shopRs = ApiProvider.Process(request); var trips = new List <Flight>(); if (shopRs.FlightResults.Trips.Count > 7) { shopRs.FlightResults.Trips.RemoveRange(7, shopRs.FlightResults.Trips.Count - 7); } return(shopRs); }
public ShopResponse Getflights(string profileId, string origin, string destination, string departDate, string arrivalDate) { /* * Thread.Sleep(new Random(1).Next(5, 8)); * return new ShopResponse * { * FlightResults = new FlightResults * { * Trips = new List<TripInfo> * { * new TripInfo * { * OriginDestinationKey = "OD1", * TotalPrice = "$225", * PriceToCollect = "+/$0", * Flights = new List<Flight> * { * new Flight * { * Origin = "ORD", * Destination = "IAD", * DepartureDate = "2018-06-14", * DepartureTime = "1:05 pm", * ArrivalTime = "3:56 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 498", * TravelTime = "1h 51m" * }, * * new Flight * { * Origin = "IAD", * Destination = "ORD", * DepartureDate = "2018-06-17", * DepartureTime = "12:53 pm", * ArrivalTime = "1:30 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 221 ", * TravelTime = "1h 53m" * }, * * } * * } * , * new TripInfo * { * OriginDestinationKey = "OD2", * TotalPrice = "$225", * PriceToCollect = "+/$0", * Flights = new List<Flight> * { * new Flight * { * Origin = "ORD", * Destination = "IAD", * DepartureDate = "2018-06-14", * DepartureTime = "8:57 am", * ArrivalTime = "11:10 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$225", * PriceToCollect = "+/$0", * FlightNumber = "UA 225", * TravelTime = "1h 48m" * }, new Flight * { * Origin = "IAD", * Destination = "ORD", * DepartureDate = "2018-06-17", * DepartureTime = "12:53 pm", * ArrivalTime = "1:30 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 221 ", * TravelTime = "1h 53m" * }, * * * } * * } * , * new TripInfo * { * OriginDestinationKey = "OD3", * TotalPrice = "323", * PriceToCollect = "+/$0", * Flights = new List<Flight> * { * new Flight * { * Origin = "ORD", * Destination = "IAD", * DepartureDate = "2018-06-14", * DepartureTime = "9:23 pm", * ArrivalTime = "12:09 am", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$225", * PriceToCollect = "+/$0", * FlightNumber = "UA 2000", * TravelTime = "1h 52m" * }, * * new Flight * { * Origin = "IAD", * Destination = "ORD", * DepartureDate = "2018-06-17", * DepartureTime = "12:53 pm", * ArrivalTime = "1:30 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 221 ", * TravelTime = "1h 53m" * }, * } * * } * ,new TripInfo * { * OriginDestinationKey = "OD4", * TotalPrice = "323", * PriceToCollect = "+/$0", * Flights = new List<Flight> * { * new Flight * { * Origin = "ORD", * Destination = "IAD", * DepartureDate = "2018-06-14", * DepartureTime = "1:05 pm", * ArrivalTime = "3:56 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 498", * TravelTime = "1h 51m" * }, * * new Flight * { * Origin = "IAD", * Destination = "ORD", * DepartureDate = "2018-06-17", * DepartureTime = "10:15 pm", * ArrivalTime = "11:14 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F3", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 552 ", * TravelTime = "1h 53m" * }, * } * } * , * new TripInfo * { * OriginDestinationKey = "OD5", * TotalPrice = "380", * PriceToCollect = "+/$20", * Flights = new List<Flight> * { * new Flight * { * Origin = "ORD", * Destination = "IAD", * DepartureDate = "2018-06-14", * DepartureTime = "8:57 am", * ArrivalTime = "11:10 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$225", * PriceToCollect = "+/$0", * FlightNumber = "UA 225", * TravelTime = "1h 48m" * }, * new Flight * { * Origin = "IAD", * Destination = "ORD", * DepartureDate = "2018-06-17", * DepartureTime = "10:15 pm", * ArrivalTime = "11:14 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F3", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 552 ", * TravelTime = "1h 53m" * }, * * } * * } * , * new TripInfo * { * OriginDestinationKey = "OD6", * TotalPrice = "400", * PriceToCollect = "+/$40", * Flights = new List<Flight> * { * new Flight * { * Origin = "ORD", * Destination = "IAD", * DepartureDate = "2018-06-14", * DepartureTime = "9:23 pm", * ArrivalTime = "12:09 am", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F1", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$225", * PriceToCollect = "+/$0", * FlightNumber = "UA 2000", * TravelTime = "1h 52m" * }, * * new Flight * { * Origin = "IAD", * Destination = "ORD", * DepartureDate = "2018-06-17", * DepartureTime = "10:15 pm", * ArrivalTime = "11:14 pm", * IsNonStop = "true", * Amenities = new Amenities * { * IsLegroom = true, * IsLounge= false, * IsOnDemandVideo = true, * IsUSB = true, * IsWifi = true, * }, * FlightKey = "F3", * CarrierCode = "UA", * MarketingCarrier = "UA", * TotalPrice = "$323", * PriceToCollect = "+/$0", * FlightNumber = "UA 552 ", * TravelTime = "1h 53m" * }, * } * * } * } * } * }; */ var requesttrips = new List <Trip> { new Trip { Origin = origin, Destination = destination, DepartureDate = departDate, } }; if (!string.IsNullOrWhiteSpace(arrivalDate)) { requesttrips.Add(new Trip { Origin = destination, Destination = origin, DepartureDate = arrivalDate, }); } var shopRs = ApiProvider.Process(new ShopRequest { ProfileId = profileId, Itineary = new Itineary { Trips = requesttrips, } }); var trips = new List <Flight>(); if (shopRs.FlightResults.Trips.Count > 7) { shopRs.FlightResults.Trips.RemoveRange(7, shopRs.FlightResults.Trips.Count - 7); } return(shopRs); }
public RestaurantOffers GetRestaurant() { return(ApiProvider.Process(new LocalRestaurantsRequest())); }
public HotelOffers GetHotels() { return(ApiProvider.Process(new HotelsRequest())); }
public RentalCarsResponse GetCars() { return(ApiProvider.Process(new RentalCarsRequest())); }