diff --git a/src/main/Main.java b/src/main/Main.java index c9e0d45..04f4f6c 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -11,6 +11,7 @@ static ArrayList queryParam = new ArrayList<>(); static ArrayList formParam = new ArrayList<>(); static ArrayList pathParam = new ArrayList<>(); + static NecessaryParam nes = new NecessaryParam(); static TestGETCactus get = new TestGETCactus(); static TestPOSTCactus post = new TestPOSTCactus("f", "f", "f"); static TestPUTCactus put = new TestPUTCactus("f", "f"); @@ -19,19 +20,24 @@ public static void main(String[] args) { // post.start(); init(); - api.jsonAcquisition("src/main/you.json"); + //api.jsonAcquisition("src/main/you.json"); api.doRestTest(); System.out.println(api.getResults()); } static private void init() { api.setAccount("https://www.googleapis.com/youtube/v3"); - queryParam.add(new RestParam("id", "PLZcOpFipzeuFmuPLYyijcN0l4S0skwuiR")); + queryParam.add(new RestParam("mine", "true")); queryParam.add(new RestParam("part", "id")); - api.setToken("access_token", - "ya29.GltqBnBr5rboUfJ8ODUnj3vtdV54kjLRXbbntDt1M_4f_HGfXj-NL5ODfDkS7tn4nzP93L3w26KvtB27EZAg3Z7Q_NJZGNDy4KtKTTla1TNOA8URDNsKDEqHEV4D"); + queryParam.add(new RestParam("access_token", + "ya29.GltqBpitzI890HzAA79CwcOrRQmaBlyI2xmTs6iYKeipPLhtrhndUqQ188oQBDYi62KTeJm828EOzyz_cA61qL-78qpxtYi59kAzYrW2FnysoSAkgQO5_oEiYVfT")); pathParam.add("playlists"); - api.setProperty("Content-type", "application/json"); + api.getGetnesParam().setQueryParams(new RestParam("mine", "true")); + api.getGetnesParam().setQueryParams(new RestParam("part", "id")); + api.getGetnesParam().setQueryParams(new RestParam("access_token", + "ya29.GltqBpitzI890HzAA79CwcOrRQmaBlyI2xmTs6iYKeipPLhtrhndUqQ188oQBDYi62KTeJm828EOzyz_cA61qL-78qpxtYi59kAzYrW2FnysoSAkgQO5_oEiYVfT")); + api.getGetnesParam().setPathParams("playlists"); +// api.setProperty("Content-type", "application/json"); api.setupRestTest(Method.GET, queryParam, formParam, pathParam); }