Module: Legion::Extensions::MicrosoftTeams::Runners::People
- Includes:
- Helpers::Lex, Helpers::Client
- Included in:
- Client
- Defined in:
- lib/legion/extensions/microsoft_teams/runners/people.rb
Instance Method Summary
collapse
#bot_connection, #graph_connection, #oauth_connection, #user_path
Instance Method Details
#get_profile(user_id: 'me') ⇒ Object
12
13
14
15
16
17
|
# File 'lib/legion/extensions/microsoft_teams/runners/people.rb', line 12
def get_profile(user_id: 'me', **)
response = graph_connection(**).get(user_path(user_id).to_s)
{ result: response.body }
rescue StandardError => e
{ error: e.message }
end
|
#list_people(user_id: 'me', top: 25) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/legion/extensions/microsoft_teams/runners/people.rb', line 19
def list_people(user_id: 'me', top: 25, **)
params = { '$top' => top }
response = graph_connection(**).get("#{user_path(user_id)}/people", params)
{ result: response.body }
rescue StandardError => e
{ error: e.message }
end
|