opentok 0.1.3 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +16 -2
  3. data/.travis.yml +6 -0
  4. data/.yardopts +1 -0
  5. data/CONTRIBUTING.md +47 -0
  6. data/DEVELOPING.md +91 -0
  7. data/LICENSE +19 -5
  8. data/README.md +170 -53
  9. data/Rakefile +10 -5
  10. data/doc/OpenTok.html +411 -0
  11. data/doc/OpenTok/Archive.html +1320 -0
  12. data/doc/OpenTok/ArchiveList.html +216 -0
  13. data/doc/OpenTok/Archives.html +1028 -0
  14. data/doc/OpenTok/Client.html +695 -0
  15. data/doc/OpenTok/OpenTok.html +1046 -0
  16. data/doc/OpenTok/OpenTokArchiveError.html +142 -0
  17. data/doc/OpenTok/OpenTokAuthenticationError.html +143 -0
  18. data/doc/OpenTok/OpenTokError.html +138 -0
  19. data/doc/OpenTok/Session.html +665 -0
  20. data/doc/OpenTok/TokenGenerator.html +204 -0
  21. data/doc/OpenTok/TokenGenerator/ClassMethods.html +187 -0
  22. data/doc/README.md +15 -0
  23. data/doc/_index.html +182 -0
  24. data/doc/class_list.html +54 -0
  25. data/doc/css/common.css +1 -0
  26. data/doc/css/full_list.css +57 -0
  27. data/doc/css/style.css +339 -0
  28. data/doc/file.README.html +87 -0
  29. data/doc/file_list.html +56 -0
  30. data/doc/frames.html +26 -0
  31. data/doc/index.html +87 -0
  32. data/doc/js/app.js +219 -0
  33. data/doc/js/full_list.js +178 -0
  34. data/doc/js/jquery.js +4 -0
  35. data/doc/method_list.html +227 -0
  36. data/doc/top-level-namespace.html +112 -0
  37. data/lib/opentok.rb +3 -14
  38. data/lib/opentok/archive.rb +92 -0
  39. data/lib/opentok/archive_list.rb +17 -0
  40. data/lib/opentok/archives.rb +120 -0
  41. data/lib/opentok/client.rb +125 -0
  42. data/lib/opentok/constants.rb +5 -0
  43. data/lib/opentok/exceptions.rb +10 -0
  44. data/lib/opentok/opentok.rb +174 -0
  45. data/lib/opentok/session.rb +76 -0
  46. data/lib/opentok/token_generator.rb +101 -0
  47. data/lib/opentok/version.rb +4 -0
  48. data/opentok.gemspec +29 -22
  49. data/sample/Archiving/Gemfile +4 -0
  50. data/sample/Archiving/README.md +212 -0
  51. data/sample/Archiving/archiving_sample.rb +80 -0
  52. data/sample/Archiving/public/css/sample.css +22 -0
  53. data/sample/Archiving/public/img/archiving-off.png +0 -0
  54. data/sample/Archiving/public/img/archiving-on-idle.png +0 -0
  55. data/sample/Archiving/public/img/archiving-on-message.png +0 -0
  56. data/sample/Archiving/public/js/host.js +37 -0
  57. data/sample/Archiving/public/js/participant.js +13 -0
  58. data/sample/Archiving/views/history.erb +65 -0
  59. data/sample/Archiving/views/host.erb +69 -0
  60. data/sample/Archiving/views/index.erb +48 -0
  61. data/sample/Archiving/views/layout.erb +29 -0
  62. data/sample/Archiving/views/participant.erb +55 -0
  63. data/sample/HelloWorld/Gemfile +4 -0
  64. data/sample/HelloWorld/README.md +123 -0
  65. data/sample/HelloWorld/hello_world.rb +27 -0
  66. data/sample/HelloWorld/public/js/helloworld.js +32 -0
  67. data/sample/HelloWorld/views/index.erb +21 -0
  68. data/spec/cassettes/OpenTok_Archives/should_create_archives.yml +48 -0
  69. data/spec/cassettes/OpenTok_Archives/should_create_named_archives.yml +49 -0
  70. data/spec/cassettes/OpenTok_Archives/should_delete_an_archive_by_id.yml +32 -0
  71. data/spec/cassettes/OpenTok_Archives/should_find_archives_by_id.yml +46 -0
  72. data/spec/cassettes/OpenTok_Archives/should_stop_archives.yml +48 -0
  73. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_all_archives.yml +104 -0
  74. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_archives_with_an_offset.yml +71 -0
  75. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_count_number_of_archives.yml +60 -0
  76. data/spec/cassettes/OpenTok_Archives/when_many_archives_are_created/should_return_part_of_the_archives_when_using_offset_and_count.yml +82 -0
  77. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_default_sessions.yml +39 -0
  78. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions.yml +39 -0
  79. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_relayed_media_sessions_with_a_location_hint.yml +39 -0
  80. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions.yml +39 -0
  81. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_for_invalid_media_modes.yml +39 -0
  82. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_routed_media_sessions_with_a_location_hint.yml +39 -0
  83. data/spec/cassettes/OpenTok_OpenTok/when_initialized_properly/_create_session/creates_sessions_with_a_location_hint.yml +39 -0
  84. data/spec/matchers/token.rb +48 -0
  85. data/spec/opentok/archives_spec.rb +91 -0
  86. data/spec/opentok/opentok_spec.rb +144 -0
  87. data/spec/opentok/session_spec.rb +71 -0
  88. data/spec/shared/opentok_generates_tokens.rb +62 -0
  89. data/spec/shared/session_generates_tokens.rb +63 -0
  90. data/spec/spec_helper.rb +6 -7
  91. metadata +197 -59
  92. data/.rspec +0 -3
  93. data/CHANGES +0 -33
  94. data/doc/reference.md +0 -122
  95. data/lib/open_tok/archive.rb +0 -53
  96. data/lib/open_tok/archive_timeline_event.rb +0 -22
  97. data/lib/open_tok/archive_video_resource.rb +0 -28
  98. data/lib/open_tok/exception.rb +0 -50
  99. data/lib/open_tok/open_tok_sdk.rb +0 -198
  100. data/lib/open_tok/request.rb +0 -63
  101. data/lib/open_tok/role_constants.rb +0 -18
  102. data/lib/open_tok/session.rb +0 -25
  103. data/lib/open_tok/session_property_constants.rb +0 -30
  104. data/lib/open_tok/utils.rb +0 -10
  105. data/lib/open_tok/version.rb +0 -5
  106. data/sample/sample.rb +0 -26
  107. data/spec/cassettes/archives.yml +0 -83
  108. data/spec/cassettes/deleteArchive.yml +0 -91
  109. data/spec/cassettes/invalidSession.yml +0 -41
  110. data/spec/cassettes/session.yml +0 -46
  111. data/spec/cassettes/stitchArchive.yml +0 -42
  112. data/spec/opentok_exception_spec.rb +0 -38
  113. data/spec/opentok_spec.rb +0 -135
