File tree 2 files changed +35
-6
lines changed
2 files changed +35
-6
lines changed Original file line number Diff line number Diff line change 1
1
# JavaPhoenixClient
2
2
3
3
4
- ## Java Client for Phoenix Channels
4
+ JavaPhoenixClient is a Kotlin implementation of the [ phoenix.js ] ( https://hexdocs.pm/phoenix/js/ ) client used to manage Phoenix channels.
5
5
6
- JavaPhoenixClient is a Kotlin implementation of the `[ phoenix.js] client used to manage Phoenix channels.
7
6
7
+ ### Basic Usage
8
8
9
9
``` kotlin
10
10
@@ -16,9 +16,9 @@ fun connectToChatRoom() {
16
16
17
17
// Listen to events on the Socket
18
18
socket.logger = { Log .d(" TAG" , it) }
19
- socket.onOpen { Timber .d(" Socket Opened" ) }
20
- socket.onClose { Timber .d(" Socket Closed" ) }
21
- socket.onError { Timber .d(it, " Socket Error" ) }
19
+ socket.onOpen { Log .d(" TAG " , " Socket Opened" ) }
20
+ socket.onClose { Log .d(" TAG " , " Socket Closed" ) }
21
+ socket.onError { Log .d(it, " TAG " , " Socket Error" ) }
22
22
23
23
socket.connect()
24
24
@@ -34,3 +34,32 @@ fun connectToChatRoom() {
34
34
.receive(" error" ) { /* failed to join the chatroom */ }
35
35
}
36
36
```
37
+
38
+
39
+ ### Installation
40
+
41
+ JavaPhoenixClient is hosted on JCenter . You ' ll need to make sure you declare `jcenter()` as one of your repositories
42
+
43
+ ```
44
+ repositories {
45
+ jcenter()
46
+ }
47
+ ```
48
+
49
+ and then add the library. See [releases](https://github.com/dsrees/JavaPhoenixClient/releases) for the latest version
50
+ ```$xslt
51
+ dependencies {
52
+ implementation ' com.github.dsrees: JavaPhoenixClient : 0.1 .1 '
53
+ }
54
+ ```
55
+
56
+
57
+ ### Feedback
58
+ Please submit in issue if you have any problems!
59
+
60
+
61
+
62
+ This library is built to mirror the [phoenix.js](https://hexdocs.pm/phoenix/js/) and [SwiftPhoenixClient](https://github.com/davidstump/SwiftPhoenixClient) libraries.
63
+
64
+
65
+
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ plugins {
8
8
}
9
9
10
10
group ' com.github.dsrees'
11
- version ' 0.1.0 '
11
+ version ' 0.1.1 '
12
12
13
13
sourceCompatibility = 1.8
14
14
You can’t perform that action at this time.
0 commit comments