-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarketCategories.java
More file actions
49 lines (41 loc) · 1.65 KB
/
MarketCategories.java
File metadata and controls
49 lines (41 loc) · 1.65 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package examples.market;
// java examples/market/MarketCategories.java YOUR_TOKEN
//
// Категории маркета, поиск по платформам, параметры.
import com.lolzteam.LolzteamClient;
import com.lolzteam.models.*;
public class MarketCategories {
public static void main(String[] args) throws Exception {
String token = args[0];
LolzteamClient client = LolzteamClient.create(token);
System.out.println("--- categories ---");
try {
CategoryListResponse resp = client.market().categoryList(null);
System.out.println("categories: " + resp);
} catch (Exception e) {
System.err.println(" err: " + e.getMessage());
}
System.out.println("\n--- steam params ---");
try {
CategoryParamsResponse resp = client.market().categoryParams("steam");
System.out.println("params: " + resp);
} catch (Exception e) {
System.err.println(" err: " + e.getMessage());
}
System.out.println("\n--- steam games ---");
try {
CategoryGamesResponse resp = client.market().categoryGames("steam");
System.out.println("games: " + resp);
} catch (Exception e) {
System.err.println(" err: " + e.getMessage());
}
System.out.println("\n--- currency ---");
try {
PaymentsCurrencyResponse resp = client.market().paymentsCurrency();
System.out.println("currency: " + resp);
} catch (Exception e) {
System.err.println(" err: " + e.getMessage());
}
System.out.println("\ndone");
}
}