Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
# Conflicts:
#	library/rx/build.gradle
  • Loading branch information
amatkivskiy committed Jan 4, 2018
2 parents 755886e + 1e32091 commit 9cc308b
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: java
jdk: oraclejdk7
jdk: oraclejdk8
before_install:
- chmod +x gradlew
script:
Expand Down
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It provides three approaches to work with API:
- [Faye](#Faye)
- [Samples](#Samples)

###<a name="Setup">**Setup**
### <a name="Setup">**Setup**
Add gradle dependency:

For RxJava:
Expand All @@ -39,7 +39,7 @@ repositories {
}
dependencies {
compile 'com.github.amatkivskiy:gitter.sdk.rx:1.6.0'
compile 'com.github.amatkivskiy:gitter.sdk.rx:1.6.1'
}
```

Expand All @@ -50,7 +50,7 @@ repositories {
}
dependencies {
compile 'com.github.amatkivskiy:gitter.sdk.async:1.6.0'
compile 'com.github.amatkivskiy:gitter.sdk.async:1.6.1'
}
```

Expand All @@ -61,11 +61,16 @@ repositories {
}
dependencies {
compile 'com.github.amatkivskiy:gitter.sdk.sync:1.6.0'
compile 'com.github.amatkivskiy:gitter.sdk.sync:1.6.1'
}
```

###<a name="ReleaseNotes">**Release notes**
### <a name="ReleaseNotes">**Release notes**
- **1.6.1** (04.01.2018)
- *Rx,Async,Sync:*
- Add `getRoomIdByUri` to room API
- Update dependencies used in the SDK

- **1.6.0** (12.01.2017)
- *RoomResponse:*
- Remove `favouriteOrder`
Expand Down Expand Up @@ -117,7 +122,7 @@ dependencies {
- **1.1.0**
- Added room messages streaming API.

###<a name="Features">**Features**
### <a name="Features">**Features**

- Authentication

Expand Down Expand Up @@ -153,7 +158,7 @@ dependencies {
- Room user presence events
- Room user managment events

###<a name="Description">**Description**
### <a name="Description">**Description**

**Authentication**
Please read [Authentication](https://developer.gitter.im/docs/authentication) article on **Gitter Developer** before.
Expand Down Expand Up @@ -344,7 +349,7 @@ List<RoomResponse> rooms = client.getUserChannels("user_id");
System.out.println("Received " + rooms.size() + " rooms");
```

###<a name="Streaming">**How to get streaming data from Gitter Streaming API**
### <a name="Streaming">**How to get streaming data from Gitter Streaming API**

### :heavy_exclamation_mark: Please don't set any log level for *RxGitterStreamingApiClient* as it blocks the stream.
:heavy_exclamation_mark: If you get `java.net.SocketTimeoutException: Read timed out` try to encrease `ReadTimeout` in your `retrofit.client.Client` and spicify this client for `GutterApiClient` (`withClient()`).
Expand Down Expand Up @@ -382,7 +387,7 @@ client.getRoomEventsStream(roomId).subscribe(new Action1<RoomEvent>() {
});
```

###<a name="Faye">**How to work with Gitter Faye API**
### <a name="Faye">**How to work with Gitter Faye API**

1 Setup ```AsyncGitterFayeClient```:

Expand Down Expand Up @@ -494,7 +499,7 @@ client.disconnect();

Thats all =).

###<a name="Samples">**Samples**
### <a name="Samples">**Samples**

You can see some code samples [here](https://github.com/Gitteroid/GitterJavaSDK/tree/master/samples/src/main/java/com/amatkivskiy/gitter/sdk/samples)

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
}

allprojects {
version '1.6.0'
version '1.6.1'

repositories {
jcenter()
Expand Down
6 changes: 3 additions & 3 deletions library/async/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ artifacts {
publish {
groupId = 'com.github.amatkivskiy'
artifactId = 'gitter.sdk.async'
publishVersion = '1.6.0'
publishVersion = '1.6.1'
desc = 'Gitter.im Java SDK that facilitates communication with Gitter API and Gitter Faye API'
licences = ['MIT']
website = 'https://github.com/Gitteroid/GitterJavaSDK'
Expand All @@ -32,6 +32,6 @@ dependencies {
compile project(':library:core')
// compile 'com.github.amatkivskiy:gitter.sdk.core:1.6.0'

compile 'com.squareup.okio:okio:1.6.0'
compile 'com.squareup.okhttp3:okhttp:3.5.0'
compile 'com.squareup.okio:okio:1.13.0'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ void searchUsers(
void searchUsers(@Query("q") String searchTerm, Callback<SearchUsersResponse> callback);

// Rooms Api
@POST("/rooms")
@FormUrlEncoded
void getRoomIdByUri(@Field("uri") String uri, Callback<RoomResponse> callback);

@GET("/rooms/{roomId}")
void getRoomById(@Path("roomId") String roomId, Callback<RoomResponse> callback);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ public void failure(RetrofitError error) {
}

// Rooms API
public void getRoomIdByUri(String uri, Callback<RoomResponse> callback) {
api.getRoomIdByUri(uri, callback);
}

public void getRoomUsers(String roomId, Callback<List<UserResponse>> callback) {
api.getRoomUsers(roomId, callback);
}
Expand Down
8 changes: 4 additions & 4 deletions library/rx/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ artifacts {
publish {
groupId = 'com.github.amatkivskiy'
artifactId = 'gitter.sdk.rx'
publishVersion = '1.6.0'
publishVersion = '1.6.1'
desc = 'Gitter.im RxJava SDK that facilitates communication with Gitter API'
licences = ['MIT']
website = 'https://github.com/Gitteroid/GitterJavaSDK'
Expand All @@ -38,9 +38,9 @@ publish {
}

dependencies {
// compile 'com.github.amatkivskiy:gitter.sdk.core:1.6.0'
compile project(':library:core')
compile 'io.reactivex:rxjava:1.1.0'
compile 'com.github.amatkivskiy:gitter.sdk.core:1.6.0'
// compile project(':library:core')
compile 'io.reactivex:rxjava:1.3.4'

testCompile 'org.mockito:mockito-core:2.1.0-RC.1'
testCompile 'junit:junit:4.12'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ public interface RxGitterApi {
Observable<SearchUsersResponse> searchUsers(@Query("q") String searchTerm);

// Rooms API
@POST("/rooms")
@FormUrlEncoded
Observable<RoomResponse> getRoomIdByUri(@Field("uri") String uri);

@GET("/rooms/{roomId}")
Observable<RoomResponse> getRoomById(@Path("roomId") String roomId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ public List<UserResponse> call(SearchUsersResponse searchUsersResponse) {
}

// Rooms API
public Observable<RoomResponse> getRoomIdByUri(String uri) {
return api.getRoomIdByUri(uri);
}

public Observable<RoomResponse> getRoomById(String roomId) {
return api.getRoomById(roomId);
}
Expand Down
2 changes: 1 addition & 1 deletion library/sync/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ artifacts {
publish {
groupId = 'com.github.amatkivskiy'
artifactId = 'gitter.sdk.sync'
publishVersion = '1.6.0'
publishVersion = '1.6.1'
desc = 'Gitter.im Java SDK that facilitates communication with Gitter API'
licences = ['MIT']
website = 'https://github.com/Gitteroid/GitterJavaSDK'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ public interface SyncGitterApi {
SearchUsersResponse searchUsers(@Query("q") String searchTerm);

// Rooms API
@POST("/rooms")
@FormUrlEncoded
RoomResponse getRoomIdByUri(@Field("uri") String uri);

@GET("/rooms/{roomId}")
RoomResponse getRoomById(@Path("roomId") String roomId);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ public List<RoomResponse> getCurrentUserRooms() {
}

// Rooms API
public RoomResponse getRoomIdByUri(String uri) {
return api.getRoomIdByUri(uri);
}

public RoomResponse getUserRooms(String userId) {
return api.getUserRooms(userId);
}
Expand Down
3 changes: 0 additions & 3 deletions samples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ dependencies {
compile project(':library:async')
compile project(':library:sync')

compile 'com.squareup.okio:okio:1.6.0'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.okhttp:okhttp-ws:2.5.0'
compile 'com.appunite:websockets-rxjava:3.0.0'
}

0 comments on commit 9cc308b

Please sign in to comment.