bridge_api 0.1.38 → 0.1.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e89e886230a7256269ef5bb7af67f200edd129bc
4
- data.tar.gz: 7b0278918ab4d91ff21b79974ef5163d90ee012d
3
+ metadata.gz: 788fb21416bd2475acff74d00650bbed9d888b00
4
+ data.tar.gz: d813c9e0f547c558a8b035f33336f75c76c2dd77
5
5
  SHA512:
6
- metadata.gz: f04cc0ee442f8249d674e06646e6efec91cc233659279ac261d00d31478c9e3e90ff1a893728522c9dc8f70ecc2ee3d77e4e4b73d0c2f1675e50767f3a466b46
7
- data.tar.gz: e8b2669baf29c7c2ec5e82143cfbe6561a75995ecbac7759d3dbd53b6aab9ee86950dffe628b207846f38aeed61a34059c0f6ce5a23097bfaee8dbd379dffb85
6
+ metadata.gz: 43829dbb410131e352f218e3ff9307c441f9ae5ecb59671affe0535b2baa050aa31252d08cb8189601b558280313a49de72869c35602a9d92521838c5ccb715c
7
+ data.tar.gz: c84eed29469018044df19cc110338d95179ab35ab8380cf23f14ac4270767f56d0885d1ad08bf905d39a389ea563fc0710d5b26521daacba2e3da11b46317daf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bridge_api (0.1.37)
4
+ bridge_api (0.1.38)
5
5
  faraday (~> 0.9.0)
6
6
  faraday_middleware (~> 0.9.0)
7
7
  footrest (>= 0.5.1)
@@ -10,7 +10,7 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (5.2.0)
13
+ activesupport (5.2.1)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 0.7, < 2)
16
16
  minitest (~> 5.1)
@@ -32,7 +32,7 @@ GEM
32
32
  faraday (>= 0.9.0, < 1)
33
33
  link_header (>= 0.0.7)
34
34
  hashdiff (0.3.7)
35
- i18n (1.0.1)
35
+ i18n (1.1.0)
36
36
  concurrent-ruby (~> 1.0)
37
37
  link_header (0.0.8)
38
38
  little-plugger (1.1.4)
@@ -37,6 +37,7 @@ module BridgeAPI
37
37
  LIVE_COURSES_PATH = '/live_courses'.freeze
38
38
  SESSIONS_PATH = '/sessions'.freeze
39
39
  PUBLISH_PATH = '/publish'.freeze
40
+ WEB_CONFERENCES_PATH = '/web_conferences'.freeze
40
41
  RESULT_MAPPING = {}
41
42
 
42
43
  Dir[File.dirname(__FILE__) + '/client/*.rb'].each do |file|
@@ -14,9 +14,17 @@ module BridgeAPI
14
14
  put("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}#{SESSIONS_PATH}/#{session_id}", params)
15
15
  end
16
16
 
17
+ def update_web_conference(live_course_id, session_id, params = {})
18
+ put("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}#{SESSIONS_PATH}/#{session_id}#{WEB_CONFERENCES_PATH}", params)
19
+ end
20
+
17
21
  def publish_live_course_session(live_course_id, session_id)
18
22
  post("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}#{SESSIONS_PATH}/#{session_id}#{PUBLISH_PATH}")
19
23
  end
24
+
25
+ def get_default_web_conference(params = {})
26
+ get("#{API_PATH}#{AUTHOR_PATH}#{WEB_CONFERENCES_PATH}", params)
27
+ end
20
28
  end
21
29
  end
22
- end
30
+ end
@@ -1,3 +1,3 @@
1
1
  module BridgeAPI
2
- VERSION = '0.1.38'.freeze unless defined?(BridgeAPI::VERSION)
2
+ VERSION = '0.1.40'.freeze unless defined?(BridgeAPI::VERSION)
3
3
  end
@@ -5,35 +5,50 @@ describe BridgeAPI::Client::LiveCourseSession do
5
5
  @client = BridgeAPI::Client.new(prefix: 'http://test.bridge.com', token: 'test_token')
6
6
  end
7
7
 
