stream-ruby 4.0.0 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 31aab2710cc563a2d15372a93ef3c7247525e3579a0fc3208f08986cbdab50ba
4
- data.tar.gz: 6d6c543c663e877798aad76d4af12c8b6c6db23bdbaa3fda050418bf460ff191
3
+ metadata.gz: 2972e7e742f31f333f433daeedd19dbe28b8778ed76e65ef8627fec52bfee589
4
+ data.tar.gz: eff63599f1fafb19d4e905a1286bc74570ade5b9bd26754fb2babe0792bd6410
5
5
  SHA512:
6
- metadata.gz: 5ee20ef5160fa068b869c4eace00310bcae8d7fc15e2730c01312015060b533deb68be4d944ada943042d7a2d84e3c83564599df76b2edb5f954db124bd81ca6
7
- data.tar.gz: 814193cfdcd06a7376303fea24ce59c8881d914893e4fd336a85b093f757de642fd268c146112ff2cedd65185aef3e389757a9a10aec9a83493ea4f1c3f32ca6
6
+ metadata.gz: 6698774ebabe5b08638f96d1b01001d5b9809c5a21265f9ae400a8213c75a96c0600eef32c7a467b2690623ea789ed9aa7c8ec3a0bd49cc858bea2a8ada51997
7
+ data.tar.gz: a22782a9ba528f900174b727c76b0eaddf783a2d34d7a5ff17856ddad19a1af7b319bbf48050bb35e980a20e0adeb8822ef6d9f1ca67fc025aa69c2dde775b67
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2014-2017 Stream.io Inc, and individual contributors.
1
+ Copyright (c) 2014-2021, Stream.io Inc, and individual contributors.
2
2
 
3
3
  All rights reserved.
4
4
 
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # stream-ruby
2
2
 
