twttr 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/twttr/model/user.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0b322657f3a30ce0b0d95982d37f869bac57f5a388cd72bd5ec0674ffd280ec
|
4
|
+
data.tar.gz: f5a7ceef4eed89d1f62200c27e1a793474721c9dffc2abf074fb04372917541a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d93cfe971f58080b87a2213c2a46249b931e89e192d9115287a61e78decc48893449f9c8803557b07abffdd457f09b71c96c68040a5de95cc4ef6fc06c81597
|
7
|
+
data.tar.gz: 940d45503a781eaf9efdb4ef246b23c386219ca0bdfc69b0d9f0e36cb6cec444f868d24e822307ba8e15c73a8a779cba6a9ea44bc5288e7f772f8d1d5ba8162a
|
data/lib/twttr/model/user.rb
CHANGED
@@ -15,6 +15,20 @@ module Twttr
|
|
15
15
|
@client = client
|
16
16
|
end
|
17
17
|
|
18
|
+
# GET /2/users/:id/followers
|
19
|
+
# https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/get-users-id-followers
|
20
|
+
#
|
21
|
+
# Returns paginated list of users following user_id.
|
22
|
+
#
|
23
|
+
# @param max_results [Integer] Max number of results per peage.
|
24
|
+
# @param pagination_token [String] Initial page pagination token.
|
25
|
+
# @yield [Array<Twttr::Model::User>] User followers page.
|
26
|
+
# @yield [String,NilClass] Pagination token.
|
27
|
+
# @return [Array<Twttr::Model::User>] Follower Users.
|
28
|
+
def followers(max_results: nil, pagination_token: nil, &block)
|
29
|
+
client.followers(id, max_results: max_results, pagination_token: pagination_token, &block)
|
30
|
+
end
|
31
|
+
|
18
32
|
# Forwards to Follows#following setting user_id to current user's id.
|
19
33
|
#
|
20
34
|
# GET /2/users/:id/following
|