opentok 0.0.73 → 0.0.91

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,5 +1,15 @@
1
1
  = Change Log
2
2
 
3
+ == Version 0.0.8
4
+
5
+ * Removed references to the staging environment as it no longer exists
6
+
7
+ == Version 0.0.73
8
+
9
+ * Added stitchArchive functionality
10
+ * Updated Test Cases ( thanks to https://github.com/rlivsey )
11
+ * Download Archive duplication and error catching ( thanks to https://github.com/muescha )
12
+
3
13
  == Version 0.0.5
4
14
 
5
15
  * Added connection_data to generate token method (thanks to https://github.com/jonmumm)
@@ -20,4 +30,4 @@
20
30
 
21
31
  == Version 0.0.1
22
32
 
23
- Initial version
33
+ Initial version
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright (c) 2012 TokBox, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+ The software complies with Terms of Service for the OpenTok platform described in http://www.tokbox.com/termsofservice
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -12,29 +12,22 @@ gem 'opentok'
12
12
 
13
13
  To install as a regular gem just type `gem install opentok`
14
14
 
15
- # Requirements
15
+ ## Requirements
16
16
 
17
- You need an api-key and secret. Request them at <http://www.tokbox.com/opentok/tools/js/apikey>.
17
+ You need an api-key and secret. Request them at <http://www.tokbox.com/opentok/tools/js/apikey>.
18
18
 
19
19
  # OpenTokSDK
20
20
 
21
21
  In order to use any of the server side functions, you must first create an `OpenTokSDK` object with your developer credentials.
22
-
23
22
  `OpenTokSDK` takes 2-3 parameters:
24
23
  > key (string) - Given to you when you register
25
24
  > secret (string) - Given to you when you register
26
- > Production (Boolean) - OPTIONAL. Puts your app in staging or production environment. Default value is `false`
27
- For more information about production apps, check out <http://www.tokbox.com/opentok/api/tools/js/launch>
28
-
29
25
 
30
26
  <pre>
31
- # Creating an OpenTok Object in Staging Environment
27
+ # Creating an OpenTok Object
32
28
  API_KEY = '' # should be a string
33
29
  API_SECRET = '' # should be a string
34
30
  OTSDK = OpenTok::OpenTokSDK.new API_KEY, API_SECRET
35
-
36
- # Creating an OpenTok Object in Production Environment
37
- OTSDK = OpenTok::OpenTokSDK.new API_KEY, API_SECRET, true
38
31
  </pre>
39
32
 
40
33
 
@@ -66,41 +59,71 @@ With the generated sessionId, you can start generating tokens for each user.
66
59
  token = OTSDK.generateToken :session_id => session, :role => OpenTok::RoleConstants::PUBLISHER, :connection_data => "username=Bob,level=4"
67
60
  </pre>
68
61
 
69
- ### Downloading Archive Videos
70
- To Download archived video, you must have an Archive ID which you get from the javascript library
62
+ # Manipulating Archive Videos
63
+ To Download or delete archived video, you must have an Archive ID which you get from the javascript library. If you are unfamiliar with archiving concepts, please visit our [archiving tutorial](http://www.tokbox.com/opentok/api/documentation/gettingstartedarchiving)
71
64
 
72
- #### Quick Overview of the javascript library: <http://www.tokbox.com/opentok/api/tools/js/documentation/api/Session.html#createArchive>
73
- 1. Create an event listener on `archiveCreated` event: `session.addEventListener('archiveCreated', archiveCreatedHandler);`
74
- 2. Create an archive: `archive = session.createArchive(...);`
75
- 3. When archive is successfully created `archiveCreatedHandler` would be triggered. An Archive object containing `archiveId` property is passed into your function. Save this in your database, this archiveId is what you use to reference the archive for playbacks and download videos
76
- 4. After your archive has been created, you can start recording videos into it by calling `session.startRecording(archive)`
77
- Optionally, you can also use the standalone archiving, which means that each archive would have only 1 video: <http://www.tokbox.com/opentok/api/tools/js/documentation/api/RecorderManager.html>
65
+ # Delete Archives
66
+ OpenTok SDK has a function `deleteArchive` that lets you delete videos in a recorded archive.
67
+ Use your `OpenTokSDK` object to call `deleteArchive`
68
+ `deleteArchive` takes in 2 parameters and returns a true or false boolean representing the success of the delete request
69
+ > archive_id (string) - REQUIRED
70
+ > token (string) - REQUIRED. This token MUST have a moderator role, and it should be generated with the same session_id used to create the archive
71
+ > **returns**
72
+ true: Success, the archive is deleted
73
+ false: Archive does not exist (perhaps it was already deleted or never created), invalid token (perhaps it does not have the moderator role or it's generated with the wrong session_id)
78
74
 
79
- ### Get Archive Manifest
75
+ Example:
76
+ <pre>
77
+ successful = OTSDK.deleteArchive( archive_id, token )
78
+ </pre>
79
+
80
+ # Stitching Archives
81
+ OpenTok SDK allows you to stich up to 4 videos together in an archive.
82
+ Use your `OpenTokSDK` object to call stitchArchive
83
+ stitchArchive takes in 1 parameter and returns a hash object with code, message, and location if stitch is successful.
84
+ > archive_id (string) - REQUIRED
85
+ > **returns**:
86
+ {:code=>201, :message=>"Successfully Created", :location=>response["location"]}
87
+ {:code=>202, :message=>"Processing"}
88
+ {:code=>403, :message=>"Invalid Credentials"}
89
+ {:code=>404, :message=>"Archive Does Not Exist"}
90
+ {:code=>500, :message=>"Server Error"}
91
+
92
+ Example:
93
+ <pre>
94
+ result = OTSDK.stitchArchive archive_id
95
+ if result[:code] == 201
96
+ return result[:location]
97
+ end
98
+ </pre>
99
+
100
+ # Get Archive Manifest
80
101
  With your **moderator token** and OpentokSDK Object, you can generate OpenTokArchive Object, which contains information for all videos in the Archive
81
- `get_archive_manifest()` takes in 2 parameters: **archiveId** and **moderator token**
102
+ `getArchiveManifest()` takes in 2 parameters: **archiveId** and **moderator token**
82
103
  > archive_id (string) - REQUIRED.
83
- > **returns** an `OpenTokArchive` object. The *resources* property of this object is array of `OpenTokArchiveVideoResource` objects, and each `OpenTokArchiveVideoResource` object represents a video in the archive.
104
+ > token (string) - REQUIRED.
105
+ > **returns** an `OpenTokArchive` object.
106
+ The *resources* property of this object is array of `OpenTokArchiveVideoResource` objects, and each `OpenTokArchiveVideoResource` object represents a video in the archive.
84
107
 
85
108
  Example:(Make sure you have the OpentokSDK Object)
86
109
  <pre>
87
- @token = 'moderator_token'
110
+ @token = '...' # token generated with corresponding session
88
111
  @archiveId = '5f74aee5-ab3f-421b-b124-ed2a698ee939' #Obtained from Javascript Library
89
- otArchive = OTSDK.get_archive_manifest(@archiveId, @token)
112
+ otArchive = OTSDK.getArchiveManifest(@archiveId, @token)
90
113
  </pre>
91
114
 
92
- ### Get video ID
93
- `OpenTokArchive.resources` is an array of `OpenTokArchiveVideoResource` objects. OpenTokArchiveVideoResource has `getId()` method that returns the videoId
115
+ # Get video ID
116
+ `OpenTokArchive.resources` is an array of `OpenTokArchiveVideoResource` objects. OpenTokArchiveVideoResource has `getId()` method that returns the video_id
94
117
  `getId()` will return the video ID (a String)
95
118
 
96
119
  Example:
97
120
  <pre>
98
- otArchive = OTSDK.get_archive_manifest(@archiveId, @token)
121
+ otArchive = OTSDK.getArchiveManifest(@archiveId, @token)
99
122
  otVideoResource = otArchive.resources[0]
100
123
  videoId = otVideoResource.getId()
101
124
  </pre>
102
125
 
103
- ### Get Download Url
126
+ # Get Download Url
104
127
  `OpenTokArchive` has `downloadArchiveURL` that will return an url string for downloading the video in the archive. You must call this function every time you want the file, because this url expires after 24 hours
105
128
  > video_id (string) - REQUIRED
106
129
  > token (string) - REQUIRED
@@ -110,3 +133,4 @@ Example:
110
133
  <pre>
111
134
  url = otArchive.downloadArchiveURL(video_id, token)
112
135
  </pre>
136
+
@@ -27,7 +27,11 @@ module OpenTok
27
27
  # this token check supports previous implementation of download_archive_url
28
28
  return "#{@api_url}/archive/url/#{@archive_id}/#{video_id}"
29
29
  else
30
- return do_request "/archive/url/#{@archive_id}/#{video_id}", token
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
+ return doc
31
35
  end
32
36
  end
33
37
  alias_method :downloadArchiveURL, :download_archive_url
@@ -49,24 +49,10 @@ module OpenTok
49
49
  #
50
50
  # The first two attributes are required; +parnter_id+ and +partner_secret+ are the api-key and secret
51
51
  # that are provided to you.
52
- #
53
- # You can also pass in optional options;
54
- # * +:api_url+ sets the location of the api (staging or production)
55
- def initialize(partner_id, partner_secret, options = nil)
52
+ def initialize(partner_id, partner_secret, backSupport="")
56
53
  @partner_id = partner_id
57
54
  @partner_secret = partner_secret.strip
58
-
59
- if options.is_a?(::Hash)
60
- # user input hash parameter
61
- @api_url = options[:api_url] || API_URL
62
- else
63
- # use input true/false for parameter
64
- @api_url = (options ? API_URL_PROD : API_URL)
65
- end
66
-
67
- unless @api_url
68
- @api_url = API_URL
69
- end
55
+ @api_url = API_URL
70
56
  end
71
57
 
72
58
  # Generate token for the given session_id. The options you can provide are;
@@ -98,7 +84,7 @@ module OpenTok
98
84
  if not opts[:expire_time].nil?
99
85
  raise OpenTokException.new 'Expire time must be a number' if not opts[:expire_time].is_a?(Numeric)
100
86
  raise OpenTokException.new 'Expire time must be in the future' if opts[:expire_time] < Time.now.to_i
101
- raise OpenTokException.new 'Expire time must be in the next 7 days' if opts[:expire_time] > (Time.now.to_i + 604800)
87
+ raise OpenTokException.new 'Expire time must be in the next 30 days' if opts[:expire_time] > (Time.now.to_i + 2592000)
102
88
  data_params[:expire_time] = opts[:expire_time].to_i
103
89
  end
104
90
 
@@ -132,7 +118,7 @@ module OpenTok
132
118
  # This method takes two parameters. The first parameter is the +archive_id+ of the archive that contains the video (a String). The second parameter is the +token+ (a String)
133
119
  # The method returns an +OpenTok::Archive+ object. The resources property of this object is an array of OpenTok::ArchiveVideoResource objects. Each OpenTok::ArchiveVideoResource object represents a video in the archive.
134
120
  def get_archive_manifest(archive_id, token)
135
- # TODO: verify that token is MODERATOR token, Staging and production
121
+ # TODO: verify that token is MODERATOR token
136
122
 
137
123
  doc = do_request("/archive/getmanifest/#{archive_id}", {}, token)
138
124
  if not doc.get_elements('Errors').empty?
@@ -142,8 +128,22 @@ module OpenTok
142
128
  end
143
129
  alias_method :getArchiveManifest, :get_archive_manifest
144
130
 
131
+ def delete_archive( aid, token )
132
+ deleteURL = "/hl/archive/delete/#{aid}"
133
+ doc = do_request( deleteURL, {test:'none'}, token )
134
+ errors = doc.get_elements('Errors')
135
+ if doc.get_elements('Errors').empty?
136
+ #error = errors[0].get_elements('error')[0]
137
+ #errorCode = attributes['code']
138
+ return true
139
+ else
140
+ return false
141
+ end
142
+ end
143
+ alias_method :deleteArchive, :delete_archive
144
+
145
145
  def stitchArchive(aid)
146
- stitchURL = "/archive/#{aid}/stitch"
146
+ stitchURL = "/hl/archive/#{aid}/stitch"
147
147
  request = OpenTok::Request.new(@api_url, nil, @partner_id, @partner_secret)
148
148
  response = request.sendRequest(stitchURL, {test:'none'})
149
149
  case response.code
@@ -160,7 +160,7 @@ module OpenTok
160
160
  end
161
161
  return {}
162
162
  end
163
- alias_method :stitch, :get_archive_manifest
163
+ alias_method :stitch, :stitchArchive
164
164
 
165
165
  protected
166
166
  def sign_string(data, secret)
@@ -1,3 +1,3 @@
1
1
  module Opentok
2
- VERSION = "0.0.73"
2
+ VERSION = "0.0.91"
3
3
  end
data/lib/opentok.rb CHANGED
@@ -2,17 +2,16 @@
2
2
  OpenTok Ruby Library
3
3
  http://www.tokbox.com/
4
4
 
5
- Copyright 2010 - 2011, TokBox, Inc.
5
+ Copyright 2010 - 2012, TokBox, Inc.
6
6
 
7
- Last modified: 2011-02-17
7
+ Last modified: 2012-08-28
8
8
  =end
9
9
 
10
10
  module OpenTok
11
11
  require 'rubygems'
12
12
 
13
- VERSION = "tbrb-v0.91.2011-02-17"
14
- API_URL = "https://staging.tokbox.com/hl"
15
- API_URL_PROD = 'https://api.opentok.com/hl'
13
+ VERSION = "tbrb-v0.91.2012-08-28"
14
+ API_URL = "https://api.opentok.com"
16
15
 
17
16
  require 'open_tok/exception'
18
17
  require 'open_tok/utils'
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.opentok.com/archive/getmanifest/200567af-0726-4e93-883b-fe0426d6310a
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ X-Tb-Token-Auth:
15
+ - T1==cGFydG5lcl9pZD00NTk3ODImc2lnPWVjNjA1YTZhNzI5MDk5MzU5NTI1YWM2ZTczNDY1ZTQ3MzEwMWFkY2Q6cm9sZT1tb2RlcmF0b3Imc2Vzc2lvbl9pZD0xX01YNDBOVGszT0RKLU1USTNMakF1TUM0eGZsUjFaU0JUWlhBZ01EUWdNVFE2TlRNNk1ESWdVRVJVSURJd01USi1NQzQxTWpFeE9ERXpmZyZjcmVhdGVfdGltZT0xMzQ2ODAxMjQ1Jm5vbmNlPTAuMjUwMTIwMTEyNzkzODkwMjQ=
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Tue, 04 Sep 2012 23:27:13 GMT
25
+ Content-Type:
26
+ - text/xml; charset=utf-8
27
+ Connection:
28
+ - keep-alive
29
+ Pragma:
30
+ - no-cache
31
+ Cache-Control:
32
+ - no-cache
33
+ Content-Length:
34
+ - '510'
35
+ body:
36
+ encoding: US-ASCII
37
+ string: ! "<manifest version=\"0.1\" archiveid=\"200567af-0726-4e93-883b-fe0426d6310a\"
38
+ title=\"1346797109799\">\n <resources>\n <video id=\"bbf108c9-7237-49ae-9057-2ccdb71cf675\"
39
+ length=\"18734\" name=\"\"/>\n <video id=\"3f0d3ec6-4a41-4cc5-9e38-f9e6375ba5fd\"
40
+ length=\"18743\" name=\"\"/>\n </resources>\n <timeline>\n <event
41
+ type=\"PLAY\" id=\"3f0d3ec6-4a41-4cc5-9e38-f9e6375ba5fd\" offset=\"1255\"
42
+ data=\"\" />\n <event type=\"PLAY\" id=\"bbf108c9-7237-49ae-9057-2ccdb71cf675\"
43
+ offset=\"1263\" data=\"\" />\n </timeline>\n</manifest>\n\n\n"
44
+ http_version:
45
+ recorded_at: Tue, 04 Sep 2012 23:27:25 GMT
46
+ - request:
47
+ method: get
48
+ uri: https://api.opentok.com/archive/url/200567af-0726-4e93-883b-fe0426d6310a/bbf108c9-7237-49ae-9057-2ccdb71cf675
49
+ body:
50
+ encoding: US-ASCII
51
+ string: ''
52
+ headers:
53
+ Accept:
54
+ - ! '*/*'
55
+ User-Agent:
56
+ - Ruby
57
+ X-Tb-Token-Auth:
58
+ - T1==cGFydG5lcl9pZD00NTk3ODImc2lnPTU2MDY5Y2VmMTAzY2M4YTUzY2RlNTZlZTAzNzdjODIyNTk0MTU5MzM6cm9sZT1tb2RlcmF0b3Imc2Vzc2lvbl9pZD0xX01YNDBOVGszT0RKLU1USTNMakF1TUM0eGZsUjFaU0JUWlhBZ01EUWdNVFE2TlRNNk1ESWdVRVJVSURJd01USi1NQzQxTWpFeE9ERXpmZyZjcmVhdGVfdGltZT0xMzQ2ODAxMjQ1Jm5vbmNlPTAuNDY2MDM2NDg4Nzc5NDgy
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ Server:
65
+ - nginx
66
+ Date:
67
+ - Tue, 04 Sep 2012 23:27:13 GMT
68
+ Content-Type:
69
+ - text/html; charset=utf-8
70
+ Connection:
71
+ - keep-alive
72
+ Pragma:
73
+ - no-cache
74
+ Cache-Control:
75
+ - no-cache
76
+ Content-Length:
77
+ - '229'
78
+ body:
79
+ encoding: US-ASCII
80
+ string: https://s3.amazonaws.com/tokbox.com.production/459782/200567af-0726-4e93-883b-fe0426d6310a/bbf108c9-7237-49ae-9057-2ccdb71cf675.flv?Signature=Hn7ti7U2yG8tehW1ypD1R%2FGUvrg%3D&Expires=1346804833&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q
81
+ http_version:
82
+ recorded_at: Tue, 04 Sep 2012 23:27:25 GMT
83
+ recorded_with: VCR 2.2.4
@@ -0,0 +1,45 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.opentok.com/hl/archive/delete/200567af-0726-4e93-883b-fe0426d6310a
6
+ body:
7
+ encoding: US-ASCII
8
+ string: test=none
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ X-Tb-Token-Auth:
17
+ - T1==cGFydG5lcl9pZD00NTk3ODImc2lnPTEyMTU4N2FiMGU3YmQzZTVmNjVjOGQxNjQ1NGQ4Y2UxM2RjZTI5YzI6cm9sZT1wdWJsaXNoZXImc2Vzc2lvbl9pZD0xX01YNDBOVGszT0RKLU1USTNMakF1TUM0eGZsUjFaU0JUWlhBZ01EUWdNVFE2TlRNNk1ESWdVRVJVSURJd01USi1NQzQxTWpFeE9ERXpmZyZjcmVhdGVfdGltZT0xMzQ3MDU0OTc3Jm5vbmNlPTAuNTAzNjU0NzIyODY0NzU1Mg==
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Fri, 07 Sep 2012 21:56:12 GMT
27
+ Content-Type:
28
+ - text/xml; charset=utf-8
29
+ Connection:
30
+ - keep-alive
31
+ Pragma:
32
+ - no-cache
33
+ Cache-Control:
34
+ - no-cache
35
+ Content-Length:
36
+ - '124'
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ! '<Errors><error code="404"><itemNotFound message="Archive 200567af-0726-4e93-883b-fe0426d6310a
40
+ not found"/></error></Errors>
41
+
42
+ '
43
+ http_version:
44
+ recorded_at: Fri, 07 Sep 2012 21:56:17 GMT
45
+ recorded_with: VCR 2.2.4
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://staging.tokbox.com/hl/session/create
5
+ uri: https://api.opentok.com/session/create
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: partner_id=0&location=localhost
@@ -17,22 +17,25 @@ http_interactions:
17
17
  - ! '0:'
18
18
  response:
19
19
  status:
20
- code: 403
21
- message: Forbidden
20
+ code: 200
21
+ message: OK
22
22
  headers:
23
23
  Server:
24
24
  - nginx
25
25
  Date:
26
- - Thu, 16 Aug 2012 16:51:18 GMT
26
+ - Tue, 04 Sep 2012 23:27:12 GMT
27
27
  Content-Type:
28
- - text/plain; charset=iso-8859-1
28
+ - text/plain; charset=UTF-8
29
+ Transfer-Encoding:
30
+ - chunked
29
31
  Connection:
30
32
  - keep-alive
31
- Content-Length:
32
- - '0'
33
33
  body:
34
34
  encoding: US-ASCII
35
- string: ''
35
+ string: ! '<Errors><error code="403"><notAuthorized message="The API secret
36
+ did not match, Invalid credentials passed"/></error></Errors>
37
+
38
+ '
36
39
  http_version:
37
- recorded_at: Thu, 16 Aug 2012 16:51:18 GMT
40
+ recorded_at: Tue, 04 Sep 2012 23:27:24 GMT
38
41
  recorded_with: VCR 2.2.4
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://staging.tokbox.com/hl/session/create
5
+ uri: https://api.opentok.com/session/create
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: partner_id=459782&location=localhost
@@ -23,21 +23,24 @@ http_interactions:
23
23
  Server:
24
24
  - nginx
25
25
  Date:
26
- - Thu, 16 Aug 2012 16:51:48 GMT
26
+ - Tue, 04 Sep 2012 23:27:12 GMT
27
27
  Content-Type:
28
- - text/xml
28
+ - text/xml; charset=utf-8
29
29
  Connection:
30
30
  - keep-alive
31
+ Pragma:
32
+ - no-cache
33
+ Cache-Control:
34
+ - no-cache
31
35
  Access-Control-Allow-Origin:
32
36
  - ! '*'
33
- X-Tb-Host:
34
- - stage301-sat.tokbox.com
35
37
  Content-Length:
36
- - '268'
38
+ - '294'
37
39
  body:
38
40
  encoding: US-ASCII
39
- string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><sessions><Session><session_id>1_MX40NTk3ODJ-flRodSBBdWcgMTYgMDk6NTE6NDggUERUIDIwMTJ-MC43NjEzNDN-</session_id><partner_id>459782</partner_id><create_dt>Thu
40
- Aug 16 09:51:48 PDT 2012</create_dt></Session></sessions>
41
+ string: ! "<Sessions>\n <Session>\n <session_id>2_MX40NTk3ODJ-fjIwMTItMDktMDQgMjM6Mjc6MTIuNzY3ODY5KzAwOjAwfjAuNTQzNTEwNTE4NjQxfg</session_id>\n
42
+ \ <partner_id>459782</partner_id>\n <create_dt>2012-09-04 23:27:12.767869+00:00</create_dt>\n
43
+ \ <session_status></session_status>\n </Session>\n</Sessions>\n"
41
44
  http_version:
42
- recorded_at: Thu, 16 Aug 2012 16:51:48 GMT
45
+ recorded_at: Tue, 04 Sep 2012 23:27:24 GMT
43
46
  recorded_with: VCR 2.2.4
@@ -0,0 +1,42 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.opentok.com/hl/archive/200567af-0726-4e93-883b-fe0426d6310a/stitch
6
+ body:
7
+ encoding: US-ASCII
8
+ string: test=none
9
+ headers:
10
+ Accept:
11
+ - ! '*/*'
12
+ User-Agent:
13
+ - Ruby
14
+ Content-Type:
15
+ - application/x-www-form-urlencoded
16
+ X-Tb-Partner-Auth:
17
+ - 459782:b44c3baa32b6476d9d88e8194d0eb1c6b777f76b
18
+ response:
19
+ status:
20
+ code: 201
21
+ message: Created
22
+ headers:
23
+ Server:
24
+ - nginx
25
+ Date:
26
+ - Tue, 04 Sep 2012 23:27:14 GMT
27
+ Content-Type:
28
+ - text/plain
29
+ Connection:
30
+ - keep-alive
31
+ Location:
32
+ - https://tokbox.com.production.s3.amazonaws.com/459782%2F200567af-0726-4e93-883b-fe0426d6310a%2Fstitch.mp4?Expires=1346887634&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=6%2BihfyAJiQGjmf%2FHV1BGCe14rr8%3D
33
+ X-Tb-Host:
34
+ - oms407-oak.tokbox.com
35
+ Content-Length:
36
+ - '0'
37
+ body:
38
+ encoding: US-ASCII
39
+ string: ''
40
+ http_version:
41
+ recorded_at: Tue, 04 Sep 2012 23:27:26 GMT
42
+ recorded_with: VCR 2.2.4
data/spec/opentok_spec.rb CHANGED
@@ -1,39 +1,33 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe "Functionality Test" do
3
+ describe OpenTok do
4
4
 
5
5
  let(:api_key) { '459782' }
6
6
  let(:api_secret) { 'b44c3baa32b6476d9d88e8194d0eb1c6b777f76b' }
7
- let(:host) { '127.0.0.1' }
8
- let(:api_staging_url) { 'https://staging.tokbox.com/hl' }
9
- let(:api_production_url) { 'https://api.opentok.com/hl' }
7
+ let(:api_url) { 'https://api.opentok.com' }
8
+ let(:host) { 'localhost' }
10
9
 
11
- describe "test Initializers" do
12
- it "should set staging URL with no options" do
13
- opentok = OpenTok::OpenTokSDK.new api_key, api_secret
14
- opentok.api_url.should eq api_staging_url
15
- end
10
+ let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret }
16
11
 
17
- it "should be possible to set the api url as an option" do
18
- opentok = OpenTok::OpenTokSDK.new api_key, api_secret, :api_url => api_production_url
19
- opentok.api_url.should eq api_production_url
20
- opentok = OpenTok::OpenTokSDK.new api_key, api_secret, :api_url => api_staging_url
21
- opentok.api_url.should eq api_staging_url
12
+ describe "test Initializers" do
13
+ it "should be backwards compatible if user set api URL with no effect" do
14
+ opentok = OpenTok::OpenTokSDK.new api_key, api_secret, {:api_url=>"bla bla"}
15
+ opentok.api_url.should eq api_url
22
16
  end
23
17
 
24
- it "should set staging URL with option false" do
25
- opentok = OpenTok::OpenTokSDK.new api_key, api_secret, false
26
- opentok.api_url.should eq api_staging_url
18
+ it "should set api URL with no options" do
19
+ opentok = OpenTok::OpenTokSDK.new api_key, api_secret
20
+ opentok.api_url.should eq api_url
27
21
  end
28
22
 
29
- it "should set production URL with option true" do
30
- opentok = OpenTok::OpenTokSDK.new api_key, api_secret, true
31
- opentok.api_url.should eq api_production_url
23
+ it "should be OpenTok SDK Object" do
24
+ opentok = OpenTok::OpenTokSDK.new api_key, api_secret
25
+ opentok.should be_instance_of OpenTok::OpenTokSDK
32
26
  end
33
27
  end
34
28
 
35
29
  describe "Generate Sessions" do
36
- use_vcr_cassette "generate_sessions"
30
+ use_vcr_cassette "session"
37
31
 
38
32
  let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret }
39
33
 
@@ -46,141 +40,102 @@ describe "Functionality Test" do
46
40
  session = opentok.createSession host
47
41
  session.to_s.should match(/\A[0-9A-z_-]{40,}\Z/)
48
42
  end
43
+
44
+ it "should generate valid p2p session" do
45
+ # Creating Session object with p2p enabled
46
+ sessionProperties = {OpenTok::SessionPropertyConstants::P2P_PREFERENCE => "enabled"} # or disabled
47
+ session = opentok.createSession( @location, sessionProperties )
48
+ session.to_s.should match(/\A[0-9A-z_-]{40,}\Z/)
49
+ end
49
50
  end
50
51
 
51
- describe "Generate Tokens" do
52
- use_vcr_cassette "generate_tokens"
52
+ describe "invalid Sessions" do
53
+ use_vcr_cassette "invalidSession"
54
+ it "should raise an exception with an invalid key and secret" do
55
+ invalidOT = OpenTok::OpenTokSDK.new 0, ''
56
+
57
+ expect{
58
+ session = invalidOT.create_session host
59
+ }.to raise_error OpenTok::OpenTokException
60
+ end
61
+ end
53
62
 
63
+ describe "Generate Tokens" do
54
64
  let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret }
55
65
  let(:session) { opentok.createSession host }
56
-
57
66
  it "should generate valid token" do
58
67
  token = opentok.generate_token({:session_id => session, :role=>OpenTok::RoleConstants::MODERATOR})
59
68
  token.should match(/(T1==)+[0-9A-z_]+/)
60
69
  end
61
-
62
70
  it "should generate valid token camelCase" do
63
71
  token = opentok.generateToken({:session_id => session, :role=>OpenTok::RoleConstants::MODERATOR})
64
72
  token.should match(/(T1==)+[0-9A-z_]+/)
65
73
  end
74
+ it "should be able to set parameters in token" do
75
+ token = opentok.generate_token :session_id => session, :role=> OpenTok::RoleConstants::PUBLISHER, :connection_data => "username=Bob,level=4"
76
+ str = token[4..token.length]
77
+ decoded = Base64.decode64(str)
78
+ decoded.should match(/publisher.*username.*Bob.*level.*4/)
79
+ end
66
80
  end
67
81
 
68
- end
69
-
70
- describe OpenTok do
71
82
 
72
- let(:api_key) { '459782' }
73
- let(:api_secret) { 'b44c3baa32b6476d9d88e8194d0eb1c6b777f76b' }
74
- let(:api_staging_url) { 'https://staging.tokbox.com/hl' }
75
- let(:api_production_url) { 'https://api.opentok.com/hl' }
76
- let(:host) { 'localhost' }
77
-
78
- let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret }
79
-
80
- describe "Production Environment" do
81
-
82
- let(:api_key) { '11421872' }
83
- let(:api_secret) { '296cebc2fc4104cd348016667ffa2a3909ec636f' }
84
- let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret, {:api_url=>api_production_url} }
83
+ describe "Archiving downloads" do
84
+ use_vcr_cassette "archives"
85
+ let(:api_key) { '459782' }
86
+ let(:api_secret) { 'b44c3baa32b6476d9d88e8194d0eb1c6b777f76b' }
87
+ let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret, {:api_url=>""} }
85
88
  let(:opts) { {:partner_id => api_key, :location=>host} }
