File: saved_searches.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 (24 lines) | stat: -rw-r--r-- 656 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
module TwitterOAuth
  class Client
    
    # Returns the authenticated user's saved search queries.
    def saved_searches
      get("/saved_searches.json")
    end
    
    # Retrieve the data for a saved search owned by the authenticating user specified by the given id.
    def get_saved_search(search_id)
      get("/saved_searches/show/#{search_id}.json")
    end
    
    # Creates a saved search for the authenticated user.
    def create_saved_search(query)
      post("/saved_searches/create.json", :query => query)
    end
    
    def delete_saved_search(search_id)
      post("/saved_searches/destroy/#{search_id}.json")
    end
    
  end
end