コード例 #1
0
 private AvailableTrips SVR(string SVRAPIURL, string SVRConsumerKey, string SVRConsumerSecret, string SVRProviderName, int SVRsourceid, int SVRdestinationid, string SVRdate)
 {
     AvailableTrips objAvailableTrips = new AvailableTrips();
     List<object> objlist = new List<object>();
     AbhibusAPI clsAbhibusAPI = new AbhibusAPI();
     objAvailableTrips = clsAbhibusAPI.getBusAvailability(SVRsourceid
                         , SVRdestinationid
                         , SVRdate
                         , 6
                         , "0"
                         , SVRAPIURL
                         , SVRConsumerKey
                         , SVRProviderName
                         );
     return objAvailableTrips;
 }
コード例 #2
0
 private AvailableTrips KAVERI(string KAVERIAPIURL, string KAVERIConsumerKey, string KAVERIConsumerSecret, string KAVERIProviderName, int KAVERIsourceid, int KAVERIdestinationid, string KAVERIdate)
 {
     AvailableTrips objAvailableTrips = new AvailableTrips();
     AbhibusAPI clsAbhibusAPI = new AbhibusAPI();
     objAvailableTrips = clsAbhibusAPI.getBusAvailability(KAVERIsourceid
                         , KAVERIdestinationid
                         , KAVERIdate
                         , 6
                         , "0"
                         , KAVERIAPIURL
                         , KAVERIConsumerKey
                         , KAVERIProviderName);
     return objAvailableTrips;
 }
コード例 #3
0
        private AvailableTrips Rajesh(string RAJESHAPIURL, string RAJESHConsumerKey, string RAJESHConsumerSecret, string RAJESHProviderName, int RAJESHsourceid, int RAJESHdestinationid, string RAJESHdate)
        {
            AvailableTrips objAvailableTrips = new AvailableTrips();
            List<object> objlist = new List<object>();

            AbhibusAPI clsAbhibusAPI = new AbhibusAPI();
            objAvailableTrips = clsAbhibusAPI.getBusAvailability(RAJESHsourceid
                                , RAJESHdestinationid
                                , RAJESHdate
                                , 6
                                , "0"
                                , RAJESHAPIURL
                                , RAJESHConsumerKey
                                , RAJESHProviderName);

            return objAvailableTrips;
        }
コード例 #4
0
        /// <summary>
        /// Method to get available trips for given provider
        /// </summary>
        /// <param name="ProviderName"></param>
        /// <param name="objClientAPIDetails"></param>
        /// <returns>Returns JSON string with list of available trips</returns>
        private AvailableTrips GetAvailableTripsByProviderName(ClientAPIDetails objClientAPIDetails, BusesSearchFilter objBusesSearchFilter)
        {
            AvailableTrips objAvailableTrips = new AvailableTrips();
            List<object> objlist = new List<object>();
            switch (objClientAPIDetails.ProviderName)
            {

                case "ABHIBUS":
                case "SVR":
                case "KALLADA":
                case "KAVERI":
                case "RAJESH":
                case "SAIANJANA":
                    AbhibusAPI clsAbhibusAPI = new AbhibusAPI();
                    objAvailableTrips = clsAbhibusAPI.getBusAvailability(objBusesSearchFilter.SourceID
                                        , objBusesSearchFilter.DestinationID
                                        , objBusesSearchFilter.JourneyDate
                                        , 6
                                        , "0"
                                        , objClientAPIDetails.APIURL
                                        , objClientAPIDetails.ConsumerKey
                                        , objClientAPIDetails.ProviderName);
                    break;
                case "BITLA":
                case "MORNINGSTAR":
                    BitlaAPI clsBitlaAPI = new BitlaAPI();
                    objAvailableTrips = clsBitlaAPI.getAvailableRoutes(objBusesSearchFilter.SourceID
                                        , objBusesSearchFilter.DestinationID
                                        , objBusesSearchFilter.JourneyDate
                                        , objClientAPIDetails.APIURL
                                        , objClientAPIDetails.ConsumerKey, objClientAPIDetails.ProviderID);
                    break;
                case "TICKETGOOSE":
                    TicketGooseAPI clsTicketGooseAPI = new TicketGooseAPI();
                    objAvailableTrips = clsTicketGooseAPI.getTripListV2(objBusesSearchFilter.SourceID
                                        , objBusesSearchFilter.DestinationID
                                        , objBusesSearchFilter.JourneyDate
                                        , objClientAPIDetails.APIURL
                                        , objClientAPIDetails.ConsumerKey
                                        , objClientAPIDetails.ConsumerSecret, objClientAPIDetails.ProviderID);
                    break;
                //easybus
                case "EASYBUS":
                    EasybusAPI clsEasyBusAPI = new EasybusAPI();

                    break;
                default:
                    break;

            }

            return objAvailableTrips;
        }