@@ -0,0 +1,27 @@
1
+ require 'sinatra/base'
2
+ require 'opentok'
3
+
4
+ raise "You must define API_KEY and API_SECRET environment variables" unless ENV.has_key?("API_KEY") && ENV.has_key?("API_SECRET")
5
+
6
+ class HelloWorld < Sinatra::Base
7
+
8
+ set :api_key, ENV['API_KEY']
9
+ set :opentok, OpenTok::OpenTok.new(api_key, ENV['API_SECRET'])
10
+ set :session, opentok.create_session
11
+
12
+ get '/' do
13
+
14
+ api_key = settings.api_key
15
+ session_id = settings.session.session_id
16
+ token = settings.opentok.generate_token(session_id)
17
+
18
+ erb :index, :locals => {
19
+ :api_key => api_key,
20
+ :session_id => session_id,
21
+ :token => token
22
+ }
23
+ end
24
+
25
+ # start the server if ruby file executed directly
26
+ run! if app_file == $0
27
+ end
@@ -0,0 +1,32 @@
1
+ // Initialize an OpenTok Session object
2
+ var session = TB.initSession(sessionId);
3
+
4
+ // Initialize a Publisher, and place it into the element with id="publisher"
5
+ var publisher = TB.initPublisher(apiKey, 'publisher');
6
+
7
+ // Attach event handlers
8
+ session.on({
9
+
10
+ // This function runs when session.connect() asynchronously completes
11
+ sessionConnected: function(event) {
12
+ // Publish the publisher we initialzed earlier (this will trigger 'streamCreated' on other
13
+ // clients)
14
+ session.publish(publisher);
15
+ },
16
+
17
+ // This function runs when another client publishes a stream (eg. session.publish())
18
+ streamCreated: function(event) {
19
+ // Create a container for a new Subscriber, assign it an id using the streamId, put it inside
20
+ // the element with id="subscribers"
21
+ var subContainer = document.createElement('div');
22
+ subContainer.id = 'stream-' + event.stream.streamId;
23
+ document.getElementById('subscribers').appendChild(subContainer);
24
+
25
+ // Subscribe to the stream that caused this event, put it inside the container we just made
26
+ session.subscribe(event.stream, subContainer);
27
+ }
28
+
29
+ });
30
+
31
+ // Connect to the Session using the 'apiKey' of the application and a 'token' for permission
32
+ session.connect(apiKey, token);
@@ -0,0 +1,21 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <title>OpenTok Hello World</title>
6
+ <script src="//static.opentok.com/webrtc/v2.2/js/TB.min.js"></script>
7
+ <script type="text/javascript">
8
+ var apiKey = '<%= api_key %>';
9
+ var sessionId = '<%= session_id %>';
10
+ var token = '<%= token %>';
11
+ </script>
12
+ <script src="/js/helloworld.js"></script>
13
+ </head>
14
+ <body>
15
+ <h2>Hello, World!</h2>
16
+
17
+ <div id="publisher"></div>
18
+
19
+ <div id="subscribers"></div>
20
+ </body>
21
+ </html>
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.opentok.com/v2/partner/123456/archive
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"sessionId":"SESSIONID","action":"start","name":""}'
9
+ headers:
10
+ X-Tb-Partner-Auth:
11
+ - 123456:1234567890abcdef1234567890abcdef1234567890
12
+ User-Agent:
13
+ - OpenTok-Ruby-SDK/<%= version %>
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Tue, 18 Mar 2014 22:54:03 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ body:
32
+ encoding: UTF-8
33
+ string: |-
34
+ {
35
+ "createdAt" : 1395183243556,
36
+ "duration" : 0,
37
+ "id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
38
+ "name" : "",
39
+ "partnerId" : 123456,
40
+ "reason" : "",
41
+ "sessionId" : "SESSIONID",
42
+ "size" : 0,
43
+ "status" : "started",
44
+ "url" : null
45
+ }
46
+ http_version:
47
+ recorded_at: Tue, 18 Mar 2014 22:54:03 GMT
48
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,49 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.opentok.com/v2/partner/123456/archive
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"sessionId":"SESSIONID","action":"start","name":"ARCHIVE
9
+ NAME"}'
10
+ headers:
11
+ X-Tb-Partner-Auth:
12
+ - 123456:1234567890abcdef1234567890abcdef1234567890
13
+ User-Agent:
14
+ - OpenTok-Ruby-SDK/<%= version %>
15
+ Content-Type:
16
+ - application/json
17
+ response:
18
+ status:
19
+ code: 200
20
+ message: OK
21
+ headers:
22
+ Server:
23
+ - nginx
24
+ Date:
25
+ - Wed, 19 Mar 2014 01:49:22 GMT
26
+ Content-Type:
27
+ - application/json
28
+ Transfer-Encoding:
29
+ - chunked
30
+ Connection:
31
+ - keep-alive
32
+ body:
33
+ encoding: UTF-8
34
+ string: |-
35
+ {
36
+ "createdAt" : 1395193762293,
37
+ "duration" : 0,
38
+ "id" : "d7f4d2a3-da74-414d-868a-190532a835bc",
39
+ "name" : "ARCHIVE NAME",
40
+ "partnerId" : 123456,
41
+ "reason" : "",
42
+ "sessionId" : "SESSIONID",
43
+ "size" : 0,
44
+ "status" : "started",
45
+ "url" : null
46
+ }
47
+ http_version:
48
+ recorded_at: Wed, 19 Mar 2014 01:49:22 GMT
49
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,32 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: delete
5
+ uri: https://api.opentok.com/v2/partner/123456/archive/832641bf-5dbf-41a1-ad94-fea213e59a92
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Tb-Partner-Auth:
11
+ - 123456:1234567890abcdef1234567890abcdef1234567890
12
+ User-Agent:
13
+ - OpenTok-Ruby-SDK/<%= version %>
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 204
19
+ message: No Content
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Wed, 19 Mar 2014 02:04:39 GMT
25
+ Connection:
26
+ - keep-alive
27
+ body:
28
+ encoding: UTF-8
29
+ string: ''
30
+ http_version:
31
+ recorded_at: Wed, 19 Mar 2014 02:04:39 GMT
32
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,46 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.opentok.com/v2/partner/123456/archive/f6e7ee58-d6cf-4a59-896b-6d56b158ec71
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Tb-Partner-Auth:
11
+ - 123456:1234567890abcdef1234567890abcdef1234567890
12
+ User-Agent:
13
+ - OpenTok-Ruby-SDK/<%= version %>
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Server:
20
+ - nginx
21
+ Date:
22
+ - Wed, 19 Mar 2014 01:49:22 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ body:
30
+ encoding: UTF-8
31
+ string: |-
32
+ {
33
+ "createdAt" : 1395187836000,
34
+ "duration" : 62,
35
+ "id" : "f6e7ee58-d6cf-4a59-896b-6d56b158ec71",
36
+ "name" : "",
37
+ "partnerId" : 123456,
38
+ "reason" : "",
39
+ "sessionId" : "SESSIONID",
40
+ "size" : 8347554,
41
+ "status" : "available",
42
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2Ff6e7ee58-d6cf-4a59-896b-6d56b158ec71%2Farchive.mp4?Expires=1395194362&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
43
+ }
44
+ http_version:
45
+ recorded_at: Wed, 19 Mar 2014 01:49:22 GMT
46
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,48 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.opentok.com/v2/partner/123456/archive/30b3ebf1-ba36-4f5b-8def-6f70d9986fe9
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"action":"stop"}'
9
+ headers:
10
+ X-Tb-Partner-Auth:
11
+ - 123456:1234567890abcdef1234567890abcdef1234567890
12
+ User-Agent:
13
+ - OpenTok-Ruby-SDK/<%= version %>
14
+ Content-Type:
15
+ - application/json
16
+ response:
17
+ status:
18
+ code: 200
19
+ message: OK
20
+ headers:
21
+ Server:
22
+ - nginx
23
+ Date:
24
+ - Tue, 18 Mar 2014 23:03:08 GMT
25
+ Content-Type:
26
+ - application/json
27
+ Transfer-Encoding:
28
+ - chunked
29
+ Connection:
30
+ - keep-alive
31
+ body:
32
+ encoding: UTF-8
33
+ string: |-
34
+ {
35
+ "createdAt" : 1395183243000,
36
+ "duration" : 0,
37
+ "id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
38
+ "name" : "",
39
+ "partnerId" : 123456,
40
+ "reason" : "",
41
+ "sessionId" : "SESSIONID",
42
+ "size" : 0,
43
+ "status" : "stopped",
44
+ "url" : null
45
+ }
46
+ http_version:
47
+ recorded_at: Tue, 18 Mar 2014 23:03:07 GMT
48
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,104 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.opentok.com/v2/partner/123456/archive
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Tb-Partner-Auth:
11
+ - 123456:1234567890abcdef1234567890abcdef1234567890
12
+ User-Agent:
13
+ - OpenTok-Ruby-SDK/<%= version %>
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Server:
20
+ - nginx
21
+ Date:
22
+ - Wed, 19 Mar 2014 00:14:55 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ body:
30
+ encoding: UTF-8
31
+ string: |-
32
+ {
33
+ "count" : 6,
34
+ "items" : [ {
35
+ "createdAt" : 1395187930000,
36
+ "duration" : 22,
37
+ "id" : "ef546c5a-4fd7-4e59-ab3d-f1cfb4148d1d",
38
+ "name" : "",
39
+ "partnerId" : 123456,
40
+ "reason" : "",
41
+ "sessionId" : "SESSIONID",
42
+ "size" : 2909274,
43
+ "status" : "available",
44
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2Fef546c5a-4fd7-4e59-ab3d-f1cfb4148d1d%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
45
+ }, {
46
+ "createdAt" : 1395187910000,
47
+ "duration" : 14,
48
+ "id" : "5350f06f-0166-402e-bc27-09ba54948512",
49
+ "name" : "",
50
+ "partnerId" : 123456,
51
+ "reason" : "",
52
+ "sessionId" : "SESSIONID",
53
+ "size" : 1952651,
54
+ "status" : "available",
55
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2F5350f06f-0166-402e-bc27-09ba54948512%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
56
+ }, {
57
+ "createdAt" : 1395187836000,
58
+ "duration" : 62,
59
+ "id" : "f6e7ee58-d6cf-4a59-896b-6d56b158ec71",
60
+ "name" : "",
61
+ "partnerId" : 123456,
62
+ "reason" : "",
63
+ "sessionId" : "SESSIONID",
64
+ "size" : 8347554,
65
+ "status" : "available",
66
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2Ff6e7ee58-d6cf-4a59-896b-6d56b158ec71%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
67
+ }, {
68
+ "createdAt" : 1395183243000,
69
+ "duration" : 544,
70
+ "id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
71
+ "name" : "",
72
+ "partnerId" : 123456,
73
+ "reason" : "",
74
+ "sessionId" : "SESSIONID",
75
+ "size" : 78499758,
76
+ "status" : "available",
77
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2F30b3ebf1-ba36-4f5b-8def-6f70d9986fe9%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
78
+ }, {
79
+ "createdAt" : 1394396753000,
80
+ "duration" : 24,
81
+ "id" : "b8f64de1-e218-4091-9544-4cbf369fc238",
82
+ "name" : "showtime again",
83
+ "partnerId" : 123456,
84
+ "reason" : "",
85
+ "sessionId" : "SESSIONID",
86
+ "size" : 2227849,
87
+ "status" : "available",
88
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2Fb8f64de1-e218-4091-9544-4cbf369fc238%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
89
+ }, {
90
+ "createdAt" : 1394321113000,
91
+ "duration" : 1294,
92
+ "id" : "832641bf-5dbf-41a1-ad94-fea213e59a92",
93
+ "name" : "showtime",
94
+ "partnerId" : 123456,
95
+ "reason" : "",
96
+ "sessionId" : "SESSIONID",
97
+ "size" : 42165242,
98
+ "status" : "available",
99
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2F832641bf-5dbf-41a1-ad94-fea213e59a92%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
100
+ } ]
101
+ }
102
+ http_version:
103
+ recorded_at: Wed, 19 Mar 2014 00:14:55 GMT
104
+ recorded_with: VCR 2.8.0
@@ -0,0 +1,71 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.opentok.com/v2/partner/123456/archive?offset=3
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-Tb-Partner-Auth:
11
+ - 123456:1234567890abcdef1234567890abcdef1234567890
12
+ User-Agent:
13
+ - OpenTok-Ruby-SDK/<%= version %>
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Server:
20
+ - nginx
21
+ Date:
22
+ - Wed, 19 Mar 2014 00:44:22 GMT
23
+ Content-Type:
24
+ - application/json
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ body:
30
+ encoding: UTF-8
31
+ string: |-
32
+ {
33
+ "count" : 6,
34
+ "items" : [ {
35
+ "createdAt" : 1395183243000,
36
+ "duration" : 544,
37
+ "id" : "30b3ebf1-ba36-4f5b-8def-6f70d9986fe9",
38
+ "name" : "",
39
+ "partnerId" : 123456,
40
+ "reason" : "",
41
+ "sessionId" : "SESSIONID",
42
+ "size" : 78499758,
43
+ "status" : "available",
44
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2F30b3ebf1-ba36-4f5b-8def-6f70d9986fe9%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
45
+ }, {
46
+ "createdAt" : 1394396753000,
47
+ "duration" : 24,
48
+ "id" : "b8f64de1-e218-4091-9544-4cbf369fc238",
49
+ "name" : "showtime again",
50
+ "partnerId" : 123456,
51
+ "reason" : "",
52
+ "sessionId" : "SESSIONID",
53
+ "size" : 2227849,
54
+ "status" : "available",
55
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2Fb8f64de1-e218-4091-9544-4cbf369fc238%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
56
+ }, {
57
+ "createdAt" : 1394321113000,
58
+ "duration" : 1294,
59
+ "id" : "832641bf-5dbf-41a1-ad94-fea213e59a92",
60
+ "name" : "showtime",
61
+ "partnerId" : 123456,
62
+ "reason" : "",
63
+ "sessionId" : "SESSIONID",
64
+ "size" : 42165242,
65
+ "status" : "available",
66
+ "url" : "http://tokbox.com.archive2.s3.amazonaws.com/123456%2F832641bf-5dbf-41a1-ad94-fea213e59a92%2Farchive.mp4?Expires=1395188695&AWSAccessKeyId=AKIAI6LQCPIXYVWCQV6Q&Signature=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
67
+ } ]
68
+ }
69
+ http_version:
70
+ recorded_at: Wed, 19 Mar 2014 00:44:22 GMT
71
+ recorded_with: VCR 2.8.0