-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added extra parameters for Rooms/Users search
- Loading branch information
1 parent
6680826
commit b5aa567
Showing
7 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...y/core/src/main/java/com/amatkivskiy/gitter/sdk/model/request/RoomUsersRequestParams.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.amatkivskiy.gitter.sdk.model.request; | ||
|
||
public class RoomUsersRequestParams { | ||
public final String searchQuery; | ||
public final Integer skipCount; | ||
public final Integer limit; | ||
|
||
private RoomUsersRequestParams(String searchQuery, Integer skipCount, Integer limit) { | ||
this.searchQuery = searchQuery; | ||
this.skipCount = skipCount; | ||
this.limit = limit; | ||
} | ||
|
||
public static class RoomUsersRequestParamsBuilder { | ||
private String searchQuery; | ||
private Integer skipCount; | ||
private Integer limit; | ||
|
||
public RoomUsersRequestParamsBuilder() { | ||
//Api default values | ||
this.searchQuery = ""; | ||
this.skipCount = 0; | ||
this.limit = 30; | ||
} | ||
|
||
public RoomUsersRequestParamsBuilder skip(int skipCount) { | ||
this.skipCount = skipCount; | ||
return this; | ||
} | ||
|
||
public RoomUsersRequestParamsBuilder limit(int limit) { | ||
this.limit = limit; | ||
return this; | ||
} | ||
|
||
public RoomUsersRequestParamsBuilder searchQuery(String query) { | ||
this.searchQuery = query; | ||
return this; | ||
} | ||
|
||
public RoomUsersRequestParams build() { | ||
return new RoomUsersRequestParams(searchQuery, skipCount, limit); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters