package kr.co.swh.lecture.opensource; 

import java.io.IOException;
import java.net.URLEncoder;

import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

public class ApiExplorer3 {
    public static void main(String[] args) throws IOException {
//    	Document doc = Jsoup.connect("http://openapi.gbis.go.kr/ws/rest/busrouteservice?serviceKey=gFPEKeUFchor6ufSmF7rcQdqX07%2FzujLylBDhPciPIFFNGcI6GF4gXbuj%2BA6VYJc0dUETinOu9HQ7ewyXuLqWA%3D%3D&keyword=11").get();
    	
    	String url = "http://openapi.gbis.go.kr/ws/rest/buslocationservice?serviceKey=";
    	String key = URLEncoder.encode("1234567890", "UTF-8");
    	url = url + key + "&routeId=233000031";
    	
    	Document doc = Jsoup.connect(url).get();
    	System.out.println(doc.text());
		
		
    }
}