86
89
 
87
- it "should be possible to valid a OpenTokSDK object with a valid key and secret" do
88
- opentok.should be_instance_of OpenTok::OpenTokSDK
89
- end
90
+ let(:session) { '1_MX40NTk3ODJ-MTI3LjAuMC4xflR1ZSBTZXAgMDQgMTQ6NTM6MDIgUERUIDIwMTJ-MC41MjExODEzfg' }
91
+ let(:token) { opentok.generateToken({:session_id => session, :role=>OpenTok::RoleConstants::MODERATOR}) }
92
+ let(:archiveId) { "200567af-0726-4e93-883b-fe0426d6310a" }
90
93
 
91
- it "a new OpenTokSDK object should point to the staging environment by default" do
92
- opentok.api_url.should eq api_production_url
94
+ it "should have archive resources" do
95
+ otArchive = opentok.getArchiveManifest(archiveId, token)
96
+ otArchiveResource = otArchive.resources[0]
97
+ vid = otArchiveResource.getId()
98
+ vid.should match(/[0-9A-z=]+/)
93
99
  end
94
100
 
95
- describe "Archiving downloads" do
96
- use_vcr_cassette "archiving_downloads"
97
-
98
- let(:session) { '1_MX4xNDk3MTI5Mn5-MjAxMi0wNS0yMCAwMTowMzozMS41MDEzMDArMDA6MDB-MC40NjI0MjI4MjU1MDF-' }
99
- let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret, {:api_url=>api_production_url} }
100
- let(:token) { opentok.generateToken({:session_id => session, :role=>OpenTok::RoleConstants::MODERATOR}) }
101
- let(:archiveId) { '5f74aee5-ab3f-421b-b124-ed2a698ee939' }
102
-
103
- it "should have archive resources" do
104
- otArchive = opentok.getArchiveManifest(archiveId, token)
105
- otArchiveResource = otArchive.resources[0]
106
- vid = otArchiveResource.getId()
107
- vid.should match(/[0-9A-z=]+/)
108
- end
109
-
110
- it "should return download url" do
111
- otArchive = opentok.get_archive_manifest(archiveId, token)
112
- otArchiveResource = otArchive.resources[0]
113
- vid = otArchiveResource.getId()
114
- url = otArchive.downloadArchiveURL(vid, token)
115
- url.start_with?('http').should eq true
116
- end
117
-
118
- it "should return file url" do
119
- otArchive = opentok.get_archive_manifest(archiveId, token)
120
- otArchiveResource = otArchive.resources[0]
121
- vid = otArchiveResource.getId()
122
- url = otArchive.downloadArchiveURL(vid, token)
123
- url.start_with?('http').should eq true
124
- end
101
+ it "should return download url" do
102
+ otArchive = opentok.get_archive_manifest(archiveId, token)
103
+ otArchiveResource = otArchive.resources[0]
104
+ vid = otArchiveResource.getId()
105
+ url = otArchive.downloadArchiveURL(vid, token)
106
+ url.start_with?('http').should eq true
125
107
  end
