stream-ruby 2.5.4 → 2.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/lib/stream/feed.rb +7 -6
- data/lib/stream/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d432cc258be801378a19388e745302acd88eed91
|
4
|
+
data.tar.gz: 42bee681f5a5cfa6ad2239703a50b75e05a4b432
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aecd169d51caf7dc77dec2386fd8dc6ab6cc0efa4a2ecd26f8803b342050cb861e49d4d7fc7c937c21d1f691c5ff9eec31222ca0c0ef6aca711afd33008da7a2
|
7
|
+
data.tar.gz: a543cbf088eec40dd37e86c9cb75a0e5edff994b39d9e3b134b14ddfb900fc92d132f373320595f7c0ebb49b905d0843bb3ab6c0e2b3839c68e4bae0b0638d78
|
data/README.md
CHANGED
@@ -3,9 +3,11 @@ stream-ruby
|
|
3
3
|
|
4
4
|
[![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)
|
5
5
|
|
6
|
-
stream-ruby is the official Ruby client for [Stream](https://getstream.io/), a web service for building scalable newsfeeds and activity streams.
|
7
|
-
|
8
|
-
|
6
|
+
[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.
|
7
|
+
|
8
|
+
Note there is also a higher level [Ruby on Rails - Stream integration](https://github.com/getstream/stream-rails) library which hooks into the Ruby on Rails ORM.
|
9
|
+
|
10
|
+
You can sign up for a Stream account at https://getstream.io/get_started.
|
9
11
|
|
10
12
|
### Installation
|
11
13
|
|
@@ -13,6 +15,10 @@ There is also a [higher level Rails integration](https://github.com/getstream/st
|
|
13
15
|
gem install "stream-ruby"
|
14
16
|
```
|
15
17
|
|
18
|
+
### Full documentation
|
19
|
+
|
20
|
+
Documentation for this Ruby client are available at the [Stream website](https://getstream.io/docs/ruby/?language=ruby).
|
21
|
+
|
16
22
|
### Usage
|
17
23
|
|
18
24
|
```ruby
|
@@ -113,8 +119,6 @@ activity = {:actor => "User:2", :verb => "pin", :object => "Place:42", :target =
|
|
113
119
|
client.add_to_many(activity, feeds)
|
114
120
|
```
|
115
121
|
|
116
|
-
Docs are available on [GetStream.io](http://getstream.io/docs/).
|
117
|
-
|
118
122
|
### Copyright and License Information
|
119
123
|
|
120
124
|
Copyright (c) 2014-2017 Stream.io Inc, and individual contributors. All rights reserved.
|
data/lib/stream/feed.rb
CHANGED
@@ -110,16 +110,17 @@ module Stream
|
|
110
110
|
|
111
111
|
def follow(target_feed_slug, target_user_id, activity_copy_limit = 300)
|
112
112
|
uri = "/feed/#{@feed_url}/follows/"
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
activity_copy_limit = 0 if activity_copy_limit < 0
|
114
|
+
activity_copy_limit = 1000 if activity_copy_limit > 1000
|
115
|
+
|
116
116
|
follow_data = {
|
117
|
-
:
|
118
|
-
:
|
117
|
+
target: "#{target_feed_slug}:#{target_user_id}",
|
118
|
+
target_token: @client.feed(target_feed_slug, target_user_id).token,
|
119
|
+
activity_copy_limit: activity_copy_limit
|
119
120
|
}
|
120
121
|
auth_token = create_jwt_token("follower", "write")
|
121
122
|
|
122
|
-
@client.make_request(:post, uri, auth_token,
|
123
|
+
@client.make_request(:post, uri, auth_token, {}, follow_data)
|
123
124
|
end
|
124
125
|
|
125
126
|
def followers(offset = 0, limit = 25)
|
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.5
|
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: 2017-
|
12
|
+
date: 2017-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.5.1
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: A gem that provides a client interface for getstream.io
|