Module: Legion::Extensions::MicrosoftTeams::Runners::Transcripts
- Includes:
- Helpers::Lex, Helpers::Client
- Included in:
- Client
- Defined in:
- lib/legion/extensions/microsoft_teams/runners/transcripts.rb
Constant Summary
collapse
- CONTENT_TYPES =
{
vtt: 'text/vtt',
docx: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
}.freeze
Class Method Summary
collapse
Instance Method Summary
collapse
#bot_connection, #graph_connection, #oauth_connection, #user_path
Class Method Details
.trigger_words ⇒ Object
17
18
19
|
# File 'lib/legion/extensions/microsoft_teams/runners/transcripts.rb', line 17
def self.trigger_words
%w[transcript transcripts vtt spoken]
end
|
Instance Method Details
#get_transcript(meeting_id:, transcript_id:, user_id: 'me') ⇒ Object
46
47
48
49
50
51
|
# File 'lib/legion/extensions/microsoft_teams/runners/transcripts.rb', line 46
def get_transcript(meeting_id:, transcript_id:, user_id: 'me', **)
response = graph_connection(**).get(
"#{user_path(user_id)}/onlineMeetings/#{meeting_id}/transcripts/#{transcript_id}"
)
{ result: response.body }
end
|
#get_transcript_content(meeting_id:, transcript_id:, user_id: 'me', format: :vtt) ⇒ Object
64
65
66
67
68
69
70
71
72
|
# File 'lib/legion/extensions/microsoft_teams/runners/transcripts.rb', line 64
def get_transcript_content(meeting_id:, transcript_id:, user_id: 'me', format: :vtt, **)
accept = CONTENT_TYPES.fetch(format)
response = graph_connection(**).get(
"#{user_path(user_id)}/onlineMeetings/#{meeting_id}/transcripts/#{transcript_id}/content"
) do |req|
req.['Accept'] = accept
end
{ result: response.body }
end
|
#list_transcripts(meeting_id:, user_id: 'me') ⇒ Object
30
31
32
33
|
# File 'lib/legion/extensions/microsoft_teams/runners/transcripts.rb', line 30
def list_transcripts(meeting_id:, user_id: 'me', **)
response = graph_connection(**).get("#{user_path(user_id)}/onlineMeetings/#{meeting_id}/transcripts")
{ result: response.body }
end
|