126
108
  end
127
109
 
128
-
129
- describe "Session creation" do
130
- use_vcr_cassette "session_creation"
131
-
132
- it "should raise an exception with an invalid key and secret" do
133
- opentok = OpenTok::OpenTokSDK.new 0, ''
134
-
135
- expect{
136
- session = opentok.create_session host
137
- }.to raise_error OpenTok::OpenTokException
110
+ describe "Delete Archives" do
111
+ use_vcr_cassette "deleteArchive"
112
+ let(:api_key) { '459782' }
113
+ let(:api_secret) { 'b44c3baa32b6476d9d88e8194d0eb1c6b777f76b' }
114
+ let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret, {:api_url=>""} }
115
+ let(:session) { '1_MX40NTk3ODJ-MTI3LjAuMC4xflR1ZSBTZXAgMDQgMTQ6NTM6MDIgUERUIDIwMTJ-MC41MjExODEzfg' }
116
+ let(:token) { opentok.generateToken({:session_id => session, :role=>OpenTok::RoleConstants::PUBLISHER}) }
117
+ let(:archiveId) { "200567af-0726-4e93-883b-fe0426d6310a" }
118
+
119
+ it "should return false on wrong moderator" do
120
+ a = opentok.deleteArchive( archiveId, token )
121
+ a.should eq false
138
122
  end
