stream-ruby 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/stream/client.rb +7 -2
- data/lib/stream/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0a41fcca1d4290950f4e22504404ae4f4e2fb63
|
4
|
+
data.tar.gz: 655f1a83893858cbc41e7d8fc6638713b330f377
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b92f0def78367e37b616f501169d9155e9b40fe8cb03326c1a0896762ba6ad20f53cc47770233d5e6bef9446f2fd75a8f8d135436e5145204d14e693404d055e
|
7
|
+
data.tar.gz: ed94d491acc9c27c6714a7b87d4833f9c48e42b3c88acd6f6c5a0ce423eb5a3f326877969693171c45200f6c5d6654fe33f0a0b93f712c07ab29ac4ff75c3632
|
data/README.md
CHANGED
@@ -18,7 +18,7 @@ gem install "stream-ruby"
|
|
18
18
|
```ruby
|
19
19
|
# Instantiate a new client to connect to us east API endpoint
|
20
20
|
require 'stream'
|
21
|
-
client = Stream::Client.new('YOUR_API_KEY', 'API_KEY_SECRET', :location => 'us-east')
|
21
|
+
client = Stream::Client.new('YOUR_API_KEY', 'API_KEY_SECRET', 'APP_ID', :location => 'us-east')
|
22
22
|
# Find your API keys here https://getstream.io/dashboard/
|
23
23
|
|
24
24
|
# Instantiate a feed object
|
data/lib/stream/client.rb
CHANGED
@@ -133,10 +133,15 @@ module Stream
|
|
133
133
|
def make_http_request(method, relative_url, params = nil, data = nil, headers = nil)
|
134
134
|
headers["Content-Type"] = "application/json"
|
135
135
|
headers["X-Stream-Client"] = "stream-ruby-client-#{Stream::VERSION}"
|
136
|
-
|
137
136
|
params["api_key"] = @options[:api_key]
|
138
137
|
relative_url = "#{@base_path}#{relative_url}?#{URI.encode_www_form(params)}"
|
139
|
-
|
138
|
+
body = data.to_json if %w(post put).include? method.to_s
|
139
|
+
response = @conn.run_request(
|
140
|
+
method,
|
141
|
+
relative_url,
|
142
|
+
body,
|
143
|
+
headers
|
144
|
+
)
|
140
145
|
|
141
146
|
case response[:status].to_i
|
142
147
|
when 200..203
|
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.5.
|
4
|
+
version: 2.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tommaso Barbugli
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-01-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|