class Gnip::Actor

  1. lib/gnip_api/gnip/actor.rb
Superclass: Message

Public Class methods

new (params = {})
[show source]
# File lib/gnip_api/gnip/actor.rb, line 7
def initialize params = {}
  @raw = params
  @object_type = params['objectType']
  @id = params['id']
  @link = params['link']
  @display_name = params['displayName']
  @posted_time = params['postedTime']
  @image = params['image']
  @summary = params['summary']
  @links = params['links']
  @friends_count = params['friendsCount']
  @followers_count = params['followersCount']
  @listed_count = params['listedCount']
  @statuses_count = params['statusesCount']
  @twitter_time_zone = params['twitterTimeZone']
  @verified = params['verified']
  @utc_offset = params['utcOffset']
  @preferred_username = params['preferredUsername']
  @languages = params['languages'].join(',')
  @location = params['location']
  @favorites_count = params['favoritesCount']
end

Public Instance methods

original_attributes ()
[show source]
# File lib/gnip_api/gnip/actor.rb, line 30
def original_attributes
  {
    :objectType => @object_type,
    :id => @id,
    :link => @link,
    :displayName => @display_name,
    :postedTime => @posted_time,
    :image => @image,
    :summary => @summary,
    :links => @links,
    :friendsCount => @friends_count,
    :followersCount => @followers_count,
    :listedCount => @listed_count,
    :statusesCount => @statuses_count,
    :twitterTimeZone => @twitter_time_zone,
    :verified => @verified,
    :utcOffset => @utc_offset,
    :preferredUsername => @preferred_username,
    :languages => @languages.split(','),
    :location => @location,
    :favoritesCount => @favorites_count
  }
end
to_json ()
[show source]
# File lib/gnip_api/gnip/actor.rb, line 62
def to_json
  @raw.to_json
end
user_id ()
[show source]
# File lib/gnip_api/gnip/actor.rb, line 54
def user_id
  @id.split(':').last
end