Class: Skype::User

Inherits:
AbstractObject show all
Defined in:
lib/skype/user.rb

Constant Summary collapse

OBJECT_NAME =
"USER"

Instance Attribute Summary

Attributes included from AbstractObject::Get

#property2callback, #property2symbol

Instance Method Summary collapse

Methods inherited from AbstractObject

inherited, #initialize, new, notified, #to_s

Methods included from AbstractObject::Notify

#delNotify, #notified, #notify, #setNotify

Methods included from AbstractObject::Get

#def_parser, #notice

Methods included from AbstractObject::Invokers

#invoke_alter, #invoke_echo, #invoke_get, #invoke_one, #invoke_set

Constructor Details

This class inherits a constructor from Skype::AbstractObject

Instance Method Details

#add_contactlist(msg = "") ⇒ Object Also known as: addContactlist



152
153
154
155
# File 'lib/skype/user.rb', line 152

def add_contactlist msg=""
  val = invoke_set("BUDDYSTATUS","2 #{msg}")
  val == 2 or val == 3
end

#added_contactlist?Boolean Also known as: addedContactlist?

Returns:

  • (Boolean)


158
159
160
161
# File 'lib/skype/user.rb', line 158

def added_contactlist?
  val = get_buddy_status
  val == 3 or val == 2
end

#del_contactlistObject Also known as: delContactlist



164
165
166
# File 'lib/skype/user.rb', line 164

def del_contactlist
  invoke_set("BUDDYSTATUS","1") == 1
end

#get_aboutObject Also known as: getAbout



53
# File 'lib/skype/user.rb', line 53

def get_about() invoke_get("ABOUT") end

#get_aliasesObject Also known as: getAliases



109
# File 'lib/skype/user.rb', line 109

def get_aliases() invoke_get("ALIASES") end

#get_avatar(file_path) ⇒ Object Also known as: getAvatar



129
# File 'lib/skype/user.rb', line 129

def get_avatar(file_path) invoke("GET USER #{@id} AVATAR 1 #{file_path}") =~ /^USER #{@id} AVATAR \d+ (.+)$/ end

#get_birthdayObject Also known as: getBirthday



13
# File 'lib/skype/user.rb', line 13

def get_birthday() parse :birthday, invoke_get("BIRTHDAY") end

#get_buddy_statusObject Also known as: getBuddyStatus



69
# File 'lib/skype/user.rb', line 69

def get_buddy_status() parse :buddy_status, invoke_get("BUDDYSTATUS") end

#get_can_leave_vm?Boolean Also known as: getCanLeaveVM?

Returns:

  • (Boolean)


89
# File 'lib/skype/user.rb', line 89

def get_can_leave_vm?() parse :can_leave_vm, invoke_get("CAN_LEAVE_VM") end

#get_cityObject Also known as: getCity



33
# File 'lib/skype/user.rb', line 33

def get_city() invoke_get("CITY") end

#get_countryObject Also known as: getCountry



25
# File 'lib/skype/user.rb', line 25

def get_country() parse :country, invoke_get("COUNTRY") end

#get_displaynameObject Also known as: getDisplayname



125
# File 'lib/skype/user.rb', line 125

def get_displayname() invoke_get("DISPLAYNAME") end

#get_fullnameObject Also known as: getFullname



9
# File 'lib/skype/user.rb', line 9

def get_fullname() invoke_get("FULLNAME") end

#get_handleObject Also known as: getHandle



5
# File 'lib/skype/user.rb', line 5

def get_handle() invoke_get("HANDLE") end

#get_has_call_equipment?Boolean Also known as: getHasCallEquipment?

Returns:

  • (Boolean)


57
# File 'lib/skype/user.rb', line 57

def get_has_call_equipment?() parse :has_call_equipment, invoke_get("HASCALLEQUIPMENT") end

#get_homepageObject Also known as: getHomepage



49
# File 'lib/skype/user.rb', line 49

def get_homepage() invoke_get("HOMEPAGE") end

#get_is_authorized?Boolean Also known as: getIsAuthorized?

Returns:

  • (Boolean)


73
# File 'lib/skype/user.rb', line 73

def get_is_authorized?() parse :is_authorized, invoke_get("ISAUTHORIZED") end

#get_is_blocked?Boolean Also known as: getIsBlocked?

Returns:

  • (Boolean)


77
# File 'lib/skype/user.rb', line 77

def get_is_blocked?() parse :is_blocked, invoke_get("ISBLOCKED") end

#get_is_cf_active?Boolean Also known as: getIsCFActive?

Returns:

  • (Boolean)


117
# File 'lib/skype/user.rb', line 117

