bridge_api 0.1.49 → 0.1.50
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7054ef4b473c3ef2e8a247b2ab12da384d7b0d2d
|
4
|
+
data.tar.gz: 9116565ebb368b7d8c23ec94f97d998b168a0671
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c603510bc5433003404ab86b855263fe49c286cb0bb55cc51bb887eb927b8a314171543059c806f9441903e33db27b0036c2843aa4017f75813df6bf46b0cf58
|
7
|
+
data.tar.gz: 6d9966152c4059e0ffcaf5dac06d47928a5a374d4ae85364d7a671c56c6625cee5f819b4c6e12e330912e10e31f5fc8cfdd2bb384c5418dc4152577d9ed9041b
|
@@ -2,7 +2,11 @@ module BridgeAPI
|
|
2
2
|
class Client
|
3
3
|
module LiveCourse
|
4
4
|
def get_all_live_courses(params = {})
|
5
|
-
get("#{API_PATH}#{AUTHOR_PATH}
|
5
|
+
get("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}", params)
|
6
|
+
end
|
7
|
+
|
8
|
+
def get_live_course(live_course_id, params = {})
|
9
|
+
get("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}", params)
|
6
10
|
end
|
7
11
|
end
|
8
12
|
end
|
data/lib/bridge_api/version.rb
CHANGED
@@ -12,4 +12,10 @@ describe BridgeAPI::Client::LiveCourse do
|
|
12
12
|
expect(response.members.first['id']).to eq('1')
|
13
13
|
expect(response.members.first['title']).to eq('New Rep Training')
|
14
14
|
end
|
15
|
+
|
16
|
+
it 'should return a live course object' do
|
17
|
+
response = @client.get_live_course(1)
|
18
|
+
expect(response.status).to eq(200)
|
19
|
+
expect(response.body['live_courses'][0]['title']).to eq('Live Training')
|
20
|
+
end
|
15
21
|
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
{
|
2
|
+
"meta": {},
|
3
|
+
"live_courses": [{
|
4
|
+
"id": "1",
|
5
|
+
"title": "Live Training",
|
6
|
+
"author_id": "4",
|
7
|
+
"description": "Brief overview of using Live Trainings",
|
8
|
+
"sessions_count": "1",
|
9
|
+
"enrollments_count": "2",
|
10
|
+
"enrollment_counts": {
|
11
|
+
"all": "2",
|
12
|
+
"invited": "2",
|
13
|
+
"not_registered": "2",
|
14
|
+
"registered": "0",
|
15
|
+
"finished": "0"
|
16
|
+
},
|
17
|
+
"is_published": true,
|
18
|
+
"meta": {
|
19
|
+
"domain_id": "1",
|
20
|
+
"sub_account_id": "1",
|
21
|
+
"r2b_jwt": "jwt"
|
22
|
+
},
|
23
|
+
"direct_messaging_enabled": false,
|
24
|
+
"tags": [],
|
25
|
+
"matching_tags": [],
|
26
|
+
"categories": [],
|
27
|
+
"expires": false,
|
28
|
+
"default_days_until_expiration": "12",
|
29
|
+
"auto_re_enroll": false,
|
30
|
+
"re_enrollment_period": "30",
|
31
|
+
"open_enrollment": false,
|
32
|
+
"uuid": "0e8aef72",
|
33
|
+
"enroll_url": "https://test.bridgeapp.com/learner/training/0e8aef72/enroll",
|
34
|
+
"sub_account": {
|
35
|
+
"id": "1",
|
36
|
+
"name": "Test Sandbox",
|
37
|
+
"is_root": true,
|
38
|
+
"sub_accounts_exist": true,
|
39
|
+
"not_current": false,
|
40
|
+
"tac_type": "domestic",
|
41
|
+
"tac_updated_at": "2018-11-19T16:18:10.806Z"
|
42
|
+
}
|
43
|
+
}]
|
44
|
+
}
|
data/spec/support/fake_bridge.rb
CHANGED
@@ -167,6 +167,10 @@ class FakeBridge < Sinatra::Base
|
|
167
167
|
get_json_data 200, 'live_courses.json'
|
168
168
|
end
|
169
169
|
|
170
|
+
get %r{/api/author/live_courses/\d+$} do
|
171
|
+
get_json_data 200, 'live_course.json'
|
172
|
+
end
|
173
|
+
|
170
174
|
# Live Course Enrollments
|
171
175
|
get %r{/api/author/live_courses/\d+/learners} do
|
172
176
|
get_json_data 200, 'live_course_enrollments.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.
|
4
|
+
version: 0.1.50
|
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-12-
|
11
|
+
date: 2018-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -270,6 +270,7 @@ files:
|
|
270
270
|
- spec/fixtures/enrollment.json
|
271
271
|
- spec/fixtures/enrollments.json
|
272
272
|
- spec/fixtures/group.json
|
273
|
+
- spec/fixtures/live_course.json
|
273
274
|
- spec/fixtures/live_course_enrollments.json
|
274
275
|
- spec/fixtures/live_course_sessions.json
|
275
276
|
- spec/fixtures/live_courses.json
|
@@ -306,54 +307,55 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
307
|
version: '0'
|
307
308
|
requirements: []
|
308
309
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.
|
310
|
+
rubygems_version: 2.5.2.1
|
310
311
|
signing_key:
|
311
312
|
specification_version: 4
|
312
313
|
summary: Bridge API
|
313
314
|
test_files:
|
315
|
+
- spec/bridge_api/client_spec.rb
|
316
|
+
- spec/bridge_api/client/enrollment_spec.rb
|
317
|
+
- spec/bridge_api/client/custom_field_spec.rb
|
314
318
|
- spec/bridge_api/client/account_spec.rb
|
315
|
-
- spec/bridge_api/client/
|
319
|
+
- spec/bridge_api/client/data_dump_spec.rb
|
320
|
+
- spec/bridge_api/client/live_course_spec.rb
|
316
321
|
- spec/bridge_api/client/clone_object_spec.rb
|
317
322
|
- spec/bridge_api/client/course_template_spec.rb
|
318
|
-
- spec/bridge_api/client/
|
319
|
-
- spec/bridge_api/client/
|
320
|
-
- spec/bridge_api/client/enrollment_spec.rb
|
323
|
+
- spec/bridge_api/client/affiliations_spec.rb
|
324
|
+
- spec/bridge_api/client/sub_account_spec.rb
|
321
325
|
- spec/bridge_api/client/group_spec.rb
|
322
|
-
- spec/bridge_api/client/live_course_enrollments_spec.rb
|
323
326
|
- spec/bridge_api/client/live_course_session_spec.rb
|
324
|
-
- spec/bridge_api/client/live_course_spec.rb
|
325
|
-
- spec/bridge_api/client/manager_spec.rb
|
326
327
|
- spec/bridge_api/client/program_enrollment_spec.rb
|
327
|
-
- spec/bridge_api/client/role_spec.rb
|
328
|
-
- spec/bridge_api/client/sub_account_spec.rb
|
329
328
|
- spec/bridge_api/client/user_spec.rb
|
330
|
-
- spec/bridge_api/
|
331
|
-
- spec/
|
332
|
-
- spec/
|
333
|
-
- spec/
|
329
|
+
- spec/bridge_api/client/role_spec.rb
|
330
|
+
- spec/bridge_api/client/manager_spec.rb
|
331
|
+
- spec/bridge_api/client/live_course_enrollments_spec.rb
|
332
|
+
- spec/support/fake_bridge.rb
|
333
|
+
- spec/fixtures/roles.json
|
334
|
+
- spec/fixtures/live_course.json
|
335
|
+
- spec/fixtures/managers.json
|
336
|
+
- spec/fixtures/program_enrollments.json
|
337
|
+
- spec/fixtures/enrollment.json
|
338
|
+
- spec/fixtures/sub_accounts.json
|
339
|
+
- spec/fixtures/user_roles_add.json
|
334
340
|
- spec/fixtures/course.json
|
335
|
-
- spec/fixtures/
|
336
|
-
- spec/fixtures/custom_fields.json
|
337
|
-
- spec/fixtures/data_dump.json
|
341
|
+
- spec/fixtures/live_course_sessions.json
|
338
342
|
- spec/fixtures/data_dumps.json
|
339
|
-
- spec/fixtures/
|
343
|
+
- spec/fixtures/users.json
|
340
344
|
- spec/fixtures/direct_reports.json
|
341
|
-
- spec/fixtures/enrollment.json
|
342
|
-
- spec/fixtures/enrollments.json
|
343
|
-
- spec/fixtures/group.json
|
344
|
-
- spec/fixtures/live_course_enrollments.json
|
345
|
-
- spec/fixtures/live_course_sessions.json
|
346
|
-
- spec/fixtures/live_courses.json
|
347
|
-
- spec/fixtures/managers.json
|
348
|
-
- spec/fixtures/program_enrollments.json
|
349
|
-
- spec/fixtures/programs.json
|
350
|
-
- spec/fixtures/roles.json
|
351
345
|
- spec/fixtures/sub_account_lti_config.json
|
346
|
+
- spec/fixtures/user.json
|
347
|
+
- spec/fixtures/courses.json
|
352
348
|
- spec/fixtures/sub_account_lti_config_update.json
|
349
|
+
- spec/fixtures/default_web_conference.json
|
350
|
+
- spec/fixtures/programs.json
|
353
351
|
- spec/fixtures/sub_account_new_lti_config.json
|
354
|
-
- spec/fixtures/
|
355
|
-
- spec/fixtures/
|
356
|
-
- spec/fixtures/
|
357
|
-
- spec/fixtures/
|
358
|
-
- spec/
|
352
|
+
- spec/fixtures/enrollments.json
|
353
|
+
- spec/fixtures/group.json
|
354
|
+
- spec/fixtures/affiliations.json
|
355
|
+
- spec/fixtures/accounts.json
|
356
|
+
- spec/fixtures/live_courses.json
|
357
|
+
- spec/fixtures/clone_objects.json
|
358
|
+
- spec/fixtures/data_dump.json
|
359
|
+
- spec/fixtures/live_course_enrollments.json
|
360
|
+
- spec/fixtures/custom_fields.json
|
359
361
|
- spec/test_helper.rb
|