Module: X::Resources::PostCollections
- Included in:
- Post
- Defined in:
- x-resources/lib/x/resources/post_collections.rb
Overview
The collections of a post: the users who liked and reposted it, and its reposts and quotes, included into Post
Internal to x-resources: the methods it gives a post, such as liked_by, are public API, but the module is only how they are shared, and which classes extend or include it can change within 1.x.
Instance Method Summary collapse
-
#liked_by(**params) ⇒ Cursor
The users who liked this post.
-
#quotes(**params) ⇒ Cursor
(also: #quote_tweets)
The posts quoting this post.
-
#reposted_by(**params) ⇒ Cursor
(also: #retweeted_by)
The users who reposted this post.
-
#reposts(**params) ⇒ Cursor
(also: #retweets)
The reposts of this post, each a post of its own by the user who reposted it.
Instance Method Details
#liked_by(**params) ⇒ Cursor
The users who liked this post
24 25 26 |
# File 'x-resources/lib/x/resources/post_collections.rb', line 24 def liked_by(**params) cursor(User, "tweets/#{id}/liking_users", max_results: MAX_RESULTS, **params) end |
#quotes(**params) ⇒ Cursor Also known as: quote_tweets
The posts quoting this post
57 58 59 |
# File 'x-resources/lib/x/resources/post_collections.rb', line 57 def quotes(**params) cursor(Post, "tweets/#{id}/quote_tweets", max_results: MAX_RESULTS, min_results: 10, **params) end |
#reposted_by(**params) ⇒ Cursor Also known as: retweeted_by
The users who reposted this post
35 36 37 |
# File 'x-resources/lib/x/resources/post_collections.rb', line 35 def reposted_by(**params) cursor(User, "tweets/#{id}/retweeted_by", max_results: MAX_RESULTS, **params) end |
#reposts(**params) ⇒ Cursor Also known as: retweets
The reposts of this post, each a post of its own by the user who reposted it
46 47 48 |
# File 'x-resources/lib/x/resources/post_collections.rb', line 46 def reposts(**params) cursor(Post, "tweets/#{id}/retweets", max_results: MAX_RESULTS, **params) end |