stream-ruby 2.8.0 → 2.9.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 +38 -0
- data/lib/stream/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: becda7571b74f9aafa3184c2886c46aad9e832c10254a44c6399d5579ddd1877
|
4
|
+
data.tar.gz: 00de69a0e93425085d4d6e0efa9851edb982167449d580845b831c7d3c4696ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5686b82d209f7c743aea82dcc286c84a836e3379747e8beba35be9b652954b1a47d1240b000fc4ec546a3dabb354062426d7b4352410d36e296897a63a768c3c
|
7
|
+
data.tar.gz: a34dff05a28d11d42184b9d7e27322686686fef374a37c9c9475dcbd26e5edb7cbce554ce1ac1b44524fb3b4c39bcc5fd9f550cb061f9d5d843f9933b6d44cff
|
data/lib/stream/activities.rb
CHANGED
@@ -25,5 +25,43 @@ module Stream
|
|
25
25
|
make_request(:get, '/activities/', signature, params)
|
26
26
|
end
|
27
27
|
|
28
|
+
#
|
29
|
+
# Partial update activity, via foreign ID or Foreign ID + timestamp
|
30
|
+
#
|
31
|
+
# @param [Hash<:id, :foreign_id, :time, :set, :unset>] data the request params (id and foreign_id+timestamp mutually exclusive)
|
32
|
+
#
|
33
|
+
# @return the updated activity.
|
34
|
+
#
|
35
|
+
# @example
|
36
|
+
#
|
37
|
+
# @client.update_activity_partial(
|
38
|
+
# id: "4b39fda2-d6e2-42c9-9abf-5301ef071b12",
|
39
|
+
# set: {
|
40
|
+
# "product.price.eur": 12.99,
|
41
|
+
# "colors": {
|
42
|
+
# "blue": "#0000ff",
|
43
|
+
# "green": "#00ff00",
|
44
|
+
# }
|
45
|
+
# },
|
46
|
+
# unset: [ "popularity", "size.xl" ]
|
47
|
+
# )
|
48
|
+
#
|
49
|
+
# @client.update_activity_partial(
|
50
|
+
# foreign_id: 'product:123',
|
51
|
+
# time: '2016-11-10T13:20:00.000000',
|
52
|
+
# set: {
|
53
|
+
# "product.price.eur": 12.99,
|
54
|
+
# "colors": {
|
55
|
+
# "blue": "#0000ff",
|
56
|
+
# "green": "#00ff00",
|
57
|
+
# }
|
58
|
+
# },
|
59
|
+
# unset: [ "popularity", "size.xl" ]
|
60
|
+
# )
|
61
|
+
def update_activity_partial(data = {})
|
62
|
+
signature = Stream::Signer.create_jwt_token('activities', '*', @api_secret, '*')
|
63
|
+
make_request(:post, '/activity/', signature, {}, data)
|
64
|
+
end
|
65
|
+
|
28
66
|
end
|
29
67
|
end
|
data/lib/stream/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stream-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommaso Barbugli
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-07-
|
13
|
+
date: 2018-07-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|