File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ repositories {
1717}
1818
1919dependencies {
20- compile 'com.github.amatkivskiy:gitter.rx.sdk:1.0 .0'
20+ compile 'com.github.amatkivskiy:gitter.rx.sdk:1.1 .0'
2121}
2222```
2323
@@ -44,10 +44,14 @@ dependencies {
4444- Send a message
4545- Update a message
4646
47+ * Streaming*
48+ - Room messages stream
49+
4750## Description
4851This SDK consists of two parts:
4952- * Authentication API*
5053- * Rest API implementation*
54+ - * Streaming API implementation*
5155
5256** Authentication**
5357Please read [ Authentication] ( https://developer.gitter.im/docs/authentication ) on ** Gitter Developer** article before.
@@ -129,6 +133,21 @@ client.getUserChannels("user_id").subscribe(new Action1<List<RoomResponse>>() {
129133 });
130134```
131135
136+ ## How to get streaming data from Gitter Streaming API
137+ ```
138+ RxGitterStreamingApiClient client = new RxGitterStreamingApiClient.Builder()
139+ .withAccountToken("user_access_token")
140+ .build();
141+
142+ String roomId = "room_id";
143+
144+ client.getRoomMessagesStream(roomId).subscribe(new Action1<MessageResponse>() {
145+ @Override
146+ public void call(MessageResponse messageResponse) {
147+ System.out.println("messageResponse = " + messageResponse);
148+ }
149+ });
150+ ```
132151Thats all =).
133152
134153## Samples
You can’t perform that action at this time.
0 commit comments