rb-skypemac 0.2.0 → 0.2.1
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/lib/rb-skypemac/call.rb +4 -4
- data/lib/rb-skypemac/version.rb +1 -1
- data/website/index.html +6 -2
- data/website/index.txt +5 -1
- metadata +2 -2
data/lib/rb-skypemac/call.rb
CHANGED
@@ -9,14 +9,14 @@ module SkypeMac
|
|
9
9
|
class Call
|
10
10
|
@@TOGGLE_FLAGS = [:START, :STOP]
|
11
11
|
|
12
|
-
attr :
|
12
|
+
attr :call_id
|
13
13
|
|
14
14
|
# Creates and initializes a Skype call. Accepts the handle of the user to call or a User object
|
15
15
|
def initialize(user)
|
16
16
|
user = user.handle if user.is_a? User
|
17
17
|
status = Skype.send_ :command => "call #{user}"
|
18
18
|
if status =~ /CALL (\d+) STATUS/
|
19
|
-
@
|
19
|
+
@call_id = $1
|
20
20
|
else
|
21
21
|
raise Error.new("Could not obtain Call ID")
|
22
22
|
end
|
@@ -25,13 +25,13 @@ module SkypeMac
|
|
25
25
|
# Attempts to hang up a call.<br>
|
26
26
|
# <b>Note</b>: If Skype hangs while placing the call, this method could hang indefinitely
|
27
27
|
def hangup
|
28
|
-
Skype.send_ :command => "set call #{@
|
28
|
+
Skype.send_ :command => "set call #{@call_id} status finished"
|
29
29
|
end
|
30
30
|
|
31
31
|
# Retrieves the status of the current call.<br>
|
32
32
|
# <b>Untested</b>
|
33
33
|
def status
|
34
|
-
Skype.send_ :command => "get call #{@
|
34
|
+
Skype.send_ :command => "get call #{@call_id} status"
|
35
35
|
end
|
36
36
|
|
37
37
|
# Returns one of: VIDEO_NONE, VIDEO_SEND_ENABLED, VIDEO_RECV_ENABLED, VIDEO_BOTH_ENABLED
|
data/lib/rb-skypemac/version.rb
CHANGED
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>rb skypemac</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/rb-skypemac"; return false'>
|
35
35
|
Get Version
|
36
|
-
<a href="http://rubyforge.org/projects/rb-skypemac" class="numbers">0.2.
|
36
|
+
<a href="http://rubyforge.org/projects/rb-skypemac" class="numbers">0.2.1</a>
|
37
37
|
</div>
|
38
38
|
<h1>→ ‘rb-skypemac’</h1>
|
39
39
|
|
@@ -63,6 +63,10 @@ call = Skype.call "echo123"
|
|
63
63
|
# Disconnect a call
|
64
64
|
call.hangup
|
65
65
|
|
66
|
+
sleight42 = Skype.online_friends.find { |u| u.handle == "sleight42" }
|
67
|
+
call = Skype.call sleight42
|
68
|
+
call.hangup # no one wants to talk to him anyway
|
69
|
+
|
66
70
|
# Set your user status to away
|
67
71
|
Iam.away
|
68
72
|
|
@@ -81,7 +85,7 @@ Iam.online
|
|
81
85
|
|
82
86
|
<p>Comments are welcome. Send an email to <a href="mailto:sleight42@gmail.com">Evan Light</a>.</p>
|
83
87
|
<p class="coda">
|
84
|
-
<a href="mailto:sleight42@gmail.com.com">Evan Light</a>,
|
88
|
+
<a href="mailto:sleight42@gmail.com.com">Evan Light</a>, 26th April 2007<br>
|
85
89
|
</p>
|
86
90
|
</div>
|
87
91
|
|
data/website/index.txt
CHANGED
@@ -18,11 +18,15 @@ require 'rb-skypemac'
|
|
18
18
|
include SkypeMac
|
19
19
|
|
20
20
|
# Place a call to the 'echo123' user
|
21
|
-
call = Skype.call "echo123"
|
21
|
+
call = Skype.call "echo123"
|
22
22
|
|
23
23
|
# Disconnect a call
|
24
24
|
call.hangup
|
25
25
|
|
26
|
+
sleight42 = Skype.online_friends.find { |u| u.handle == "sleight42" }
|
27
|
+
call = Skype.call sleight42
|
28
|
+
call.hangup # no one wants to talk to him anyway
|
29
|
+
|
26
30
|
# Set your user status to away
|
27
31
|
Iam.away
|
28
32
|
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rb-skypemac
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-04-
|
6
|
+
version: 0.2.1
|
7
|
+
date: 2007-04-28 00:00:00 -04:00
|
8
8
|
summary: Ruby interface to Skype on Mac OS X
|
9
9
|
require_paths:
|
10
10
|
- lib
|