xstreamly 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xstreamly.rb +4 -4
- metadata +3 -3
data/lib/xstreamly.rb
CHANGED
@@ -14,7 +14,7 @@ module XStreamly
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def send(channel, eventName, data)
|
17
|
-
req = Net::HTTP::Post.new(URI.encode('/
|
17
|
+
req = Net::HTTP::Post.new(URI.encode('/api/v1.0/'+@appKey+'/channels/'+channel+'/events/'+eventName), initheader = {'Content-Type' =>'application/json'})
|
18
18
|
req.basic_auth @email, @password
|
19
19
|
|
20
20
|
req.body = data
|
@@ -28,7 +28,7 @@ module XStreamly
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def setCallback(channel,endPoint,secret,eventName)
|
31
|
-
req = Net::HTTP::Post.new(URI.encode('/
|
31
|
+
req = Net::HTTP::Post.new(URI.encode('/api/v1.0/'+@appKey+'/subscriptions'), initheader = {'Content-Type' =>'application/json'})
|
32
32
|
req.basic_auth @email, @password
|
33
33
|
|
34
34
|
req.body = '{"channel":"'+channel+'","endpoint":"'+endPoint+'", "secret":"'+secret+'"}'
|
@@ -43,7 +43,7 @@ module XStreamly
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def removeCallback(index)
|
46
|
-
req = Net::HTTP::Delete.new(URI.encode('/
|
46
|
+
req = Net::HTTP::Delete.new(URI.encode('/api/v1.0/'+@appKey+'/subscriptions'+index.to_s), initheader = {'Content-Type' =>'application/json'})
|
47
47
|
req.basic_auth @email, @password
|
48
48
|
response = @http.request(req)
|
49
49
|
|
@@ -56,7 +56,7 @@ module XStreamly
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def getCallbacks()
|
59
|
-
req = Net::HTTP::Get.new(URI.encode('/
|
59
|
+
req = Net::HTTP::Get.new(URI.encode('/api/v1.0/'+@appKey+'/subscriptions'), initheader = {'Content-Type' =>'application/json'})
|
60
60
|
req.basic_auth @email, @password
|
61
61
|
response = @http.request(req)
|
62
62
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xstreamly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 5
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 1
|
10
|
+
version: 0.6.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Brian Willard
|