public BlaBlaCarFinder(IHttpService httpService, IDateFormatter dateFormatter, IOptions <BlaBlaCarConfig> options, IMapsService mapsService) { this.httpService = httpService; this.dateFormatter = dateFormatter; this.mapsService = mapsService; config = options.Value; }
public RoutDialog(ITelegramBotClient botClient) { var blaBlaCarConfig = new BlaBlaCarConfig { ApiUrl = "https://public-api.blablacar.com/api/v2/trips?locale=uk_UA&cur=UAH&fn={from}&tn={to}&db={date}", ApiKey = "9bd3dc5d46c34a0cb1ac951322208f77" }; var busConfig = new BusConfig { ApiUrl = "http://ticket.bus.com.ua/order/forming_bn?point_from={from}&point_to={to}&date={date}&date_add=0&fn=round_search", BookingUrl = "http://ticket.bus.com.ua/order/forming_bn?round_num={round_num}&count=1&email={email}&reservation=&bs_code={bus_code}&point_from={from_code}&point_to={to_code}&local_point_from={local_from_code}&local_point_to={local_to_code}&date={date}&date_add=0&date_dep={date}&fn=check_places&ya=0&submit=%D0%9F%D1%80%D0%BE%D0%B2%D0%B5%D1%80%D0%BA%D0%B0+%D0%BC%D0%B5%D1%81%D1%82+%D0%B8+%D1%81%D1%82%D0%BE%D0%B8%D0%BC%D0%BE%D1%81%D1%82%D0%B8", SiteUrl = "http://ticket.bus.com.ua/" }; blaBlaCarFinder = new BlaBlaCarFinder(new HttpService(), new DateFormatter(), Options.Create(blaBlaCarConfig)); busFinder = new BusFinder(new HttpService(), new DateFormatter(), Options.Create(busConfig), new LinkBuilder(new DateFormatter(), Options.Create(busConfig))); dialogFlowService = new DialogFlowService(); this.botClient = botClient; }