Skip to content

Commit ac1fcb3

Browse files
committed
Updates from version 1.1.0
1 parent e5163eb commit ac1fcb3

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ repositories {
1717
}
1818
1919
dependencies {
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
4851
This SDK consists of two parts:
4952
- *Authentication API*
5053
- *Rest API implementation*
54+
- *Streaming API implementation*
5155

5256
**Authentication**
5357
Please 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+
```
132151
Thats all =).
133152

134153
## Samples

0 commit comments

Comments
 (0)