예제 #1
0
        public Ligne GetTransportType(String lineId)
        {
            String url = "https://data.metromobilite.fr/api/routers/default/index/routes?codes=" + lineId;
            String responseFromServer = connectApi.ConnectionApi(url);

            // Convert to C# object
            List <Ligne> typeList = JsonConvert.DeserializeObject <List <Ligne> >(responseFromServer);

            return(typeList[0]);
        }
예제 #2
0
        private List <Arret> proximite(String lon, String lat, Int32 distance)
        {
            // New instance of the connection
            //ConnectApi conect = new ConnectApi();

            String url = "http://data.metromobilite.fr/api/linesNear/json?x=" + lon + "&y=" + lat + "&dist=" + distance + "&details=true";
            String responseFromServer = connectApi.ConnectionApi(url);

            // Convert to C# object
            List <Arret> stopList = JsonConvert.DeserializeObject <List <Arret> >(responseFromServer);

            return(stopList);
        }