moomerman-twitter_oauth 0.1.21 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/twitter_oauth/statuses.rb +31 -0
- metadata +1 -1
@@ -7,6 +7,13 @@ module TwitterOAuth
|
|
7
7
|
JSON.parse(oauth_response.body)
|
8
8
|
end
|
9
9
|
|
10
|
+
# Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
|
11
|
+
# This is the equivalent of /timeline/home on the Web.
|
12
|
+
def home_timeline
|
13
|
+
oauth_response = access_token.get("/statuses/home_timeline.json")
|
14
|
+
JSON.parse(oauth_response.body)
|
15
|
+
end
|
16
|
+
|
10
17
|
# Returns the 20 most recent statuses posted by the authenticating user and that user's friends.
|
11
18
|
def friends_timeline(rpp=20, page=1)
|
12
19
|
oauth_response = access_token.get("/statuses/friends_timeline.json?count=#{rpp}&page=#{page}")
|
@@ -37,6 +44,30 @@ module TwitterOAuth
|
|
37
44
|
JSON.parse(oauth_response.body)
|
38
45
|
end
|
39
46
|
|
47
|
+
# Retweets the tweet specified by the id parameter. Returns the original tweet with retweet details embedded.
|
48
|
+
def retweet(id)
|
49
|
+
oauth_response = access_token.post("/statuses/retweet/#{id}.json")
|
50
|
+
JSON.parse(oauth_response.body)
|
51
|
+
end
|
52
|
+
|
53
|
+
# Returns the 20 most recent retweets posted by the authenticating user
|
54
|
+
def retweeted_by_me
|
55
|
+
oauth_response = access_token.get("/statuses/retweeted_by_me.json")
|
56
|
+
JSON.parse(oauth_response.body)
|
57
|
+
end
|
58
|
+
|
59
|
+
# Returns the 20 most recent retweets posted by the authenticating user's friends.
|
60
|
+
def retweeted_to_me
|
61
|
+
oauth_response = access_token.get("/statuses/retweeted_to_me.json")
|
62
|
+
JSON.parse(oauth_response.body)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Returns the 20 most recent tweets of the authenticated user that have been retweeted by others.
|
66
|
+
def retweets_of_me
|
67
|
+
oauth_response = access_token.get("/statuses/retweets_of_me.json")
|
68
|
+
JSON.parse(oauth_response.body)
|
69
|
+
end
|
70
|
+
|
40
71
|
# alias
|
41
72
|
def mentions
|
42
73
|
replies
|