You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[stream-java](https://github.com/GetStream/stream-java) is a Java client for [Stream](https://getstream.io/).
6
4
7
5
You can sign up for a Stream account at https://getstream.io/get_started.
8
6
9
-
The Stream's Java client come in two different flavours, you should decide which one to drag into your project.
10
-
Those two implementations differ according to the underlying library used to handle HTTP connections:
11
-
12
-
-*stream-repo-apache* uses Apache HttpClient and we recommend it for backend applications. Apache HttpClient is a mature, reliable and rock-solid HTTP library.
13
-
-*stream-repo-okhttp* uses Square's OkHttp which is lightweight, powerful and mobile-oriented HTTP library. We recommend it for mobile application.
14
-
15
7
### Installation
16
8
17
-
If you decide to go for the *Apache HttpClient* implementation, add the following dependency to your pom.xml:
The API client allows you to send activities with custom field as well, you can find a
120
-
complete example [here](https://github.com/GetStream/stream-java/blob/master/stream-repo-apache/src/test/java/io/getstream/client/example/mixtype/MixedType.java)
In case you want to send to Stream a long list of following relationships you can use the batch feature _followMany_:
141
-
142
-
```java
143
-
/* Batch following many feeds */
144
-
FollowMany followMany =newFollowMany.Builder()
145
-
.add("user:1", "user:2")
146
-
.add("user:1", "user:3")
147
-
.add("user:1", "user:4")
148
-
.add("user:2", "user:3")
149
-
.build();
150
-
feed.followMany(followMany);
151
-
152
-
```
153
-
154
-
#### Client token
155
-
156
-
In order to generate a token for client side usage (e.g. JS client), you can use the following code:
157
-
158
-
```java
159
-
/* Generating tokens for client side usage */
160
-
String token = feed.getToken();
161
-
```
40
+
Docs are available on [GetStream.io](http://getstream.io/docs/).
162
41
163
-
#### Further references
42
+
Javadocs are available [here](https://getstream.github.io/stream-java/).
164
43
165
-
For more examples have a look [here](https://github.com/GetStream/stream-java/tree/master/stream-repo-apache/src/test/java/io/getstream/client/apache/example).
44
+
### Building & Testing
166
45
167
-
Docs are available on [GetStream.io](http://getstream.io/docs/).
46
+
Run `gradle wrapper --gradle-version 5.0` to generate gradle wrapper files
168
47
169
-
Javadocs are available [here](https://getstream.github.io/stream-java/).
48
+
Run `gradle test` to execute integration tests
170
49
171
50
### Credits & Contributors
172
51
173
-
This project was originally contributed by [Alessandro Pieri](sirio7g), prior to him joining Stream as an employee.
52
+
Project is maintained by [Max Klyga](nekuromento).
53
+
54
+
This project was originally contributed by [Alessandro Pieri](sirio7g).
174
55
175
56
We continue to welcome pull requests from community members.
176
57
177
58
### Copyright and License Information
178
59
179
-
Copyright (c) 2016-2017 Stream.io Inc, and individual contributors. All rights reserved.
60
+
Copyright (c) 2016-2018 Stream.io Inc, and individual contributors. All rights reserved.
180
61
181
-
See the file "LICENSE" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
62
+
See the file "LICENSE" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
0 commit comments