def get_is_cf_active?() parse :is_cf_active, invoke_get("IS_CF_ACTIVE") end

#get_is_video_capable?Boolean Also known as: getIsVideoCapable?

Returns:

  • (Boolean)


61
# File 'lib/skype/user.rb', line 61

def get_is_video_capable?() parse :is_video_capable, invoke_get("IS_VIDEO_CAPABLE") end

#get_is_voicemail_capable?Boolean Also known as: getIsVoicemailCapable?

Returns:

  • (Boolean)


65
# File 'lib/skype/user.rb', line 65

def get_is_voicemail_capable?() parse :is_voicemail_capable, invoke_get("IS_VOICEMAIL_CAPABLE") end

#get_languageObject Also known as: getLanguage



21
# File 'lib/skype/user.rb', line 21

def get_language() parse :language, invoke_get("LANGUAGE") end

#get_last_online_timestampObject Also known as: getLastOnlineTimestamp



85
# File 'lib/skype/user.rb', line 85

def get_last_online_timestamp() parse :last_online_timestamp, invoke_get("LASTONLINETIMESTAMP") end

#get_mood_textObject Also known as: getMoodText



101
# File 'lib/skype/user.rb', line 101

def get_mood_text() invoke_get("MOOD_TEXT") end

#get_nrof_authed_buddiesObject Also known as: getNrofAuthedBuddies



121
# File 'lib/skype/user.rb', line 121

def get_nrof_authed_buddies() parse :nrof_authed_buddies, invoke_get("NROF_AUTHED_BUDDIES") end

#get_online_statusObject Also known as: getOnlineStatus



81
# File 'lib/skype/user.rb', line 81

def get_online_status() parse :online_status, invoke_get("ONLINESTATUS") end

#get_phone_homeObject Also known as: getPhoneHome



37
# File 'lib/skype/user.rb', line 37

def get_phone_home() invoke_get("PHONE_HOME") end

#get_phone_mobileObject Also known as: getPhoneMobile



45
# File 'lib/skype/user.rb', line 45

def get_phone_mobile() invoke_get("PHONE_MOBILE") end

#get_phone_officeObject Also known as: getPhoneOffice



41
# File 'lib/skype/user.rb', line 41

def get_phone_office() invoke_get("PHONE_OFFICE") end

#get_provinceObject Also known as: getProvince



29
# File 'lib/skype/user.rb', line 29

def get_province() invoke_get("PROVINCE") end

#get_received_auth_requestObject Also known as: getReceivedAuthRequest



97
# File 'lib/skype/user.rb', line 97

def get_received_auth_request() invoke_get("RECEIVEDAUTHREQUEST") end

#get_rich_mood_textObject Also known as: getRichMoodText



105
# File 'lib/skype/user.rb', line 105

def get_rich_mood_text() invoke_get("RICH_MOOD_TEXT") end

#get_sexObject Also known as: getSex



17
# File 'lib/skype/user.rb', line 17

def get_sex() invoke_get("SEX") end

#get_speed_dialObject Also known as: getSpeedDial



93
# File 'lib/skype/user.rb', line 93

def get_speed_dial() invoke_get("SPEEDDIAL") end

#get_timezoneObject Also known as: getTimezone



113
# File 'lib/skype/user.rb', line 113

def get_timezone() parse :timezone, invoke_get("TIMEZONE") end

#set_buddy_status(statusCode, msg = "") ⇒ Object Also known as: setBuddyStatus

Raises:

  • (ArgumentErorr)


133
134
135
136
# File 'lib/skype/user.rb', line 133

def set_buddy_status(statusCode, msg="")
  raise ArgumentErorr unless statusCode.to_i == 1 or statusCode.to_i == 2
  invoke_set('BUDDYSTATUS',"#{statusCode} #{msg}")
end

#set_displayname(name) ⇒ Object Also known as: setDisplayname



148
# File 'lib/skype/user.rb', line 148

def set_displayname(name) invoke_set('DISPLAYNAME', name);end

#set_is_authorized(flag) ⇒ Object Also known as: setIsAuthorized



142
# File 'lib/skype/user.rb', line 142

def set_is_authorized(flag) invoke_set('ISAUTHORIZED', flag ? 'TRUE' : 'FALSE') end

#set_is_blocked(flag) ⇒ Object Also known as: setIsBlocked



139
# File 'lib/skype/user.rb', line 139

def set_is_blocked(flag) invoke_set('ISBLOCKED', flag ? 'TRUE' : 'FALSE') end

#set_speed_dial(numbers) ⇒ Object Also known as: setSpeedDial



145
# File 'lib/skype/user.rb', line 145

def set_speed_dial(numbers) invoke_set('SPEEDDIAL', numbers) end