139
-
140
- end
141
-
142
- describe "Token creation" do
143
- use_vcr_cassette "token_creation"
144
-
145
- let(:valid_session) { opentok.create_session(host).to_s }
146
-
147
- it "should be possible to create a token" do
148
- token = opentok.generate_token :session_id => valid_session
149
-
150
- token.should match(/\A[0-9A-z=]+\Z/)
151
- end
152
-
153
- it "should be able to set parameters in token" do
154
- token = opentok.generate_token :session_id => valid_session, :role=> OpenTok::RoleConstants::PUBLISHER, :connection_data => "username=Bob,level=4"
155
-
156
- str = token[4..token.length]
157
- decoded = Base64.decode64(str)
158
-
159
- decoded.should match(/publisher.*username.*Bob.*level.*4/)
160
- end
161
- end
162
-
163
- describe "Archive Download" do
164
- use_vcr_cassette "archive_download"
165
-
166
- let(:valid_session) { opentok.create_session(host).to_s }
167
-
168
- # it "If token does not have moderator role, raise error" do
169
- # token = opentok.generate_token(:session_id=>valid_session)
170
- # expect{
171
- # opentok.get_archive_manifest("", token)
172
- # }.to raise_error OpenTok::OpenTokException
173
- # end
174
123
  end
175
124
 
