twitter_with_auto_pagination 0.8.7 → 0.8.8
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d767009c6d195d95d8ef07d1f7dae2d2c7ebe23
|
4
|
+
data.tar.gz: 8a6b624c9ec6ad652aa8613ca8f99f24e20ce368
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0511c5f3a28c8a2d70a5372bac83c11ee54667928726e4eded3c762a3efc5c31c7bc6d0fc08a75275f0456997342ad37a48079f6960d70b78ca881564220d068
|
7
|
+
data.tar.gz: aa4a35b82774fc8e74c5ea619e68a815ccfdd2700680c686d1bd46042600da9f3a5897371a2a714585f222fa23faeb37f35f321fc4bf8fa59bdb1affdf0456de
|
@@ -73,15 +73,12 @@ module TwitterWithAutoPagination
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
-
def close_friends(
|
77
|
-
options = {uniq:
|
78
|
-
min_max = {
|
79
|
-
min: options.has_key?(:min) ? options.delete(:min) : 0,
|
80
|
-
max: options.has_key?(:max) ? options.delete(:max) : 1000
|
81
|
-
}
|
76
|
+
def close_friends(user, uniq: false, min: 0, max: 1000, limit: 30)
|
77
|
+
options = {uniq: uniq, min: min, max: max}
|
78
|
+
min_max = {min: min, max: max}
|
82
79
|
|
83
80
|
instrument(__method__, nil, options) do
|
84
|
-
replying, replied, favoriting = _retrieve_replying_replied_and_favoriting(
|
81
|
+
replying, replied, favoriting = _retrieve_replying_replied_and_favoriting(user, options)
|
85
82
|
|
86
83
|
users = replying + replied + favoriting
|
87
84
|
return [] if users.empty?
|
@@ -97,7 +94,7 @@ module TwitterWithAutoPagination
|
|
97
94
|
u[:replied_score] = replied_score[u.id]
|
98
95
|
u[:favoriting_score] = favoriting_score[u.id]
|
99
96
|
u
|
100
|
-
end
|
97
|
+
end.slice(0, limit)
|
101
98
|
end
|
102
99
|
end
|
103
100
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter_with_auto_pagination
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shinohara Teruki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: twitter
|