3
- [![Build Status](https://travis-ci.org/GetStream/stream-ruby.svg?branch=master)](https://travis-ci.org/GetStream/stream-ruby) [![Gem Version](https://badge.fury.io/rb/stream-ruby.svg)](http://badge.fury.io/rb/stream-ruby)
3
+ [![build](https://github.com/GetStream/stream-ruby/workflows/build/badge.svg)](https://github.com/GetStream/stream-ruby/actions) [![Gem Version](https://badge.fury.io/rb/stream-ruby.svg)](http://badge.fury.io/rb/stream-ruby)
4
4
 
5
5
  [stream-ruby](https://github.com/GetStream/stream-ruby) is the official Ruby client for [Stream](https://getstream.io/), a web service for building scalable newsfeeds and activity streams.
6
6
 
@@ -153,6 +153,11 @@ client.og('https://google.com')
153
153
 
154
154
  ### Copyright and License Information
155
155
 
156
- Copyright (c) 2014-2020 Stream.io Inc, and individual contributors. All rights reserved.
156
+ Project is licensed under the [BSD 3-Clause](LICENSE).
157
157
 
158
- See the file "LICENSE" for information on the history of this software, terms & conditions for usage, and a DISCLAIMER OF ALL WARRANTIES.
158
+ ## We are hiring!
159
+
160
+ We've recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and we keep actively growing.
161
+ Our APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world.
162
+
163
+ Check out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).
data/lib/stream/client.rb CHANGED
@@ -141,7 +141,7 @@ module Stream
141
141
  end
142
142
 
143
143
  def make_query_params(params)
144
- Hash[get_default_params.merge(params).sort_by { |k, _v| k.to_s }]
144
+ get_default_params.merge(params).sort_by { |k, _v| k.to_s }.to_h
145
145
  end
146
146
 
147
147
  def make_request(method, relative_url, signature, params = {}, data = {}, headers = {})
data/lib/stream/errors.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  module Stream
2
2
  class Error < StandardError; end
3
+
3
4
  class StreamApiResponseException < Error; end
5
+
4
6
  class StreamInputData < Error; end
5
7
  end
data/lib/stream/feed.rb CHANGED
@@ -68,7 +68,7 @@ module Stream
68
68
  end
69
69
 
70
70
  def remove(activity_id, foreign_id: false)
71
- remove_activity(activity_id, foreign_id)
71
+ remove_activity(activity_id, foreign_id: foreign_id)
72
72
  end
73
73
 
74
74
  def remove_activity(activity_id, foreign_id: false)
@@ -93,8 +93,8 @@ module Stream
93
93
  def update_activity_to_targets(foreign_id, time, new_targets: nil, added_targets: nil, removed_targets: nil)
94
94
  uri = "/feed_targets/#{@feed_url}/activity_to_targets/"
95
95
  data = {
96
- 'foreign_id': foreign_id,
97
- 'time': time
96
+ foreign_id: foreign_id,
97
+ time: time
98
98
  }
99
99
 
100
100
  data['new_targets'] = new_targets unless new_targets.nil?
@@ -1,12 +1,13 @@
1
1
  module Stream
2
2
  class ReactionsClient < Client
3
- def add(kind, activity_id, user_id, data: nil, target_feeds: nil)
3
+ def add(kind, activity_id, user_id, data: nil, target_feeds: nil, target_feeds_extra_data: nil)
4
4
  data = {
5
5
  kind: kind,
6
6
  activity_id: activity_id,
7
7
  user_id: user_id,
8
8
  data: data,
9
- target_feeds: target_feeds
9
+ target_feeds: target_feeds,
10
+ target_feeds_extra_data: target_feeds_extra_data
10
11
  }
11
12
  make_reaction_request(:post, {}, data)
12
13
  end
@@ -30,13 +31,14 @@ module Stream
30
31
  make_reaction_request(:delete, {}, {}, endpoint: uri)
31
32
  end
32
33
 
33
- def add_child(kind, parent_id, user_id, data: nil, target_feeds: nil)
34
+ def add_child(kind, parent_id, user_id, data: nil, target_feeds: nil, target_feeds_extra_data: nil)
34
35
  data = {
35
36
  kind: kind,
36
37
  parent: parent_id,
37
38
  user_id: user_id,
38
39
  data: data,
39
- target_feeds: target_feeds
40
+ target_feeds: target_feeds,
41
+ target_feeds_extra_data: target_feeds_extra_data
40
42
  }
41
43
  make_reaction_request(:post, {}, data)
42
44
  end
@@ -1,3 +1,3 @@
1
1
  module Stream
2
- VERSION = '4.0.0'.freeze
2
+ VERSION = '4.2.0'.freeze
3
3
  end
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: 4.0.0
4
+ version: 4.2.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: 2020-11-19 00:00:00.000000000 Z
13
+ date: 2021-09-27 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: faraday
@@ -18,40 +18,28 @@ dependencies:
18
18
  requirements:
19
19
  - - ">="
20
20
  - !ruby/object:Gem::Version
21
- version: 0.10.0
22
- - - "<"
23
- - !ruby/object:Gem::Version
24
- version: '1.0'
21
+ version: '0'
25
22
  type: :runtime
26
23
  prerelease: false
27
24
  version_requirements: !ruby/object:Gem::Requirement
28
25
  requirements:
29
26
  - - ">="
30
27
  - !ruby/object:Gem::Version
31
- version: 0.10.0
32
- - - "<"
33
- - !ruby/object:Gem::Version
34
- version: '1.0'
28
+ version: '0'
35
29
  - !ruby/object:Gem::Dependency
36
30
  name: jwt
37
31
  requirement: !ruby/object:Gem::Requirement
38
32
  requirements:
39
33
  - - ">="
40
34
  - !ruby/object:Gem::Version
41
- version: 2.1.0
42
- - - "~>"
43
- - !ruby/object:Gem::Version
44
- version: '2.1'
35
+ version: '0'
45
36
  type: :runtime
46
37
  prerelease: false
47
38
  version_requirements: !ruby/object:Gem::Requirement
48
39
  requirements:
49
40
  - - ">="
50
41
  - !ruby/object:Gem::Version
51
- version: 2.1.0
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '2.1'
42
+ version: '0'
55
43
  - !ruby/object:Gem::Dependency
56
44
  name: rake
57
45
  requirement: !ruby/object:Gem::Requirement