Skip to content

Commit c8ec902

Browse files
author
Ahmad Nurjalal
committed
docs: update README.md
1 parent c7c1661 commit c8ec902

File tree

1 file changed

+71
-24
lines changed

1 file changed

+71
-24
lines changed

README.md

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,58 @@
11
# AccelByte Java SDK
22

3-
## Initializing
3+
## Setup
44

5-
First, you have to set environment variable :
5+
### 1. Adding SDK to gradle file
66

7-
`MY_BASE_URL` (Required)
7+
Add this code below to `build.gradle` file on your project,
8+
Replace `{VERSION}` with a specific release version tag.
9+
check available tag in this repo : <a href="https://github.com/AccelByte/accelbyte-java-sdk">accelbyte-java-sdk</a>:
810

9-
`MY_CLIENT_ID` (Required)
11+
```java
12+
repositories {
13+
mavenCentral()
14+
maven {
15+
url 'https://nexus.accelbyte.net/repository/maven-releases/'
16+
}
17+
}
1018

11-
`MY_CLIENT_SECRET` (Required if using private OAuth client only)
19+
dependencies {
20+
implementation 'net.accelbyte.sdk:sdk:{VERSION}'
21+
}
22+
```
1223

13-
Then, you'll have to instantiate AccelByteConfig and AccelByteSDK the SDK. this is the example how to instantiate it:
24+
### 2. Set the environment variables :
25+
You have to declare these environment variables below:
1426

15-
```java
16-
package example.java.co;
17-
18-
import net.accelbyte.sdk.core.AccelByteConfig;
19-
import net.accelbyte.sdk.core.AccelByteSDK;
20-
import net.accelbyte.sdk.core.client.OkhttpClient;
21-
import net.accelbyte.sdk.core.repository.ConfigRepositoryImpl;
22-
import net.accelbyte.sdk.core.repository.TokenRepositoryImpl;
27+
`AB_BASE_URL` (Required)
2328

24-
public class Main {
25-
public static void main(String[] args) {
26-
AccelByteConfig config = new AccelByteConfig(
27-
new OkhttpClient(),
28-
TokenRepositoryImpl.getInstance(),
29-
new ConfigRepositoryImpl());
30-
AccelByteSDK sdk = new AccelByteSDK(config);
31-
}
32-
}
29+
`AB_CLIENT_ID` (Required)
3330

34-
```
31+
`AB_CLIENT_SECRET` (Required if you use private OAuth client only)
32+
33+
34+
## Initializing SDK
35+
You'll have to create AccelByteConfig and AccelByteSDK object. This is the example how to create them:
36+
37+
```java
38+
package example.java.co;
39+
40+
import net.accelbyte.sdk.core.AccelByteConfig;
41+
import net.accelbyte.sdk.core.AccelByteSDK;
42+
import net.accelbyte.sdk.core.client.OkhttpClient;
43+
import net.accelbyte.sdk.core.repository.ConfigRepositoryImpl;
44+
import net.accelbyte.sdk.core.repository.TokenRepositoryImpl;
45+
46+
public class Main {
47+
public static void main(String[] args) {
48+
AccelByteConfig config = new AccelByteConfig(
49+
new OkhttpClient(),
50+
TokenRepositoryImpl.getInstance(),
51+
new ConfigRepositoryImpl());
52+
AccelByteSDK sdk = new AccelByteSDK(config);
53+
}
54+
}
55+
```
3556

3657
## Logging In
3758

@@ -127,3 +148,29 @@ public class Main {
127148
}
128149
}
129150
}
151+
```
152+
153+
## API Covered:
154+
All the REST-API from all AccelByte services are included (the websocket on lobby service is not covered yet).
155+
156+
Below are the list of services covered on the SDK:
157+
1. achievement
158+
2. basic
159+
3. cloudsave
160+
4. DS Log Manager
161+
5. DSMC
162+
6. eventlog
163+
7. game telemetry
164+
8. GDPR
165+
9. group
166+
10. IAM
167+
11. leaderboard
168+
12. legal
169+
13. lobby
170+
14. matchmaking
171+
15. platform
172+
16. QoSM
173+
17. season pass
174+
18. session browser
175+
19. social
176+
20. UGC

0 commit comments

Comments
 (0)