-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPayments.java
More file actions
33 lines (27 loc) · 1.11 KB
/
Payments.java
File metadata and controls
33 lines (27 loc) · 1.11 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
package examples.market;
// java examples/market/Payments.java YOUR_TOKEN
//
// Баланс и история платежей.
import com.lolzteam.LolzteamClient;
import com.lolzteam.models.*;
public class Payments {
public static void main(String[] args) throws Exception {
String token = args[0];
LolzteamClient client = LolzteamClient.create(token);
System.out.println("--- баланс ---");
try {
ProfileGetResponse resp = client.market().profileGet(null);
System.out.println("profile: " + resp.getUser());
} catch (Exception e) {
System.err.println("err: " + e.getMessage());
}
System.out.println("\n--- история платежей ---");
try {
PaymentsHistoryResponse resp = client.market().paymentsHistory(null, null, null, null, null, null, null, null, null, null, null, null, null, null, null);
System.out.println("payments: " + resp);
} catch (Exception e) {
System.err.println("err: " + e.getMessage());
}
System.out.println("\ndone");
}
}