176
125
  describe "stitch api" do
177
- use_vcr_cassette "archive_stitch"
126
+ use_vcr_cassette "stitchArchive"
127
+ let(:api_key) { '459782' }
128
+ let(:api_secret) { 'b44c3baa32b6476d9d88e8194d0eb1c6b777f76b' }
129
+ let(:opentok) { OpenTok::OpenTokSDK.new api_key, api_secret, {:api_url=>""} }
130
+ let(:session) { '1_MX40NTk3ODJ-MTI3LjAuMC4xflR1ZSBTZXAgMDQgMTQ6NTM6MDIgUERUIDIwMTJ-MC41MjExODEzfg' }
131
+ let(:token) { opentok.generateToken({:session_id => session, :role=>OpenTok::RoleConstants::MODERATOR}) }
132
+ let(:archiveId) { "200567af-0726-4e93-883b-fe0426d6310a" }
133
+
178
134
  it "should return stich url" do
179
- OTKey = ENV['TB_KEY'] # Enter you OpenTok Key Here
180
- OTSecret = ENV['TB_SECRET'] # Enter your OpenTok Secret Here
181
- OTSDK = OpenTok::OpenTokSDK.new OTKey, OTSecret, true
182
- a = OTSDK.stitchArchive("9cf9b35d-3c2f-432c-96b9-dbdf848ecf33")
183
- a[:code].should == 202
135
+ a = opentok.stitchArchive( archiveId )
136
+ a[:code].should == 201
137
+ a[:location].start_with?('http').should eq true
184
138
  end
