Skip to content

Commit

Permalink
switch to group parameters and update samples
Browse files Browse the repository at this point in the history
  • Loading branch information
James Robertson authored and James Robertson committed Nov 7, 2022
1 parent 6d24a2d commit 33c27cd
Show file tree
Hide file tree
Showing 368 changed files with 19,383 additions and 8,973 deletions.
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,10 @@ class User {
public void listUsers(){

try {
String token = null;
Integer limit = 56;
String activeMode = "activated";
Boolean showBot = true;
String userIds = null;
String nickname = null;
String nicknameStartswith = null;
String metadatakey = null;
String metadatavaluesIn = null;
ListUsersResponse result = apiInstance.listUsers(apiToken, token, limit, activeMode, showBot, userIds, nickname, nicknameStartswith, metadatakey, metadatavaluesIn);
ListUsersResponse result = apiInstance.listUsers().limit(limit).activeMode(activeMode).execute();
System.out.println(result);

} catch (ApiException e) {
Expand Down
1 change: 1 addition & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20923,4 +20923,5 @@ components:
created_at:
type: number
type: object
x-group-parameters: true

2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'eclipse'
apply plugin: 'com.diffplug.spotless'

group = 'org.sendbird'
version = '0.0.15'
version = '0.0.16'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "org.sendbird",
name := "sendbird-platform-sdk",
version := "0.0.15",
version := "0.0.16",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
Compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
59 changes: 43 additions & 16 deletions docs/AnnouncementApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ All URIs are relative to *https://api-APP_ID.sendbird.com*

## getDetailedOpenRateOfAnnouncementGroup

> GetDetailedOpenRateOfAnnouncementGroupResponse getDetailedOpenRateOfAnnouncementGroup(apiToken, announcementGroup)
> GetDetailedOpenRateOfAnnouncementGroupResponse getDetailedOpenRateOfAnnouncementGroup(announcementGroup).apiToken(apiToken).execute();
Get detailed open rate of an announcement group

Expand Down Expand Up @@ -47,7 +47,9 @@ public class Example {
String apiToken = "{{API_TOKEN}}"; // String |
String announcementGroup = "announcementGroup_example"; // String |
try {
GetDetailedOpenRateOfAnnouncementGroupResponse result = apiInstance.getDetailedOpenRateOfAnnouncementGroup(apiToken, announcementGroup);
GetDetailedOpenRateOfAnnouncementGroupResponse result = api.getDetailedOpenRateOfAnnouncementGroup(announcementGroup)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#getDetailedOpenRateOfAnnouncementGroup");
Expand Down Expand Up @@ -89,7 +91,7 @@ No authorization required

## getStatistics

> GetStatisticsResponse getStatistics(apiToken)
> GetStatisticsResponse getStatistics().apiToken(apiToken).execute();
Get statistics - weekly

Expand Down Expand Up @@ -118,7 +120,9 @@ public class Example {
AnnouncementApi apiInstance = new AnnouncementApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
try {
GetStatisticsResponse result = apiInstance.getStatistics(apiToken);
GetStatisticsResponse result = api.getStatistics()
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#getStatistics");
Expand Down Expand Up @@ -159,7 +163,7 @@ No authorization required

## getStatisticsDaily

> GetStatisticsDailyResponse getStatisticsDaily(apiToken, startDate, endDate, startWeek, endWeek, startMonth, endMonth, announcementGroup)
> GetStatisticsDailyResponse getStatisticsDaily().apiToken(apiToken).startDate(startDate).endDate(endDate).startWeek(startWeek).endWeek(endWeek).startMonth(startMonth).endMonth(endMonth).announcementGroup(announcementGroup).execute();
Get statistics - daily

Expand Down Expand Up @@ -195,7 +199,16 @@ public class Example {
String endMonth = "endMonth_example"; // String |
String announcementGroup = "announcementGroup_example"; // String |
try {
GetStatisticsDailyResponse result = apiInstance.getStatisticsDaily(apiToken, startDate, endDate, startWeek, endWeek, startMonth, endMonth, announcementGroup);
GetStatisticsDailyResponse result = api.getStatisticsDaily()
.apiToken(apiToken)
.startDate(startDate)
.endDate(endDate)
.startWeek(startWeek)
.endWeek(endWeek)
.startMonth(startMonth)
.endMonth(endMonth)
.announcementGroup(announcementGroup)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#getStatisticsDaily");
Expand Down Expand Up @@ -243,7 +256,7 @@ No authorization required

## getStatisticsMonthly

> GetStatisticsMonthlyResponse getStatisticsMonthly(apiToken)
> GetStatisticsMonthlyResponse getStatisticsMonthly().apiToken(apiToken).execute();
Get statistics - monthly

Expand Down Expand Up @@ -272,7 +285,9 @@ public class Example {
AnnouncementApi apiInstance = new AnnouncementApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
try {
GetStatisticsMonthlyResponse result = apiInstance.getStatisticsMonthly(apiToken);
GetStatisticsMonthlyResponse result = api.getStatisticsMonthly()
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#getStatisticsMonthly");
Expand Down Expand Up @@ -313,7 +328,7 @@ No authorization required

## listAnnouncementGroups

> ListAnnouncementGroupsResponse listAnnouncementGroups(apiToken, token, limit)
> ListAnnouncementGroupsResponse listAnnouncementGroups().apiToken(apiToken).token(token).limit(limit).execute();
List announcement groups

Expand Down Expand Up @@ -344,7 +359,11 @@ public class Example {
String token = "token_example"; // String |
Integer limit = 56; // Integer |
try {
ListAnnouncementGroupsResponse result = apiInstance.listAnnouncementGroups(apiToken, token, limit);
ListAnnouncementGroupsResponse result = api.listAnnouncementGroups()
.apiToken(apiToken)
.token(token)
.limit(limit)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#listAnnouncementGroups");
Expand Down Expand Up @@ -387,7 +406,7 @@ No authorization required

## scheduleAnnouncement

> ScheduleAnnouncementResponse scheduleAnnouncement(apiToken, scheduleAnnouncementData)
> ScheduleAnnouncementResponse scheduleAnnouncement().apiToken(apiToken).scheduleAnnouncementData(scheduleAnnouncementData).execute();
Schedule an announcement

Expand Down Expand Up @@ -416,7 +435,10 @@ public class Example {
String apiToken = "{{API_TOKEN}}"; // String |
ScheduleAnnouncementData scheduleAnnouncementData = new ScheduleAnnouncementData(); // ScheduleAnnouncementData |
try {
ScheduleAnnouncementResponse result = apiInstance.scheduleAnnouncement(apiToken, scheduleAnnouncementData);
ScheduleAnnouncementResponse result = api.scheduleAnnouncement()
.apiToken(apiToken)
.scheduleAnnouncementData(scheduleAnnouncementData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#scheduleAnnouncement");
Expand Down Expand Up @@ -458,7 +480,7 @@ No authorization required

## updateAnnouncementById

> UpdateAnnouncementByIdResponse updateAnnouncementById(apiToken, uniqueId, updateAnnouncementByIdData)
> UpdateAnnouncementByIdResponse updateAnnouncementById(uniqueId).apiToken(apiToken).updateAnnouncementByIdData(updateAnnouncementByIdData).execute();
Update an announcement

Expand Down Expand Up @@ -491,7 +513,10 @@ public class Example {
String uniqueId = "uniqueId_example"; // String |
UpdateAnnouncementByIdData updateAnnouncementByIdData = new UpdateAnnouncementByIdData(); // UpdateAnnouncementByIdData |
try {
UpdateAnnouncementByIdResponse result = apiInstance.updateAnnouncementById(apiToken, uniqueId, updateAnnouncementByIdData);
UpdateAnnouncementByIdResponse result = api.updateAnnouncementById(uniqueId)
.apiToken(apiToken)
.updateAnnouncementByIdData(updateAnnouncementByIdData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#updateAnnouncementById");
Expand Down Expand Up @@ -534,7 +559,7 @@ No authorization required

## viewAnnouncementById

> ViewAnnouncementByIdResponse viewAnnouncementById(apiToken, uniqueId)
> ViewAnnouncementByIdResponse viewAnnouncementById(uniqueId).apiToken(apiToken).execute();
View an announcement

Expand Down Expand Up @@ -564,7 +589,9 @@ public class Example {
String apiToken = "{{API_TOKEN}}"; // String |
String uniqueId = "uniqueId_example"; // String |
try {
ViewAnnouncementByIdResponse result = apiInstance.viewAnnouncementById(apiToken, uniqueId);
ViewAnnouncementByIdResponse result = api.viewAnnouncementById(uniqueId)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnnouncementApi#viewAnnouncementById");
Expand Down
Loading

0 comments on commit 33c27cd

Please sign in to comment.