twitter_with_auto_pagination 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twitter_with_auto_pagination/new_api.rb +11 -11
- data/twitter_with_auto_pagination.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 436a4c5d15eafb06efea5e5e4e54a683b78e968b
|
4
|
+
data.tar.gz: aaaf0b5f03e2fc0e099c08908857b841d78187e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7faf5a3caae51d5aaf175bd6bade11c55400c6d44e2c00d0e64eaf7ff30e4434650ab4e6ad5e904a0f0b38fe901035333d288e08f06967757f4e709c3dc2cfe
|
7
|
+
data.tar.gz: b8b1c1d3330d30b4742db0e58db7b3f2d38b2c8d1b7ffa2c3f0053413661ccee0bf263b423de58b821b568f986ca53aea98e36deb193cbb7e380c0e646e5ed3e
|
@@ -245,31 +245,31 @@ module TwitterWithAutoPagination
|
|
245
245
|
max: options.has_key?(:max) ? options.delete(:max) : 1000
|
246
246
|
}
|
247
247
|
|
248
|
-
|
248
|
+
_users_which_you_replied_to, _users_who_replied_to_you, _users_which_you_faved =
|
249
249
|
if args.empty?
|
250
|
-
[
|
250
|
+
[users_which_you_replied_to(options), users_who_replied_to_you(options), users_which_you_faved(options)]
|
251
251
|
elsif uid_or_screen_name?(args[0])
|
252
|
-
[
|
253
|
-
elsif (m_names = %i(
|
252
|
+
[users_which_you_replied_to(args[0], options), users_who_replied_to_you(args[0], options), users_which_you_faved(args[0], options)]
|
253
|
+
elsif (m_names = %i(users_which_you_replied_to users_who_replied_to_you users_which_you_faved)).all? { |m_name| args[0].respond_to?(m_name) }
|
254
254
|
m_names.map { |mn| args[0].send(mn) }
|
255
255
|
else
|
256
256
|
raise
|
257
257
|
end
|
258
258
|
|
259
|
-
_users =
|
259
|
+
_users = _users_which_you_replied_to + _users_who_replied_to_you + _users_which_you_faved
|
260
260
|
return [] if _users.empty?
|
261
261
|
|
262
262
|
scores = _count_users_with_two_sided_threshold(_users, min_max)
|
263
|
-
|
264
|
-
|
265
|
-
|
263
|
+
users_which_you_replied_to_scores = _count_users_with_two_sided_threshold(_users_which_you_replied_to, min_max)
|
264
|
+
users_who_replied_to_you_scores = _count_users_with_two_sided_threshold(_users_who_replied_to_you, min_max)
|
265
|
+
users_which_you_faved_scores = _count_users_with_two_sided_threshold(_users_which_you_faved, min_max)
|
266
266
|
|
267
267
|
scores.keys.map { |uid| _users.find { |u| u.id.to_i == uid.to_i } }.
|
268
268
|
map do |u|
|
269
269
|
u[:score] = scores[u.id]
|
270
|
-
u[:
|
271
|
-
u[:
|
272
|
-
u[:
|
270
|
+
u[:users_which_you_replied_to_score] = users_which_you_replied_to_scores[u.id]
|
271
|
+
u[:users_who_replied_to_you_score] = users_who_replied_to_you_scores[u.id]
|
272
|
+
u[:users_which_you_faved_score] = users_which_you_faved_scores[u.id]
|
273
273
|
u
|
274
274
|
end
|
275
275
|
end
|