-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGetAccountExample.java
More file actions
37 lines (24 loc) · 908 Bytes
/
GetAccountExample.java
File metadata and controls
37 lines (24 loc) · 908 Bytes
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
package requests;
import dev.spoocy.genius.GeniusClient;
import dev.spoocy.genius.core.TextFormat;
/**
* @author Spoocy99 | GitHub: Spoocy99
*/
public class GetAccountExample {
private final GeniusClient client = GeniusClient.builder()
.clientId("your_client_id")
.clientSecret("your_client_secret")
.accessToken("your_access_token")
.build();
private void execute() {
client.getAccount(TextFormat.PLAIN)
.doOnError(e -> {
System.out.println("Error: " + e.getMessage());
})
.subscribe(account -> {
System.out.println("Name: " + account.getName());
System.out.println("Email: " + account.getEmail());
System.out.println("About me: " + account.getAboutMe(TextFormat.PLAIN));
});
}
}