Module: Twitter::REST::SavedSearches
Constant Summary
Constants included from Utils
Instance Method Summary collapse
-
#create_saved_search(query, options = {}) ⇒ Twitter::SavedSearch
Creates a saved search for the authenticated user.
-
#destroy_saved_search(*args) ⇒ Array<Twitter::SavedSearch>
Destroys saved searches for the authenticated user.
-
#saved_search(id, options = {}) ⇒ Twitter::SavedSearch
Retrieve the data for saved searches owned by the authenticating user.
-
#saved_searches(*args) ⇒ Array<Twitter::SavedSearch>
The saved searches.
Methods included from Utils
Instance Method Details
#create_saved_search(query, options = {}) ⇒ Twitter::SavedSearch
Creates a saved search for the authenticated user
65 66 67 |
# File 'lib/twitter/rest/saved_searches.rb', line 65 def create_saved_search(query, = {}) perform_post_with_object("/1.1/saved_searches/create.json", .merge(query:), Twitter::SavedSearch) end |
#destroy_saved_search(*ids) ⇒ Array<Twitter::SavedSearch> #destroy_saved_search(*ids, options) ⇒ Array<Twitter::SavedSearch>
Note:
The search specified by ID must be owned by the authenticating user.
Destroys saved searches for the authenticated user
82 83 84 85 86 87 |
# File 'lib/twitter/rest/saved_searches.rb', line 82 def destroy_saved_search(*args) arguments = Twitter::Arguments.new(args) pmap(arguments) do |id| perform_post_with_object("/1.1/saved_searches/destroy/#{id}.json", arguments., Twitter::SavedSearch) end end |
#saved_search(id, options = {}) ⇒ Twitter::SavedSearch
Retrieve the data for saved searches owned by the authenticating user
52 53 54 |
# File 'lib/twitter/rest/saved_searches.rb', line 52 def saved_search(id, = {}) perform_get_with_object("/1.1/saved_searches/show/#{id}.json", , Twitter::SavedSearch) end |
#saved_search(options = {}) ⇒ Array<Twitter::SavedSearch> #saved_search(*ids) ⇒ Array<Twitter::SavedSearch> #saved_search(*ids, options) ⇒ Array<Twitter::SavedSearch>
Returns The saved searches.
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/twitter/rest/saved_searches.rb', line 32 def saved_searches(*args) arguments = Twitter::Arguments.new(args) if arguments.empty? perform_get_with_objects("/1.1/saved_searches/list.json", arguments., Twitter::SavedSearch) else pmap(arguments) do |id| saved_search(id, arguments.) end end end |