bridge_api 0.1.42 → 0.1.43
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff20744ca9aac7746c13a3a16a750d590865907836cdfcc60a40b07c4b67cc9d
|
4
|
+
data.tar.gz: 8dd43a5f6b7306fd893e5ebb0555b793a3c5a3fe851211841d2acd584f54df89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15e7375a4c75a5d3dbe046945f47f4a36a754b61fc51a6a52d405b31415fdc8f75d47a66bdc90385f2ff8dbd23e214f93b8fe29e333e091f5de1bc28bf1b3a59
|
7
|
+
data.tar.gz: 2c3e1edc68e0497c23d79bfeaf775220edfb6c3001c57d9432612c857b26dd407441aa5e7d84263e0b0940bf105002db7e84f6cea1ef491419cc0398190a40df
|
@@ -2,6 +2,14 @@ module BridgeAPI
|
|
2
2
|
class Client
|
3
3
|
module LiveCourseSession
|
4
4
|
|
5
|
+
def get_live_course_sessions(live_course_id, params = {})
|
6
|
+
get("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}#{SESSIONS_PATH}", params)
|
7
|
+
end
|
8
|
+
|
9
|
+
def get_live_course_session(live_course_id, live_course_session_id, params = {})
|
10
|
+
get("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}#{SESSIONS_PATH}/#{live_course_session_id}", params)
|
11
|
+
end
|
12
|
+
|
5
13
|
def create_live_course_session(live_course_id, params = {})
|
6
14
|
post("#{API_PATH}#{AUTHOR_PATH}#{LIVE_COURSES_PATH}/#{live_course_id}#{SESSIONS_PATH}", params)
|
7
15
|
end
|
data/lib/bridge_api/version.rb
CHANGED
@@ -5,6 +5,16 @@ 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 list the live course sessions' do
|
9
|
+
response = @client.get_live_course_sessions(1)
|
10
|
+
expect(response.status).to eq(201)
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should list the live course session' do
|
14
|
+
response = @client.get_live_course_session(1, 5)
|
15
|
+
expect(response.status).to eq(201)
|
16
|
+
end
|
17
|
+
|
8
18
|
it 'should create a live course session in bridge' do
|
9
19
|
params = {
|
10
20
|
sessions: [{
|
data/spec/support/fake_bridge.rb
CHANGED
@@ -178,6 +178,14 @@ class FakeBridge < Sinatra::Base
|
|
178
178
|
get_json_data 200, 'live_course_sessions.json'
|
179
179
|
end
|
180
180
|
|
181
|
+
get %r{/api/author/live_courses/\d+/sessions} do
|
182
|
+
get_json_data 201, 'live_course_sessions.json'
|
183
|
+
end
|
184
|
+
|
185
|
+
get %r{/api/author/live_courses/\d+/sessions/\d+} do
|
186
|
+
get_json_data 201, 'live_course_sessions.json'
|
187
|
+
end
|
188
|
+
|
181
189
|
post %r{/api/author/live_courses/\d+/sessions} do
|
182
190
|
get_json_data 201, 'live_course_sessions.json'
|
183
191
|
end
|
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.43
|
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-
|
11
|
+
date: 2018-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
292
|
version: '0'
|
293
293
|
requirements: []
|
294
294
|
rubyforge_project:
|
295
|
-
rubygems_version: 2.7.
|
295
|
+
rubygems_version: 2.7.3
|
296
296
|
signing_key:
|
297
297
|
specification_version: 4
|
298
298
|
summary: Bridge API
|