xstreamly 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/xstreamly.rb +4 -4
  2. 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('/apps/'+@appKey+'/channels/'+channel+'/events/'+eventName), initheader = {'Content-Type' =>'application/json'})
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('/apps/'+@appKey+'/subscriptions'), initheader = {'Content-Type' =>'application/json'})
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('/apps/'+@appKey+'/subscriptions/'+index.to_s), initheader = {'Content-Type' =>'application/json'})
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('/apps/'+@appKey+'/subscriptions'), initheader = {'Content-Type' =>'application/json'})
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: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 0
10
- version: 0.6.0
9
+ - 1
10
+ version: 0.6.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Willard