185
139
  end
140
+
186
141
  end
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.73
4
+ version: 0.0.91
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-08-21 00:00:00.000000000 Z
14
+ date: 2012-09-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rake
@@ -93,7 +93,7 @@ files:
93
93
  - .gitignore
94
94
  - CHANGES
95
95
  - Gemfile
96
- - LICENCE
96
+ - LICENSE
97
97
  - README.md
98
98
  - Rakefile
99
99
  - doc/CHANGES.html
@@ -155,11 +155,11 @@ files:
155
155
  - lib/open_tok/version.rb
156
156
  - lib/opentok.rb
157
157
  - opentok.gemspec
158
- - spec/cassettes/archiving_downloads.yml
159
- - spec/cassettes/generate_sessions.yml
160
- - spec/cassettes/generate_tokens.yml
161
- - spec/cassettes/session_creation.yml
162
- - spec/cassettes/token_creation.yml
158
+ - spec/cassettes/archives.yml
159
+ - spec/cassettes/deleteArchive.yml
160
+ - spec/cassettes/invalidSession.yml
161
+ - spec/cassettes/session.yml
162
+ - spec/cassettes/stitchArchive.yml
163
163
  - spec/opentok_spec.rb
164
164
  - spec/spec_helper.rb
165
165
  homepage: https://github.com/opentok/Opentok-Ruby-SDK
@@ -187,10 +187,10 @@ signing_key:
187
187
  specification_version: 3
188
188
  summary: OpenTok gem
189
189
  test_files:
190
- - spec/cassettes/archiving_downloads.yml
191
- - spec/cassettes/generate_sessions.yml
192
- - spec/cassettes/generate_tokens.yml
193
- - spec/cassettes/session_creation.yml
194
- - spec/cassettes/token_creation.yml
190
+ - spec/cassettes/archives.yml
191
+ - spec/cassettes/deleteArchive.yml
192
+ - spec/cassettes/invalidSession.yml
193
+ - spec/cassettes/session.yml
194
+ - spec/cassettes/stitchArchive.yml
195
195
  - spec/opentok_spec.rb
196
196
  - spec/spec_helper.rb
data/LICENCE DELETED
@@ -1,19 +0,0 @@
1
- Copyright (c) 2011 TokBox, Inc.
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
@@ -1,81 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: https://api.opentok.com/hl/archive/getmanifest/5f74aee5-ab3f-421b-b124-ed2a698ee939
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - ! '*/*'
12
- User-Agent:
13
- - Ruby
14
- X-Tb-Token-Auth:
15
- - T1==cGFydG5lcl9pZD0xMTQyMTg3MiZzaWc9YTVlNWY3YjA1ZTZjMzE1NDdmZmIxNzE5NWQ0MGQxYzdiYTRlZjQ3NTpyb2xlPW1vZGVyYXRvciZzZXNzaW9uX2lkPTFfTVg0eE5EazNNVEk1TW41LU1qQXhNaTB3TlMweU1DQXdNVG93TXpvek1TNDFNREV6TURBck1EQTZNREItTUM0ME5qSTBNakk0TWpVMU1ERi0mY3JlYXRlX3RpbWU9MTM0NTEzNTg1MyZub25jZT0wLjUwODk3Nzg4NjYxNTIyODg=
16
- response:
17
- status:
18
- code: 200
19
- message: OK
20
- headers:
21
- Server:
22
- - nginx
23
- Date:
24
- - Thu, 16 Aug 2012 16:50:54 GMT
25
- Content-Type:
26
- - text/xml; charset=utf-8
27
- Connection:
28
- - keep-alive
29
- Pragma:
30
- - no-cache
31
- Cache-Control:
32
- - no-cache
33
- Content-Length:
34
- - '345'
35
- body:
36
- encoding: US-ASCII
37
- string: ! "<manifest version=\"0.1\" archiveid=\"5f74aee5-ab3f-421b-b124-ed2a698ee939\"
38
- title=\"Song Test Archive\">\n <resources>\n <video id=\"4b7227de-3b3f-45a7-a2dd-bffe6bf62085\"
39
- length=\"5118\" name=\"\"/>\n </resources>\n <timeline>\n <event
40
- type=\"PLAY\" id=\"4b7227de-3b3f-45a7-a2dd-bffe6bf62085\" offset=\"1625\"
41
- data=\"\" />\n </timeline>\n</manifest>\n\n\n"
42
- http_version:
43
- recorded_at: Thu, 16 Aug 2012 16:50:54 GMT
44
- - request:
45
- method: get
46
- uri: https://api.opentok.com/hl/archive/url/5f74aee5-ab3f-421b-b124-ed2a698ee939/4b7227de-3b3f-45a7-a2dd-bffe6bf62085
47
- body:
48
- encoding: US-ASCII
49
- string: ''
50
- headers:
51
- Accept:
52
- - ! '*/*'
53
- User-Agent:
54
- - Ruby
55
- X-Tb-Token-Auth:
56
- - T1==cGFydG5lcl9pZD0xMTQyMTg3MiZzaWc9Mjk0ZjM4NzkwMjY3OTIxOTI1MjdiYjAzM2M1ZmNkNDhkNGFmMGRlZTpyb2xlPW1vZGVyYXRvciZzZXNzaW9uX2lkPTFfTVg0eE5EazNNVEk1TW41LU1qQXhNaTB3TlMweU1DQXdNVG93TXpvek1TNDFNREV6TURBck1EQTZNREItTUM0ME5qSTBNakk0TWpVMU1ERi0mY3JlYXRlX3RpbWU9MTM0NTEzNTg1NCZub25jZT0wLjc0MDc2NjMyNTg0NTYzNTE=
57
- response:
58
- status:
59
- code: 200
60
- message: OK
61
- headers:
62
- Server:
63
- - nginx
64
- Date:
65
- - Thu, 16 Aug 2012 16:50:55 GMT
66
- Content-Type:
67
- - text/html; charset=utf-8
68
- Connection:
69
- - keep-alive
70
- Pragma:
71
- - no-cache
72
- Cache-Control:
73
- - no-cache
74
- Content-Length:
75
- - '229'
76
- body:
77
- encoding: US-ASCII
78
- string: https://s3.amazonaws.com/tokbox.com.production/11421872/5f74aee5-ab3f-421b-b124-ed2a698ee939/4b7227de-3b3f-45a7-a2dd-bffe6bf62085.flv?Signature=OTlzzfyKuNiukuyVcEaKP0pf8lU%3D&Expires=1345139455&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q
79
- http_version:
80
- recorded_at: Thu, 16 Aug 2012 16:50:55 GMT
81
- recorded_with: VCR 2.2.4
@@ -1,43 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://staging.tokbox.com/hl/session/create
6
- body:
7
- encoding: US-ASCII
8
- string: partner_id=459782&location=127.0.0.1
9
- headers:
10
- Accept:
11
- - ! '*/*'
12
- User-Agent:
13
- - Ruby
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- X-Tb-Partner-Auth:
17
- - 459782:b44c3baa32b6476d9d88e8194d0eb1c6b777f76b
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Thu, 16 Aug 2012 16:49:56 GMT
27
- Content-Type:
28
- - text/xml
29
- Connection:
30
- - keep-alive
31
- Access-Control-Allow-Origin:
32
- - ! '*'
33
- X-Tb-Host:
34
- - stage301-sat.tokbox.com
35
- Content-Length:
36
- - '282'
37
- body:
38
- encoding: US-ASCII
39
- string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><sessions><Session><session_id>2_MX40NTk3ODJ-MTI3LjAuMC4xflRodSBBdWcgMTYgMDk6NDk6NTYgUERUIDIwMTJ-MC41MDk2NDYyfg</session_id><partner_id>459782</partner_id><create_dt>Thu
40
- Aug 16 09:49:56 PDT 2012</create_dt></Session></sessions>
41
- http_version:
42
- recorded_at: Thu, 16 Aug 2012 16:49:56 GMT
43
- recorded_with: VCR 2.2.4
@@ -1,43 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://staging.tokbox.com/hl/session/create
6
- body:
7
- encoding: US-ASCII
8
- string: partner_id=459782&location=127.0.0.1
9
- headers:
10
- Accept:
11
- - ! '*/*'
12
- User-Agent:
13
- - Ruby
14
- Content-Type:
15
- - application/x-www-form-urlencoded
16
- X-Tb-Partner-Auth:
17
- - 459782:b44c3baa32b6476d9d88e8194d0eb1c6b777f76b
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - nginx
25
- Date:
26
- - Thu, 16 Aug 2012 16:50:16 GMT
27
- Content-Type:
28
- - text/xml
29
- Connection:
30
- - keep-alive
31
- Access-Control-Allow-Origin:
32
- - ! '*'
33
- X-Tb-Host:
34
- - stage301-sat.tokbox.com
35
- Content-Length:
36
- - '282'
37
- body:
38
- encoding: US-ASCII
39
- string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><sessions><Session><session_id>2_MX40NTk3ODJ-MTI3LjAuMC4xflRodSBBdWcgMTYgMDk6NTA6MTYgUERUIDIwMTJ-MC42MjI3MTA4fg</session_id><partner_id>459782</partner_id><create_dt>Thu
40
- Aug 16 09:50:16 PDT 2012</create_dt></Session></sessions>
41
- http_version:
42
- recorded_at: Thu, 16 Aug 2012 16:50:16 GMT
43
- recorded_with: VCR 2.2.4