8
- it 'should create a live course session in bridge' do
9
- params = {
10
- sessions: [{
11
- start_at: '2018-08-07T15:00:00.918Z',
12
- end_at: '2018-08-07T16:00:00.918Z',
13
- timezone: 'America/Denver'
14
- }]
15
- }
16
- response = @client.create_live_course_session(1, params)
17
- expect(response.status).to eq(201)
18
- end
8
+ it 'should create a live course session in bridge' do
9
+ params = {
10
+ sessions: [{
11
+ start_at: '2018-08-07T15:00:00.918Z',
12
+ end_at: '2018-08-07T16:00:00.918Z',
13
+ timezone: 'America/Denver'
14
+ }]
15
+ }
16
+ response = @client.create_live_course_session(1, params)
17
+ expect(response.status).to eq(201)
18
+ end
19
19
 
20
- it 'should delete a live course session in bridge' do
21
- response = @client.delete_live_course_session(1,5)
22
- expect(response.status).to eq(204)
23
- end
20
+ it 'should delete a live course session in bridge' do
21
+ response = @client.delete_live_course_session(1,5)
22
+ expect(response.status).to eq(204)
23
+ end
24
+
25
+ it 'should update the existing live course session' do
26
+ params = {
27
+ sessions: [{
28
+ seats: 5
29
+ }]
30
+ }
31
+ response = @client.update_live_course_session(1, 5, params)
32
+ expect(response.status).to eq(200)
33
+ end
24
34
 
