File: status.rb

package info (click to toggle)
ruby-twitter-oauth 0.4.94-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152 kB
  • sloc: ruby: 446; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module TwitterOAuth
  class Client
    
    # Returns a single status, specified by the id parameter below.
    def status(id)
      get("/statuses/show/#{id}.json")
    end
    
    # Updates the authenticating user's status.
    def update(message, options={})
      post('/statuses/update.json', options.merge(:status => message))
    end

    # Destroys the status specified by the required ID parameter
    def status_destroy(id)
      post("/statuses/destroy/#{id}.json")
    end
    
    # Retweets the tweet specified by the id parameter. Returns the original tweet with retweet details embedded.
    def retweet(id)
      post("/statuses/retweet/#{id}.json")
    end
    
    # Returns the 100 most recent retweets of the tweet.
    def retweets(id)
      get("/statuses/retweets/#{id}.json")
    end
    
  end
end