Skip to content

Commit 33c27cd

Browse files
James RobertsonJames Robertson
authored andcommitted
switch to group parameters and update samples
1 parent 6d24a2d commit 33c27cd

File tree

368 files changed

+19383
-8973
lines changed

Some content is hidden

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

368 files changed

+19383
-8973
lines changed

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,10 @@ class User {
2929
public void listUsers(){
3030

3131
try {
32-
String token = null;
3332
Integer limit = 56;
3433
String activeMode = "activated";
3534
Boolean showBot = true;
36-
String userIds = null;
37-
String nickname = null;
38-
String nicknameStartswith = null;
39-
String metadatakey = null;
40-
String metadatavaluesIn = null;
41-
ListUsersResponse result = apiInstance.listUsers(apiToken, token, limit, activeMode, showBot, userIds, nickname, nicknameStartswith, metadatakey, metadatavaluesIn);
35+
ListUsersResponse result = apiInstance.listUsers().limit(limit).activeMode(activeMode).execute();
4236
System.out.println(result);
4337

4438
} catch (ApiException e) {

api/openapi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20923,4 +20923,5 @@ components:
2092320923
created_at:
2092420924
type: number
2092520925
type: object
20926+
x-group-parameters: true
2092620927

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apply plugin: 'eclipse'
33
apply plugin: 'com.diffplug.spotless'
44

55
group = 'org.sendbird'
6-
version = '0.0.15'
6+
version = '0.0.16'
77

88
buildscript {
99
repositories {

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
22
settings(
33
organization := "org.sendbird",
44
name := "sendbird-platform-sdk",
5-
version := "0.0.15",
5+
version := "0.0.16",
66
scalaVersion := "2.11.4",
77
scalacOptions ++= Seq("-feature"),
88
Compile / javacOptions ++= Seq("-Xlint:deprecation"),

docs/AnnouncementApi.md

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ All URIs are relative to *https://api-APP_ID.sendbird.com*
1717

1818
## getDetailedOpenRateOfAnnouncementGroup
1919

20-
> GetDetailedOpenRateOfAnnouncementGroupResponse getDetailedOpenRateOfAnnouncementGroup(apiToken, announcementGroup)
20+
> GetDetailedOpenRateOfAnnouncementGroupResponse getDetailedOpenRateOfAnnouncementGroup(announcementGroup).apiToken(apiToken).execute();
2121
2222
Get detailed open rate of an announcement group
2323

@@ -47,7 +47,9 @@ public class Example {
4747
String apiToken = "{{API_TOKEN}}"; // String |
4848
String announcementGroup = "announcementGroup_example"; // String |
4949
try {
50-
GetDetailedOpenRateOfAnnouncementGroupResponse result = apiInstance.getDetailedOpenRateOfAnnouncementGroup(apiToken, announcementGroup);
50+
GetDetailedOpenRateOfAnnouncementGroupResponse result = api.getDetailedOpenRateOfAnnouncementGroup(announcementGroup)
51+
.apiToken(apiToken)
52+
.execute();
5153
System.out.println(result);
5254
} catch (ApiException e) {
5355
System.err.println("Exception when calling AnnouncementApi#getDetailedOpenRateOfAnnouncementGroup");
@@ -89,7 +91,7 @@ No authorization required
8991

9092
## getStatistics
9193

92-
> GetStatisticsResponse getStatistics(apiToken)
94+
> GetStatisticsResponse getStatistics().apiToken(apiToken).execute();
9395
9496
Get statistics - weekly
9597

@@ -118,7 +120,9 @@ public class Example {
118120
AnnouncementApi apiInstance = new AnnouncementApi(defaultClient);
119121
String apiToken = "{{API_TOKEN}}"; // String |
120122
try {
121-
GetStatisticsResponse result = apiInstance.getStatistics(apiToken);
123+
GetStatisticsResponse result = api.getStatistics()
124+
.apiToken(apiToken)
125+
.execute();
122126
System.out.println(result);
123127
} catch (ApiException e) {
124128
System.err.println("Exception when calling AnnouncementApi#getStatistics");
@@ -159,7 +163,7 @@ No authorization required
159163

160164
## getStatisticsDaily
161165

162-
> GetStatisticsDailyResponse getStatisticsDaily(apiToken, startDate, endDate, startWeek, endWeek, startMonth, endMonth, announcementGroup)
166+
> GetStatisticsDailyResponse getStatisticsDaily().apiToken(apiToken).startDate(startDate).endDate(endDate).startWeek(startWeek).endWeek(endWeek).startMonth(startMonth).endMonth(endMonth).announcementGroup(announcementGroup).execute();
163167
164168
Get statistics - daily
165169

@@ -195,7 +199,16 @@ public class Example {
195199
String endMonth = "endMonth_example"; // String |
196200
String announcementGroup = "announcementGroup_example"; // String |
197201
try {
198-
GetStatisticsDailyResponse result = apiInstance.getStatisticsDaily(apiToken, startDate, endDate, startWeek, endWeek, startMonth, endMonth, announcementGroup);
202+
GetStatisticsDailyResponse result = api.getStatisticsDaily()
203+
.apiToken(apiToken)
204+
.startDate(startDate)
205+
.endDate(endDate)
206+
.startWeek(startWeek)
207+
.endWeek(endWeek)
208+
.startMonth(startMonth)
209+
.endMonth(endMonth)
210+
.announcementGroup(announcementGroup)
211+
.execute();
199212
System.out.println(result);
200213
} catch (ApiException e) {
201214
System.err.println("Exception when calling AnnouncementApi#getStatisticsDaily");
@@ -243,7 +256,7 @@ No authorization required
243256

244257
## getStatisticsMonthly
245258

246-
> GetStatisticsMonthlyResponse getStatisticsMonthly(apiToken)
259+
> GetStatisticsMonthlyResponse getStatisticsMonthly().apiToken(apiToken).execute();
247260
248261
Get statistics - monthly
249262

@@ -272,7 +285,9 @@ public class Example {
272285
AnnouncementApi apiInstance = new AnnouncementApi(defaultClient);
273286
String apiToken = "{{API_TOKEN}}"; // String |
274287
try {
275-
GetStatisticsMonthlyResponse result = apiInstance.getStatisticsMonthly(apiToken);
288+
GetStatisticsMonthlyResponse result = api.getStatisticsMonthly()
289+
.apiToken(apiToken)
290+
.execute();
276291
System.out.println(result);
277292
} catch (ApiException e) {
278293
System.err.println("Exception when calling AnnouncementApi#getStatisticsMonthly");
@@ -313,7 +328,7 @@ No authorization required
313328

314329
## listAnnouncementGroups
315330

316-
> ListAnnouncementGroupsResponse listAnnouncementGroups(apiToken, token, limit)
331+
> ListAnnouncementGroupsResponse listAnnouncementGroups().apiToken(apiToken).token(token).limit(limit).execute();
317332
318333
List announcement groups
319334

@@ -344,7 +359,11 @@ public class Example {
344359
String token = "token_example"; // String |
345360
Integer limit = 56; // Integer |
346361
try {
347-
ListAnnouncementGroupsResponse result = apiInstance.listAnnouncementGroups(apiToken, token, limit);
362+
ListAnnouncementGroupsResponse result = api.listAnnouncementGroups()
363+
.apiToken(apiToken)
364+
.token(token)
365+
.limit(limit)
366+
.execute();
348367
System.out.println(result);
349368
} catch (ApiException e) {
350369
System.err.println("Exception when calling AnnouncementApi#listAnnouncementGroups");
@@ -387,7 +406,7 @@ No authorization required
387406

388407
## scheduleAnnouncement
389408

390-
> ScheduleAnnouncementResponse scheduleAnnouncement(apiToken, scheduleAnnouncementData)
409+
> ScheduleAnnouncementResponse scheduleAnnouncement().apiToken(apiToken).scheduleAnnouncementData(scheduleAnnouncementData).execute();
391410
392411
Schedule an announcement
393412

@@ -416,7 +435,10 @@ public class Example {
416435
String apiToken = "{{API_TOKEN}}"; // String |
417436
ScheduleAnnouncementData scheduleAnnouncementData = new ScheduleAnnouncementData(); // ScheduleAnnouncementData |
418437
try {
419-
ScheduleAnnouncementResponse result = apiInstance.scheduleAnnouncement(apiToken, scheduleAnnouncementData);
438+
ScheduleAnnouncementResponse result = api.scheduleAnnouncement()
439+
.apiToken(apiToken)
440+
.scheduleAnnouncementData(scheduleAnnouncementData)
441+
.execute();
420442
System.out.println(result);
421443
} catch (ApiException e) {
422444
System.err.println("Exception when calling AnnouncementApi#scheduleAnnouncement");
@@ -458,7 +480,7 @@ No authorization required
458480

459481
## updateAnnouncementById
460482

461-
> UpdateAnnouncementByIdResponse updateAnnouncementById(apiToken, uniqueId, updateAnnouncementByIdData)
483+
> UpdateAnnouncementByIdResponse updateAnnouncementById(uniqueId).apiToken(apiToken).updateAnnouncementByIdData(updateAnnouncementByIdData).execute();
462484
463485
Update an announcement
464486

@@ -491,7 +513,10 @@ public class Example {
491513
String uniqueId = "uniqueId_example"; // String |
492514
UpdateAnnouncementByIdData updateAnnouncementByIdData = new UpdateAnnouncementByIdData(); // UpdateAnnouncementByIdData |
493515
try {
494-
UpdateAnnouncementByIdResponse result = apiInstance.updateAnnouncementById(apiToken, uniqueId, updateAnnouncementByIdData);
516+
UpdateAnnouncementByIdResponse result = api.updateAnnouncementById(uniqueId)
517+
.apiToken(apiToken)
518+
.updateAnnouncementByIdData(updateAnnouncementByIdData)
519+
.execute();
495520
System.out.println(result);
496521
} catch (ApiException e) {
497522
System.err.println("Exception when calling AnnouncementApi#updateAnnouncementById");
@@ -534,7 +559,7 @@ No authorization required
534559

535560
## viewAnnouncementById
536561

537-
> ViewAnnouncementByIdResponse viewAnnouncementById(apiToken, uniqueId)
562+
> ViewAnnouncementByIdResponse viewAnnouncementById(uniqueId).apiToken(apiToken).execute();
538563
539564
View an announcement
540565

@@ -564,7 +589,9 @@ public class Example {
564589
String apiToken = "{{API_TOKEN}}"; // String |
565590
String uniqueId = "uniqueId_example"; // String |
566591
try {
567-
ViewAnnouncementByIdResponse result = apiInstance.viewAnnouncementById(apiToken, uniqueId);
592+
ViewAnnouncementByIdResponse result = api.viewAnnouncementById(uniqueId)
593+
.apiToken(apiToken)
594+
.execute();
568595
System.out.println(result);
569596
} catch (ApiException e) {
570597
System.err.println("Exception when calling AnnouncementApi#viewAnnouncementById");

0 commit comments

Comments
 (0)