|
@@ -14,7 +14,8 @@ import com.google.gson.Gson;
|
14
|
14
|
public class ColonaCall {
|
15
|
15
|
public static void main(String[] args) {
|
16
|
16
|
HttpClient client = HttpClients.createDefault();
|
17
|
|
- HttpGet request = new HttpGet("https://8oi9s0nnth.apigw.ntruss.com/corona19-masks/v1/sales/json?page=1&perPage=500");
|
|
17
|
+ HttpGet request = new HttpGet("https://8oi9s0nnth.apigw.ntruss.com/corona19-masks/v1/stores/json?page=1&perPage=500");
|
|
18
|
+
|
18
|
19
|
try {
|
19
|
20
|
// 필요에 따라서는 헤더 추가
|
20
|
21
|
// request.addHeader("Content-type", "application/json");
|
|
@@ -28,10 +29,20 @@ public class ColonaCall {
|
28
|
29
|
ResponseStore stores = gson.fromJson(result, ResponseStore.class);
|
29
|
30
|
|
30
|
31
|
List<Store> k = stores.getStoreInfos();
|
31
|
|
- System.out.println(result);
|
|
32
|
+ for(Store y : k) {
|
|
33
|
+ System.out.println("가게이름 : " + y.getName());
|
|
34
|
+ }
|
|
35
|
+
|
|
36
|
+
|
32
|
37
|
} catch (IOException e2) {
|
33
|
38
|
// TODO Auto-generated catch block
|
34
|
39
|
e2.printStackTrace();
|
35
|
40
|
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
36
|
47
|
}
|
37
|
48
|
}
|