Class: Twitter::Relationship

### Home Classes Methods

### In Files

- lib/twitter/relationship.rb

### Parent

Twitter::Base

### Methods

- ::new
- #source
- #target
- #update

### 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::Relationship

### Public Class Methods

new(attrs={}) click to toggle source

Initializes a new object

@param attrs [Hash] @return [Twitter::Relationship]

    # File lib/twitter/relationship.rb, line 10
    def initialize(attrs={})
      @attrs = attrs[:relationship]
    end

### Public Instance Methods

source() click to toggle source

@return [Twitter::SourceUser]

    # File lib/twitter/relationship.rb, line 15
    def source
      @source ||= Twitter::SourceUser.fetch_or_new(@attrs[:source])
    end

target() click to toggle source

@return [Twitter::TargetUser]

    # File lib/twitter/relationship.rb, line 20
    def target
      @target ||= Twitter::TargetUser.fetch_or_new(@attrs[:target])
    end

update(attrs) click to toggle source

Update the attributes of a Relationship

@param attrs [Hash] @return [Twitter::Relationship]

    # File lib/twitter/relationship.rb, line 28
    def update(attrs)
      @attrs.update(attrs[:relationship]) unless attrs[:relationship].nil?
      self
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.