25
- it 'should update the existing live course session' do
26
- params = {
27
- sessions: [{
28
- seats: 5
29
- }]
35
+ it 'should update web_conference' do
36
+ params = {
37
+ web_conference: {
38
+ provider: "Bluejeans"
30
39
  }
31
- response = @client.update_live_course_session(1, 5, params)
32
- expect(response.status).to eq(200)
33
- end
40
+ }
41
+ response = @client.update_web_conference(1, 5, params)
42
+ expect(response.status).to eq(200)
43
+ end
44
+
45
+ it 'should publish a live course session' do
46
+ response = @client.publish_live_course_session(1, 5)
47
+ expect(response.status).to eq(200)
48
+ end
34
49
 
35
- it 'should publish a live course session' do
36
- response = @client.publish_live_course_session(1, 5)
37
- expect(response.status).to eq(200)
38
- end
50
+ it 'should get default web_conference config' do
51
+ response = @client.get_default_web_conference({default_session: 1})
52
+ expect(response.status).to eq(200)
53
+ end
39
54
  end
@@ -0,0 +1,16 @@
1
+ {
2
+ "web_conferences":
3
+ [
4
+ {
5
+ "id":"7",
6
+ "provider":"Bluejeans",
7
+ "other_provider":null,
8
+ "meeting_url":null,
9
+ "access_code":null,
10
+ "phone":null,
11
+ "password":null,
12
+ "registration_link":null,
13
+ "host_key":null
14
+ }
15
+ ]
16
+ }
@@ -168,6 +168,11 @@ class FakeBridge < Sinatra::Base
168
168
  get_json_data 200, 'live_course_enrollments.json'
169
169
  end
170
170
 
171
+ # Web Conference
172
+ get %r{/api/author/web_conferences$} do
173
+ get_json_data 200, 'default_web_conference.json'
174
+ end
175
+
171
176
  # Live Course Sessions
172
177
  post %r{/api/author/live_courses/\d+/sessions/\d+/publish} do
173
178
  get_json_data 200, 'live_course_sessions.json'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.38
4
+ version: 0.1.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-16 00:00:00.000000000 Z
11
+ date: 2018-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -250,6 +250,7 @@ files:
250
250
  - spec/fixtures/custom_fields.json
251
251
  - spec/fixtures/data_dump.json
252
252
  - spec/fixtures/data_dumps.json
253
+ - spec/fixtures/default_web_conference.json
253
254
  - spec/fixtures/direct_reports.json
254
255
  - spec/fixtures/enrollment.json
255
256
  - spec/fixtures/enrollments.json
@@ -290,54 +291,54 @@ required_rubygems_version: !ruby/object:Gem::Requirement
290
291
  version: '0'
291
292
  requirements: []
292
293
  rubyforge_project:
293
- rubygems_version: 2.6.14
294
+ rubygems_version: 2.5.2.1
294
295
  signing_key:
295
296
  specification_version: 4
296
297
  summary: Bridge API
297
298
  test_files:
299
+ - spec/bridge_api/client_spec.rb
300
+ - spec/bridge_api/client/enrollment_spec.rb
301
+ - spec/bridge_api/client/custom_field_spec.rb
298
302
  - spec/bridge_api/client/account_spec.rb
299
- - spec/bridge_api/client/affiliations.rb
303
+ - spec/bridge_api/client/data_dump_spec.rb
304
+ - spec/bridge_api/client/live_course_spec.rb
300
305
  - spec/bridge_api/client/clone_object_spec.rb
301
306
  - spec/bridge_api/client/course_template_spec.rb
302
- - spec/bridge_api/client/custom_field_spec.rb
303
- - spec/bridge_api/client/data_dump_spec.rb
304
- - spec/bridge_api/client/enrollment_spec.rb
307
+ - spec/bridge_api/client/sub_account_spec.rb
305
308
  - spec/bridge_api/client/group_spec.rb
306
- - spec/bridge_api/client/live_course_enrollments_spec.rb
309
+ - spec/bridge_api/client/affiliations.rb
307
310
  - spec/bridge_api/client/live_course_session_spec.rb
308
- - spec/bridge_api/client/live_course_spec.rb
309
- - spec/bridge_api/client/manager_spec.rb
310
311
  - spec/bridge_api/client/program_enrollment_spec.rb
311
- - spec/bridge_api/client/role_spec.rb
312
- - spec/bridge_api/client/sub_account_spec.rb
313
312
  - spec/bridge_api/client/user_spec.rb
314
- - spec/bridge_api/client_spec.rb
315
- - spec/fixtures/accounts.json
316
- - spec/fixtures/affiliations.json
317
- - spec/fixtures/clone_objects.json
313
+ - spec/bridge_api/client/role_spec.rb
314
+ - spec/bridge_api/client/manager_spec.rb
315
+ - spec/bridge_api/client/live_course_enrollments_spec.rb
316
+ - spec/support/fake_bridge.rb
317
+ - spec/fixtures/roles.json
318
+ - spec/fixtures/managers.json
319
+ - spec/fixtures/program_enrollments.json
320
+ - spec/fixtures/enrollment.json
321
+ - spec/fixtures/sub_accounts.json
322
+ - spec/fixtures/user_roles_add.json
318
323
  - spec/fixtures/course.json
319
- - spec/fixtures/courses.json
320
- - spec/fixtures/custom_fields.json
321
- - spec/fixtures/data_dump.json
324
+ - spec/fixtures/live_course_sessions.json
322
325
  - spec/fixtures/data_dumps.json
326
+ - spec/fixtures/users.json
323
327
  - spec/fixtures/direct_reports.json
324
- - spec/fixtures/enrollment.json
325
- - spec/fixtures/enrollments.json
326
- - spec/fixtures/group.json
327
- - spec/fixtures/live_course_enrollments.json
328
- - spec/fixtures/live_course_sessions.json
329
- - spec/fixtures/live_courses.json
330
- - spec/fixtures/managers.json
331
- - spec/fixtures/program_enrollments.json
332
- - spec/fixtures/programs.json
333
- - spec/fixtures/roles.json
334
328
  - spec/fixtures/sub_account_lti_config.json
329
+ - spec/fixtures/user.json
330
+ - spec/fixtures/courses.json
335
331
  - spec/fixtures/sub_account_lti_config_update.json
332
+ - spec/fixtures/default_web_conference.json
333
+ - spec/fixtures/programs.json
336
334
  - spec/fixtures/sub_account_new_lti_config.json
337
- - spec/fixtures/sub_accounts.json
338
- - spec/fixtures/user.json
339
- - spec/fixtures/user_roles_add.json
340
- - spec/fixtures/users.json
341
- - spec/support/fake_bridge.rb
335
+ - spec/fixtures/enrollments.json
336
+ - spec/fixtures/group.json
337
+ - spec/fixtures/affiliations.json
338
+ - spec/fixtures/accounts.json
339
+ - spec/fixtures/live_courses.json
340
+ - spec/fixtures/clone_objects.json
341
+ - spec/fixtures/data_dump.json
342
+ - spec/fixtures/live_course_enrollments.json
343
+ - spec/fixtures/custom_fields.json
342
344
  - spec/test_helper.rb
343
- has_rdoc: