Class: Skype::Chat

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

Constant Summary collapse

OBJECT_NAME =
"CHAT"

Instance Attribute Summary

Attributes included from AbstractObject::Get

#property2callback, #property2symbol

Class Method Summary collapse

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

Class Method Details

.create(*users) ⇒ Object



7
8
9
10
11
# File 'lib/skype/chat.rb', line 7

def create *users
  Skype.invoke("CHAT CREATE #{users.join(', ')}") =~ /^CHAT ([^ ]+) STATUS (.+)$/
  chatID, status = $1, $2
  return Skype::Chat.new(chatID)#, status
end

.create_using_blob(blob) ⇒ Object Also known as: createUsingBlob



20
21
22
23
24
# File 'lib/skype/chat.rb', line 20

def create_using_blob blob
  Skype.invoke("CHAT CREATEUSINGBLOB #{blob}") =~ /^CHAT ([^ ]+) STATUS (.+)$/
  chatID, status = $1, $2
  return Skype::Chat.new(chatID)#, status
end

.find_using_blob(blob) ⇒ Object Also known as: findUsingBlob



13
14
15
16
17
# File 'lib/skype/chat.rb', line 13

def find_using_blob blob
  Skype.invoke("CHAT FINDUSINGBLOB #{blob}") =~ /^CHAT ([^ ]+) STATUS (.+)$/
  chatID, status = $1, $2
  return Skype::Chat.new(chatID)#, status
end

Instance Method Details

#acceptaddObject



151
# File 'lib/skype/chat.rb', line 151

def acceptadd() invoke_alter "ACCEPTADD" end

#add_members(*members) ⇒ Object Also known as: addMembers



134
# File 'lib/skype/chat.rb', line 134

def add_members(*members) invoke_alter "ADDMEMBERS",  members.join(', ') end

#bookmarkedObject



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

def bookmarked() invoke_alter "BOOKMARK" end

#clear_recent_messagesObject Also known as: clearRecentMessages



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

def clear_recent_messages() invoke_alter "CLEARRECENTMESSAGES" end

#disbandObject



153
# File 'lib/skype/chat.rb', line 153

def disband() invoke_alter "DISBAND" end

#enter_password(password) ⇒ Object Also known as: enterPassword



158
# File 'lib/skype/chat.rb', line 158

def enter_password(password) invoke_alter "ENTERPASSWORD", password end

#get_active_membersObject Also known as: getActiveMembers



64
# File 'lib/skype/chat.rb', line 64

def get_active_members() parse :active_members, invoke_get('ACTIVEMEMBERS') end

#get_activity_timestampObject Also known as: getActivityTimestamp



104
# File 'lib/skype/chat.rb', line 104

def get_activity_timestamp() parse :activity_timestamp, invoke_get('ACTIVITY_TIMESTAMP') end

#get_adderObject Also known as: getAdder



36
# File 'lib/skype/chat.rb', line 36

def get_adder() parse :adder, invoke_get('ADDER') end

#get_applicantsObject Also known as: getApplicants



124
# File 'lib/skype/chat.rb', line 124

def get_applicants() parse :applicants, invoke_get('APPLICANTS') end

#get_blobObject Also known as: getBlob



120
# File 'lib/skype/chat.rb', line 120

def get_blob() invoke_get 'BLOB' end

#get_bookmarkedObject Also known as: getBookmarked



76
# File 'lib/skype/chat.rb', line 76

def get_bookmarked() parse :bookmarked, invoke_get("BOOKMARKED") end

#get_chat_messagesObject Also known as: getChatMessages



60
# File 'lib/skype/chat.rb', line 60

def get_chat_messages() parse :chat_messages, invoke_get('CHATMESSAGES') end

#get_descriptionObject Also known as: getDescription



96
# File 'lib/skype/chat.rb', line 96

def get_description() invoke_get('DESCRIPTION') end

#get_dialog_partnerObject Also known as: getDialogPartner



100
# File 'lib/skype/chat.rb', line 100

def get_dialog_partner() parse :dialog_partner, invoke_get('DIALOG_PARTNER') end

#get_friendly_nameObject Also known as: getFriendlyName



68
# File 'lib/skype/chat.rb', line 68

def get_friendly_name() invoke_get('FRIENDLYNAME') end

#get_guidelinesObject Also known as: getGuidelines



88
# File 'lib/skype/chat.rb', line 88

def get_guidelines() invoke_get 'GUIDELINES' end

#get_member_objectsObject Also known as: getMemberObjects



80
# File 'lib/skype/chat.rb', line 80

def get_member_objects() parse :member_objects, invoke_get('MEMBEROBJECTS') end

#get_membersObject Also known as: getMembers



48
# File 'lib/skype/chat.rb', line 48

def get_members() parse :members, invoke_get('MEMBERS') end

#get_my_roleObject Also known as: getMyRole



116
# File 'lib/skype/chat.rb', line 116

def get_my_role() invoke_get 'MYROLE' end

#get_my_statusObject Also known as: getMyStatus



112
# File 'lib/skype/chat.rb', line 112

def get_my_status() invoke_get 'MYSTATUS' end

#get_nameObject Also known as: getName



28
# File 'lib/skype/chat.rb', line 28

def get_name() invoke_get('NAME') end

#get_optionsObject Also known as: getOptions



92
# File 'lib/skype/chat.rb', line 92

def get_options() parse :options, invoke_get('OPTIONS') end

#get_password_hintObject Also known as: getPasswordHint



84
# File 'lib/skype/chat.rb', line 84

def get_password_hint() invoke_get 'PASSWORDHINT' end

#get_postersObject Also known as: getPosters



44
# File 'lib/skype/chat.rb', line 44

def get_posters() parse :posters, invoke_get('POSTERS') end

#get_recent_chat_messagesObject Also known as: getRecentChatMessages



72
# File 'lib/skype/chat.rb', line 72

def get_recent_chat_messages() parse :recent_chat_messages, invoke_get('RECENTCHATMESSAGES') end

#get_statusObject Also known as: getStatus



40
# File 'lib/skype/chat.rb', line 40

def get_status() invoke_get 'STATUS' end

#get_timestampObject Also known as: getTimestamp



32
# File 'lib/skype/chat.rb', line 32

def get_timestamp() parse :timestamp, invoke_get('TIMESTAMP') end

#get_topicObject Also known as: getTopic



52
# File 'lib/skype/chat.rb', line 52

def get_topic() invoke_get('TOPIC') end

#get_topic_xmlObject Also known as: getTopicXML



56
# File 'lib/skype/chat.rb', line 56

def get_topic_xml() invoke_get('TOPICXML') end

#get_typeObject Also known as: getType



108
# File 'lib/skype/chat.rb', line 108

def get_type() invoke_get 'TYPE' end

#joinObject



143
# File 'lib/skype/chat.rb', line 143

def join() invoke_alter "JOIN" end

#kick(*users) ⇒ Object



164
# File 'lib/skype/chat.rb', line 164

def kick(*users) invoke_alter "KICK", users.join(', ') end

#kickban(*users) ⇒ Object



166
# File 'lib/skype/chat.rb', line 166

def kickban(*users) invoke_alter "KICKBAN", users.join(', ') end

#leaveObject



137
# File 'lib/skype/chat.rb', line 137

def leave() invoke_alter "LEAVE" end

#send_message(strings) ⇒ Object Also known as: sendMessage



172
# File 'lib/skype/chat.rb', line 172

def send_message(strings) Skype::ChatMessage.create self, strings end

#set_alert_string(string) ⇒ Object Also known as: setAlertString



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

def set_alert_string(string) invoke_alter "SETALERTSTRING", string end

#set_guidelines(guidlines) ⇒ Object Also known as: setGuideLines



168
# File 'lib/skype/chat.rb', line 168

def set_guidelines(guidlines) invoke_alter 'SETGUIDELINES', guidlines end

#set_options(option) ⇒ Object Also known as: setOptions



161
# File 'lib/skype/chat.rb', line 161

def set_options(option) invoke_alter "SETOPTIONS", option.to_s end

#set_password(password, passwordHint = '') ⇒ Object Also known as: setPassword



155
# File 'lib/skype/chat.rb', line 155

def set_password(password, passwordHint='') invoke_alter "SETPASSWORD", password + ' ' + passwordHint end

#set_topic(topic) ⇒ Object Also known as: setTopic



128
# File 'lib/skype/chat.rb', line 128

def set_topic(topic) invoke_alter "SETTOPIC", topic end

#set_topic_xml(topic) ⇒ Object Also known as: setTopicXML



131
# File 'lib/skype/chat.rb', line 131

def set_topic_xml(topic) invoke_alter "SETTOPICXML", topic end

#unbookmarkedObject



141
# File 'lib/skype/chat.rb', line 141

def unbookmarked() invoke_alter "UNBOOKMARK" end