add recordings api actions

This commit is contained in:
Zachary Chai
2016-10-28 16:21:44 -04:00
parent fdf6f0e2c4
commit 3871e0129c
9 changed files with 129 additions and 19 deletions

View File

@ -0,0 +1,3 @@
json.messageKey messageKey
json.message message
json.status status

View File

@ -0,0 +1 @@
json.partial! 'bbb', messageKey: @messageKey, message: @message, status: @status

View File

@ -1,7 +1,5 @@
json.messageKey @messageKey
json.message @message
json.status @status
if @response
json.partial! 'bbb', messageKey: @messageKey, message: @message, status: @status
unless @response.blank?
json.response do
json.join_url(@response[:join_url]) if @response[:join_url]
end

View File

@ -0,0 +1,21 @@
json.partial! 'bbb', messageKey: @messageKey, message: @message, status: @status
unless @response.blank?
json.recordings do
unless @response.is_a? Array
@response = [@response]
end
json.array!(@response) do |recording|
json.id recording[:recordID]
json.name recording[:name]
json.start_time recording[:startTime]
json.end_time recording[:endTime]
json.published recording[:published]
json.playbacks do
json.array!(recording[:playback][:format]) do |playback|
json.type playback[:type]
json.url playback[:url]
end
end
end
end
end

View File

@ -0,0 +1 @@
json.partial! 'bbb', messageKey: @messageKey, message: @message, status: @status

View File

@ -34,5 +34,7 @@
<% end %>
</div>
<table id="recordings" class="table table-striped table-bordered dt-responsive" width="100%"></table>
</div>
</div>