module TwitterFriendly::REST::Users
Constants
- MAX_USERS_PER_REQUEST
Public Instance Methods
blocked_ids(*args)
click to toggle source
# File lib/twitter_friendly/rest/users.rb, line 30 def blocked_ids(*args) @twitter.blocked_ids(*args)&.attrs&.fetch(:ids) end
user(*args)
click to toggle source
# File lib/twitter_friendly/rest/users.rb, line 14 def user(*args) @twitter.user(*args)&.to_hash end
user?(*args)
click to toggle source
# File lib/twitter_friendly/rest/users.rb, line 10 def user?(*args) @twitter.user?(*args) end
users(values, options = {})
click to toggle source
# File lib/twitter_friendly/rest/users.rb, line 20 def users(values, options = {}) if values.size <= MAX_USERS_PER_REQUEST @twitter.users(values, options).map(&:to_h) else parallel(in_threads: 6) do |batch| values.each_slice(MAX_USERS_PER_REQUEST) { |targets| batch.users(targets, options) } end.flatten end end
verify_credentials(include_entities: false, skip_status: true, include_email: true)
click to toggle source
# File lib/twitter_friendly/rest/users.rb, line 6 def verify_credentials(include_entities: false, skip_status: true, include_email: true) @twitter.verify_credentials(include_entities: include_entities, skip_status: skip_status, include_email: include_email)&.to_hash end