Newer
Older
RestfulChecker / src / main / Main.java
package main;

import java.util.ArrayList;

import restfulchecker.RestAccount;
import restfulchecker.RestChecker;
import restfulchecker.RestChecker.Method;
import restfulchecker.RestParam;

public class Main {
	static RestChecker api = new RestChecker();
	static ArrayList<RestParam> queryParam = new ArrayList<>();
	static ArrayList<RestParam> formParam = new ArrayList<>();
	static ArrayList<String> pathParam = new ArrayList<>();

	public static void main(String[] args) {
		init();
		api.setupRestTest(Method.GET, queryParam, formParam, pathParam);
		api.doRestTest();
		System.out.println(api.getResults());
//		System.out.println(api.getBeforeResults());
//		System.out.println(api.getJudgeResult());
	}

	static private void init() {
		api.setAccount("https://www.googleapis.com/youtube/v3");
//		api.setAccount("http://nitta-lab-www.is.konan-u.ac.jp/CactusServer/rest/accounts");
//		formParam.add(new RestParam("userID", "test"));
//		formParam.add(new RestParam("userPass", "test"));
//		formParam.add(new RestParam("userName", "g"));
		queryParam.add(new RestParam("key","AIzaSyD5EI71SqPZhgdpwzlV0XTisGuKKtH5p6I"));
		queryParam.add(new RestParam("id","7lCDEYXw3mM"));
		queryParam.add(new RestParam("part","id"));
		pathParam.add("playlists");
//		formParam.add(new RestParam("snippet.title", "Dead by Daylight"));
//		pathParam.add("logout");
//		formParam.add(new RestParam("token", "E12xg9f1MCDr8P7aqDQdx4l7nIM3CdvpzXz2vbmzl832LGe8DjwAPWR6wZzP5hn4"));
//		pathParam.add("G90zOL9UTeTx");
	}

}