Skip to content

Commit 176250d

Browse files
Merge pull request #16 from sendbird/develop
Update to 1.0.17
2 parents ac4aff3 + 03b3452 commit 176250d

File tree

410 files changed

+15899
-3701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

410 files changed

+15899
-3701
lines changed

.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/aws.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/jarRepositories.xml

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.openapi-generator/FILES

Lines changed: 44 additions & 312 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -17,36 +17,37 @@ import org.sendbird.client.Configuration;
1717
import org.sendbird.client.api.UserApi;
1818
import org.openapitools.client.model.ListUsersResponse;
1919

20-
class User {
21-
ApiClient defaultClient;
22-
String apiToken = "YOUR_API_KEY_FROM_DASHBOARD";
23-
UserApi apiInstance;
24-
public User(ApiClient defaultClient){
25-
apiInstance = new UserApi(defaultClient);
26-
}
27-
public void listUsers(){
28-
29-
try {
30-
Integer limit = 56;
31-
String activeMode = "activated";
32-
Boolean showBot = true;
33-
ListUsersResponse result = apiInstance.listUsers().apiToken(apiToken).limit(limit).activeMode(activeMode).execute();
34-
System.out.println(result);
35-
36-
} catch (ApiException e) {
37-
System.err.println("Exception when calling listUsers");
38-
System.err.println("Status code: " + e.getCode());
39-
System.err.println("Reason: " + e.getResponseBody());
40-
System.err.println("Response headers: " + e.getResponseHeaders());
41-
e.printStackTrace();
20+
21+
class AppTest {
22+
static class User {
23+
UserApi apiInstance;
24+
public User(ApiClient defaultClient){
25+
apiInstance = new UserApi(defaultClient);
26+
}
27+
public void listUsers(){
28+
29+
try {
30+
Integer limit = 56;
31+
String activeMode = "activated";
32+
Boolean showBot = true;
33+
ListUsersResponse result = apiInstance.listUsers().limit(limit).activeMode(activeMode).execute();
34+
System.out.println(result);
35+
36+
} catch (ApiException e) {
37+
System.err.println("Exception when calling listUsers");
38+
System.err.println("Status code: " + e.getCode());
39+
System.err.println("Reason: " + e.getResponseBody());
40+
System.err.println("Response headers: " + e.getResponseHeaders());
41+
e.printStackTrace();
42+
}
4243
}
4344
}
44-
}
4545

46-
class App {
4746
public static void main(String[] args) {
48-
ApiClient defaultClient = Configuration.getDefaultApiClient();
49-
defaultClient.setBasePath("https://api-YOUR_APP_ID_FROM_DASHBOARD.sendbird.com");
47+
String apiToken = "YOUR_API_TOKEN";
48+
String applicationId = "YOUR_APP_ID_FROM_DASHBOARD";
49+
ApiClient defaultClient = Configuration.getDefaultApiClient().addDefaultHeader("Api-Token", apiToken);
50+
defaultClient.setBasePath("https://api-" + applicationId + ".sendbird.com");
5051
User user = new User(defaultClient);
5152
user.listUsers();
5253
}

0 commit comments

Comments
 (0)