-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOrders.java
More file actions
34 lines (28 loc) · 1.26 KB
/
Orders.java
File metadata and controls
34 lines (28 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package examples.market;
// java examples/market/Orders.java YOUR_TOKEN
//
// Мои заказы и список категорий.
import com.lolzteam.LolzteamClient;
import com.lolzteam.models.*;
public class Orders {
public static void main(String[] args) throws Exception {
String token = args[0];
LolzteamClient client = LolzteamClient.create(token);
System.out.println("--- мои заказы ---");
try {
ItemList resp = client.market().listOrders(null, null, null, "active", null, null, null, null, null, null, null, null, null, null, null);
System.out.println("orders: " + resp.getItems());
} catch (Exception e) {
System.err.println("err: " + e.getMessage());
}
System.out.println("\n--- список категорий ---");
try {
CategoryListResponse resp = client.market().categoryList(null);
System.out.println("categories: " + resp);
} catch (Exception e) {
System.err.println("skip: " + e.getMessage());
}
System.out.println("\nНОТА: создание заказа не выполнено (используй publishingAdd для создания)");
System.out.println("done");
}
}