em-msn 0.5 → 0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +2 -1
- data/lib/msn/messenger.rb +10 -10
- data/lib/msn/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -43,7 +43,8 @@ MSN client (EventMachine + Ruby)
|
|
43
43
|
msn.on_contact_request do |email, display_name|
|
44
44
|
puts "Contact request from #{display_name} <#{email}>"
|
45
45
|
|
46
|
-
msn.
|
46
|
+
msn.add_to_friends_list email
|
47
|
+
msn.add_to_allowed_list email
|
47
48
|
end
|
48
49
|
|
49
50
|
msn.connect
|
data/lib/msn/messenger.rb
CHANGED
@@ -45,24 +45,24 @@ class Msn::Messenger
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
# Adds a contact
|
49
|
-
def
|
48
|
+
# Adds a contact to your friends list.
|
49
|
+
def add_to_friends_list(email)
|
50
50
|
send_contact_command email, 'ADL', '1'
|
51
51
|
end
|
52
52
|
|
53
|
-
# Removes a contact
|
54
|
-
def
|
53
|
+
# Removes a contact from your friends list.
|
54
|
+
def remove_from_friends_list(email)
|
55
55
|
send_contact_command email, 'RML', '1'
|
56
56
|
end
|
57
57
|
|
58
|
-
#
|
59
|
-
def
|
60
|
-
send_contact_command email, '
|
58
|
+
# Adds a contact to your allowed list.
|
59
|
+
def add_to_allowed_list(email)
|
60
|
+
send_contact_command email, 'ADL', '2'
|
61
61
|
end
|
62
62
|
|
63
|
-
#
|
64
|
-
def
|
65
|
-
send_contact_command email, '
|
63
|
+
# Removes a contact from your allowed list.
|
64
|
+
def remove_from_allowed_list(email)
|
65
|
+
send_contact_command email, 'RML', '2'
|
66
66
|
end
|
67
67
|
|
68
68
|
# Returns all contacts associated to this Messenger account.
|
data/lib/msn/version.rb
CHANGED