tedlinks 0.0.1 → 0.0.2
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.
- checksums.yaml +4 -4
- data/lib/tedlinks.rb +32 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4829b0e96f7fb765b7127c341cedffcaf23ec33f
|
4
|
+
data.tar.gz: 10d68719ec2a98f7658ecb78b68ecc7b48dd78dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcb3cefaf673e35aa724517ec913a006ce442f597e2b215bc96e2e445eda7a0356cb1a8af11b5cbd46af4e276696d1b997943336c7469348f1e9367125702a55
|
7
|
+
data.tar.gz: f36a26c59be14fea8ebc923c1d8a5ce3243d50d2fe0bb9d8aba01af5be163ed13afc86583e83f48048fc8162965a03c01004b5881bffcc4f30f255b6ab44f450
|
data/lib/tedlinks.rb
CHANGED
@@ -73,9 +73,40 @@ class TedLinks
|
|
73
73
|
return nil
|
74
74
|
else
|
75
75
|
puts "Successfully joined session: " + gid
|
76
|
-
|
76
|
+
player = TedPlayer.new(res[1].strip().to_i, username, gid.to_i)
|
77
|
+
player.setAdmin(pin)
|
78
|
+
return player
|
77
79
|
end
|
78
80
|
end
|
79
81
|
end
|
80
82
|
|
83
|
+
def closeSession(gid, pin)
|
84
|
+
res = self.action("?f=close&gid="+gid.to_s+"&pin="+pin.to_s).split(",")
|
85
|
+
if(res[0].strip() == "F") then
|
86
|
+
puts "Unable to close the session: "+gid.to_s
|
87
|
+
puts "Error: " + res[1].strip()
|
88
|
+
else
|
89
|
+
puts "Session sucessfully closed"
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def startSession(gid, pin)
|
94
|
+
res = self.action("?f=start&gid="+gid.to_s+"&pin="+pin.to_s).split(",")
|
95
|
+
if(res[0].strip() == "F") then
|
96
|
+
puts "Unable to start session: "+gid.to_s
|
97
|
+
puts "Error: " + res[1].strip()
|
98
|
+
else
|
99
|
+
puts "Session sucessfully started"
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def newRound(gid, pin)
|
104
|
+
res = self.action("?f=nrnd&gid="+gid.to_s+"&pin="+pin.to_s).split(",")
|
105
|
+
if(res[0].strip() == "F") then
|
106
|
+
puts "Unable to start the session anew"
|
107
|
+
puts "Error: " + res[1].strip()
|
108
|
+
else
|
109
|
+
puts "Session sucessfully restarted"
|
110
|
+
end
|
111
|
+
end
|
81
112
|
end
|