Module: TwitterWithAutoPagination::REST::Users
- Includes:
- Utils
- Included in:
- API
- Defined in:
- lib/twitter_with_auto_pagination/rest/users.rb
Constant Summary
collapse
- MAX_USERS_PER_REQUEST =
100
Constants included
from Utils
TwitterWithAutoPagination::REST::Utils::DEFAULT_CALL_LIMIT
Instance Method Summary
collapse
Methods included from Collector
#collect_with_cursor, #collect_with_max_id
Instance Method Details
#blocked_ids(*args) ⇒ Object
34
35
36
|
# File 'lib/twitter_with_auto_pagination/rest/users.rb', line 34
def blocked_ids(*args)
.send(__method__, *args).attrs[:ids]
end
|
#user(*args) ⇒ Object
17
18
19
|
# File 'lib/twitter_with_auto_pagination/rest/users.rb', line 17
def user(*args)
.send(__method__, *args).to_hash
end
|
#user?(*args) ⇒ Boolean
13
14
15
|
# File 'lib/twitter_with_auto_pagination/rest/users.rb', line 13
def user?(*args)
.send(__method__, *args)
end
|
#users(values, options = {}) ⇒ Object
client.users -> cached users(internal call) -> cached super -> not cached
26
27
28
29
30
31
32
|
# File 'lib/twitter_with_auto_pagination/rest/users.rb', line 26
def users(values, options = {})
if values.size <= MAX_USERS_PER_REQUEST
return .send(__method__, *values, options).map(&:to_hash)
end
users_internal(values, options)
end
|
#verify_credentials(options = {}) ⇒ Object
9
10
11
|
# File 'lib/twitter_with_auto_pagination/rest/users.rb', line 9
def verify_credentials(options = {})
.send(__method__, {skip_status: true}.merge(options)).to_hash
end
|