stream-ruby 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/stream/activities.rb +17 -1
- data/lib/stream/feed.rb +7 -0
- data/lib/stream/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f82c7be6c43499e9a1cc39406dba3536addda37b09e7d0633681a66a51df4e29
|
4
|
+
data.tar.gz: ed30ac1258dcc0725d88a125d2c66149d2e71ba3b004ff70c27caf7cd2f5198b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98a3991725770abe6c28746f4d172f6fce5b236301c05ad74b8df342902aec34564f2bc61f3e7aabc9a8daeabea0ca75de728d68a7461d9b06ab4e30332ebfe7
|
7
|
+
data.tar.gz: c319666f57917ec387936d0637c0162430b9f0cb93ffb4dc72e0de7767103a4d26e7690f60faae4bcb105ae062a95c5e40e4f77d19846665997bb6e7585a325d
|
data/lib/stream/activities.rb
CHANGED
@@ -36,8 +36,24 @@ module Stream
|
|
36
36
|
timestamps: timestamps
|
37
37
|
}
|
38
38
|
end
|
39
|
+
|
40
|
+
uri = params[:enrich] || params[:reactions] ? '/enrich/activities/' : '/activities/'
|
41
|
+
if params[:reactions].respond_to?(:keys)
|
42
|
+
params[:withOwnReactions] = true if params[:reactions][:own]
|
43
|
+
params[:withRecentReactions] = true if params[:reactions][:recent]
|
44
|
+
params[:withReactionCounts] = true if params[:reactions][:counts]
|
45
|
+
params[:withOwnChildren] = true if params[:reactions][:children]
|
46
|
+
user_id = params[:reactions][:user_id]
|
47
|
+
params[:user_id] = user_id if user_id
|
48
|
+
kinds = params[:reactions][:kinds]
|
49
|
+
if kinds
|
50
|
+
params[:reactionKindsFilter] = kinds.is_a?(Array) ? kinds.join(',') : kinds
|
51
|
+
end
|
52
|
+
end
|
53
|
+
%i[enrich reactions].each { |k| params.delete(k) }
|
54
|
+
|
39
55
|
signature = Stream::Signer.create_jwt_token('activities', '*', @api_secret, '*')
|
40
|
-
make_request(:get,
|
56
|
+
make_request(:get, uri, signature, params)
|
41
57
|
end
|
42
58
|
|
43
59
|
#
|
data/lib/stream/feed.rb
CHANGED
@@ -44,6 +44,13 @@ module Stream
|
|
44
44
|
params[:withOwnReactions] = true if params[:reactions][:own]
|
45
45
|
params[:withRecentReactions] = true if params[:reactions][:recent]
|
46
46
|
params[:withReactionCounts] = true if params[:reactions][:counts]
|
47
|
+
params[:withOwnChildren] = true if params[:reactions][:children]
|
48
|
+
user_id = params[:reactions][:user_id]
|
49
|
+
params[:user_id] = user_id if user_id
|
50
|
+
kinds = params[:reactions][:kinds]
|
51
|
+
if kinds
|
52
|
+
params[:reactionKindsFilter] = kinds.is_a?(Array) ? kinds.join(',') : kinds
|
53
|
+
end
|
47
54
|
end
|
48
55
|
%i[enrich reactions].each { |k| params.delete(k) }
|
49
56
|
|
data/lib/stream/version.rb
CHANGED