opentok 0.0.91 → 0.0.92

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -134,3 +134,12 @@ Example:
134
134
  url = otArchive.downloadArchiveURL(video_id, token)
135
135
  </pre>
136
136
 
137
+ -----
138
+
139
+ # Contributing
140
+ To contribute, simple fork this repository and send a pull request when you are done.
141
+ Before you send pull requests, make sure all test cases are passing.
142
+
143
+ To install necessary gems, type `bundle install` in the root directory.
144
+
145
+ To run test cases, type `rspec spec/` in the root directory.
@@ -28,9 +28,6 @@ module OpenTok
28
28
  return "#{@api_url}/archive/url/#{@archive_id}/#{video_id}"
29
29
  else
30
30
  doc = do_request "/archive/url/#{@archive_id}/#{video_id}", token
31
- if doc.split("http").length < 2
32
- raise OpenTokException.new doc.get_elements('Errors')[0].get_elements('error')[0].children.to_s
33
- end
34
31
  return doc
35
32
  end
36
33
  end
@@ -51,7 +51,7 @@ module OpenTok
51
51
  # that are provided to you.
52
52
  def initialize(partner_id, partner_secret, backSupport="")
53
53
  @partner_id = partner_id
54
- @partner_secret = partner_secret.strip
54
+ @partner_secret = partner_secret
55
55
  @api_url = API_URL
56
56
  end
57
57
 
@@ -130,7 +130,7 @@ module OpenTok
130
130
 
131
131
  def delete_archive( aid, token )
132
132
  deleteURL = "/hl/archive/delete/#{aid}"
133
- doc = do_request( deleteURL, {test:'none'}, token )
133
+ doc = do_request( deleteURL, {test => 'none'}, token )
134
134
  errors = doc.get_elements('Errors')
135
135
  if doc.get_elements('Errors').empty?
136
136
  #error = errors[0].get_elements('error')[0]
@@ -145,7 +145,7 @@ module OpenTok
145
145
  def stitchArchive(aid)
146
146
  stitchURL = "/hl/archive/#{aid}/stitch"
147
147
  request = OpenTok::Request.new(@api_url, nil, @partner_id, @partner_secret)
148
- response = request.sendRequest(stitchURL, {test:'none'})
148
+ response = request.sendRequest(stitchURL, {test => 'none'})
149
149
  case response.code
150
150
  when '201'
151
151
  return {:code=>201, :message=>"Successfully Created", :location=>response["location"]}
@@ -1,3 +1,3 @@
1
1
  module Opentok
2
- VERSION = "0.0.91"
2
+ VERSION = "0.0.92"
3
3
  end
@@ -42,4 +42,50 @@ http_interactions:
42
42
  '
43
43
  http_version:
44
44
  recorded_at: Fri, 07 Sep 2012 21:56:17 GMT
45
+ - request:
46
+ method: get
47
+ uri: https://api.opentok.com/hl/archive/delete/200567af-0726-4e93-883b-fe0426d6310a
48
+ body:
49
+ encoding: US-ASCII
50
+ string: ''
51
+ headers:
52
+ Accept:
53
+ - ! '*/*'
54
+ User-Agent:
55
+ - Ruby
56
+ X-Tb-Token-Auth:
57
+ - T1==cGFydG5lcl9pZD00NTk3ODImc2lnPTFlNGEyMjBlN2JhOWI1YjJlM2I3ZDcyMDg1MzVkNzkwN2UzMDM1NjA6cm9sZT1wdWJsaXNoZXImc2Vzc2lvbl9pZD0xX01YNDBOVGszT0RKLU1USTNMakF1TUM0eGZsUjFaU0JUWlhBZ01EUWdNVFE2TlRNNk1ESWdVRVJVSURJd01USi1NQzQxTWpFeE9ERXpmZyZjcmVhdGVfdGltZT0xMzUxNTUzNzk0Jm5vbmNlPTAuMTgyMjczODY3NTc2NjAyOA==
58
+ response:
59
+ status:
60
+ code: 404
61
+ message: Not Found
62
+ headers:
63
+ Server:
64
+ - nginx
65
+ Date:
66
+ - Mon, 29 Oct 2012 23:36:32 GMT
67
+ Content-Type:
68
+ - text/html; charset=utf-8
69
+ Connection:
70
+ - keep-alive
71
+ Pragma:
72
+ - no-cache
73
+ Cache-Control:
74
+ - no-cache
75
+ Content-Length:
76
+ - '792'
77
+ body:
78
+ encoding: US-ASCII
79
+ string: ! "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html
80
+ xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n
81
+ <title>Server Error 404</title>\n<!-- CSS Imports -->\n<link rel=\"stylesheet\"
82
+ href=\"/error/style/black.css\" type=\"text/css\" media=\"screen\" />\n\n<!--
83
+ Favorite Icons -->\n<link rel=\"icon\" href=\"/error/img/favicon.ico\" type=\"image/png\"
84
+ />\n\n<style type=\"text/css\">\n .red {\n color:#FF0000;\n
85
+ \ }\n .bold {\n font-weight: bold;\n }\n</style>\n</head>\n\n<body>\n
86
+ \ <div id=\"container\">\n <html>\n <head>\n <title>404 Not Found</title>\n
87
+ </head>\n <body>\n <h1>404 Not Found</h1>\n The resource could not be found.<br
88
+ /><br />\n\n\n\n </body>\n</html>\n </div>\n</body>\n</html>\n"
89
+ http_version:
90
+ recorded_at: Mon, 29 Oct 2012 23:36:34 GMT
45
91
  recorded_with: VCR 2.2.4
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentok
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.91
4
+ version: 0.0.92
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2012-09-07 00:00:00.000000000 Z
14
+ date: 2012-10-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake