Module: Twitter::API::SavedSearches

### Home Classes Methods

### In Files

- lib/twitter/api/saved_searches.rb

### Methods

- #saved_search
- #saved_search_create
- #saved_search_destroy
- #saved_searches

### Included Modules

- Twitter::API::Utils

### Class/Module Index

Quicksearch

- Twitter
- Twitter::API
- Twitter::API::Arguments
- Twitter::API::DirectMessages
- Twitter::API::Favorites
- Twitter::API::FriendsAndFollowers
- Twitter::API::Help
- Twitter::API::Lists
- Twitter::API::PlacesAndGeo
- Twitter::API::SavedSearches
- Twitter::API::Search
- Twitter::API::SpamReporting
- Twitter::API::SuggestedUsers
- Twitter::API::Timelines
- Twitter::API::Trends
- Twitter::API::Tweets
- Twitter::API::Undocumented
- Twitter::API::Users
- Twitter::API::Utils
- Twitter::Action
- Twitter::Action::Favorite
- Twitter::Action::Follow
- Twitter::Action::ListMemberAdded
- Twitter::Action::Mention
- Twitter::Action::Reply
- Twitter::Action::Retweet
- Twitter::Action::Status
- Twitter::Action::Tweet
- Twitter::ActionFactory
- Twitter::Base
- Twitter::BasicUser
- Twitter::Client
- Twitter::Configurable
- Twitter::Configuration
- Twitter::Creatable
- Twitter::Cursor
- Twitter::Default
- Twitter::DirectMessage
- Twitter::Entity
- Twitter::Entity::Hashtag
- Twitter::Entity::Url
- Twitter::Entity::UserMention
- Twitter::Error
- Twitter::Error::AlreadyFavorited
- Twitter::Error::AlreadyRetweeted
- Twitter::Error::BadGateway
- Twitter::Error::BadRequest
- Twitter::Error::ClientError
- Twitter::Error::ConfigurationError
- Twitter::Error::DecodeError
- Twitter::Error::EnhanceYourCalm
- Twitter::Error::Forbidden
- Twitter::Error::GatewayTimeout
- Twitter::Error::IdentityMapKeyError
- Twitter::Error::InternalServerError
- Twitter::Error::NotAcceptable
- Twitter::Error::NotFound
- Twitter::Error::RateLimited
- Twitter::Error::ServerError
- Twitter::Error::ServiceUnavailable
- Twitter::Error::TooManyRequests
- Twitter::Error::Unauthorized
- Twitter::Error::UnprocessableEntity
- Twitter::Exceptable
- Twitter::Factory
- Twitter::Geo
- Twitter::Geo::Point
- Twitter::Geo::Polygon
- Twitter::GeoFactory
- Twitter::Identity
- Twitter::IdentityMap
- Twitter::Language
- Twitter::List
- Twitter::Media
- Twitter::Media::Photo
- Twitter::MediaFactory
- Twitter::Metadata
- Twitter::OEmbed
- Twitter::Place
- Twitter::ProfileBanner
- Twitter::RateLimit
- Twitter::Relationship
- Twitter::Request
- Twitter::Request::MultipartWithFile
- Twitter::Response
- Twitter::Response::ParseJson
- Twitter::Response::RaiseError
- Twitter::SavedSearch
- Twitter::SearchResults
- Twitter::Settings
- Twitter::Size
- Twitter::SourceUser
- Twitter::Status
- Twitter::Suggestion
- Twitter::TargetUser
- Twitter::Trend
- Twitter::Tweet
- Twitter::User
- Twitter::Version
- Enumerable
- Kernel

No matching classes.

# Twitter::API::SavedSearches

### Public Instance Methods

saved_search(id, options={}) click to toggle source

Retrieve the data for saved searches owned by the authenticating user

@see dev.twitter.com/docs/api/1.1/get/saved_searches/show/:id @rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::SavedSearch] The saved searches. @param id [Integer] A Tweet IDs. @param options [Hash] A customizable set of options. @example Retrieve the data for a saved search owned by the authenticating user with the ID 16129012

    Twitter.saved_search(16129012)

    # File lib/twitter/api/saved_searches.rb, line 56
    def saved_search(id, options={})
      object_from_response(Twitter::SavedSearch, :get, "/1.1/saved_searches/show/#{id}.json", options)
    end

saved_search_create(query, options={}) click to toggle source

Creates a saved search for the authenticated user

@see dev.twitter.com/docs/api/1.1/post/saved_searches/create @rate_limited No @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Twitter::SavedSearch] The created saved search. @param query [String] The query of the search the user would like to save. @param options [Hash] A customizable set of options. @example Create a saved search for the authenticated user with the query "twitter"

    Twitter.saved_search_create("twitter")

    # File lib/twitter/api/saved_searches.rb, line 71
    def saved_search_create(query, options={})
      object_from_response(Twitter::SavedSearch, :post, "/1.1/saved_searches/create.json", options.merge(:query => query))
    end

saved_search_destroy(*args) click to toggle source

Destroys saved searches for the authenticated user

@see dev.twitter.com/docs/api/1.1/post/saved_searches/destroy/:id @note The search specified by ID must be owned by the authenticating user. @rate_limited No @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::SavedSearch>] The deleted saved searches. @overload saved_search_destroy(*ids)

    @param ids [Array<Integer>, Set<Integer>] An array of Tweet IDs.
    @example Destroys a saved search for the authenticated user with the ID 16129012
      Twitter.saved_search_destroy(16129012)

@overload saved_search_destroy(*ids, options)

    @param ids [Array<Integer>, Set<Integer>] An array of Tweet IDs.
    @param options [Hash] A customizable set of options.

    # File lib/twitter/api/saved_searches.rb, line 90
    def saved_search_destroy(*args)
      arguments = Twitter::API::Arguments.new(args)
      arguments.flatten.threaded_map do |id|
        object_from_response(Twitter::SavedSearch, :post, "/1.1/saved_searches/destroy/#{id}.json", arguments.options)
      end
    end

saved_searches(*args) click to toggle source

@rate_limited Yes @authentication Requires user context @raise [Twitter::Error::Unauthorized] Error raised when supplied user credentials are not valid. @return [Array<Twitter::SavedSearch>] The saved searches. @overload saved_search(options={})

    Returns the authenticated user's saved search queries

    @see https://dev.twitter.com/docs/api/1.1/get/saved_searches/list
    @param options [Hash] A customizable set of options.
    @example Return the authenticated user's saved search queries
      Twitter.saved_searches

@overload saved_search(*ids)

    Retrieve the data for saved searches owned by the authenticating user

    @see https://dev.twitter.com/docs/api/1.1/get/saved_searches/show/:id
    @param ids [Array<Integer>, Set<Integer>] An array of Tweet IDs.
    @example Retrieve the data for a saved search owned by the authenticating user with the ID 16129012
      Twitter.saved_search(16129012)

@overload saved_search(*ids, options)

    Retrieve the data for saved searches owned by the authenticating user

    @see https://dev.twitter.com/docs/api/1.1/get/saved_searches/show/:id
    @param ids [Array<Integer>, Set<Integer>] An array of Tweet IDs.
    @param options [Hash] A customizable set of options.

    # File lib/twitter/api/saved_searches.rb, line 34
    def saved_searches(*args)
      arguments = Twitter::API::Arguments.new(args)
      if arguments.empty?
        objects_from_response(Twitter::SavedSearch, :get, "/1.1/saved_searches/list.json", arguments.options)
      else
        arguments.flatten.threaded_map do |id|
          saved_search(id, arguments.options)
        end
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.