Class: Knockapi::Resources::Providers::MsTeams
- Inherits:
-
Object
- Object
- Knockapi::Resources::Providers::MsTeams
- Defined in:
- lib/knockapi/resources/providers/ms_teams.rb
Instance Method Summary collapse
-
#check_auth(channel_id, ms_teams_tenant_object:, request_options: {}) ⇒ Knockapi::Models::Providers::MsTeamCheckAuthResponse
Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant object.
-
#initialize(client:) ⇒ MsTeams
constructor
private
A new instance of MsTeams.
-
#list_channels(channel_id, ms_teams_tenant_object:, team_id:, query_options: nil, request_options: {}) ⇒ Knockapi::Models::Providers::MsTeamListChannelsResponse
List the Microsoft Teams channels within a team.
-
#list_teams(channel_id, ms_teams_tenant_object:, query_options: nil, request_options: {}) ⇒ Knockapi::Internal::MsTeamsPagination<Knockapi::Models::Providers::MsTeamListTeamsResponse>
Get a list of teams belonging to the Microsoft Entra tenant.
-
#revoke_access(channel_id, ms_teams_tenant_object:, request_options: {}) ⇒ Knockapi::Models::Providers::MsTeamRevokeAccessResponse
Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
Constructor Details
#initialize(client:) ⇒ MsTeams
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of MsTeams.
116 117 118 |
# File 'lib/knockapi/resources/providers/ms_teams.rb', line 116 def initialize(client:) @client = client end |
Instance Method Details
#check_auth(channel_id, ms_teams_tenant_object:, request_options: {}) ⇒ Knockapi::Models::Providers::MsTeamCheckAuthResponse
Check if a connection to Microsoft Teams has been authorized for a given Microsoft Teams tenant object.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/knockapi/resources/providers/ms_teams.rb', line 21 def check_auth(channel_id, params) parsed, = Knockapi::Providers::MsTeamCheckAuthParams.dump_request(params) @client.request( method: :get, path: ["v1/providers/ms-teams/%1$s/auth_check", channel_id], query: parsed, model: Knockapi::Models::Providers::MsTeamCheckAuthResponse, options: ) end |
#list_channels(channel_id, ms_teams_tenant_object:, team_id:, query_options: nil, request_options: {}) ⇒ Knockapi::Models::Providers::MsTeamListChannelsResponse
List the Microsoft Teams channels within a team. By default, archived and private channels are excluded from the results.
50 51 52 53 54 55 56 57 58 59 |
# File 'lib/knockapi/resources/providers/ms_teams.rb', line 50 def list_channels(channel_id, params) parsed, = Knockapi::Providers::MsTeamListChannelsParams.dump_request(params) @client.request( method: :get, path: ["v1/providers/ms-teams/%1$s/channels", channel_id], query: parsed, model: Knockapi::Models::Providers::MsTeamListChannelsResponse, options: ) end |
#list_teams(channel_id, ms_teams_tenant_object:, query_options: nil, request_options: {}) ⇒ Knockapi::Internal::MsTeamsPagination<Knockapi::Models::Providers::MsTeamListTeamsResponse>
Get a list of teams belonging to the Microsoft Entra tenant. By default, archived and private channels are excluded from the results.
77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/knockapi/resources/providers/ms_teams.rb', line 77 def list_teams(channel_id, params) parsed, = Knockapi::Providers::MsTeamListTeamsParams.dump_request(params) @client.request( method: :get, path: ["v1/providers/ms-teams/%1$s/teams", channel_id], query: parsed, page: Knockapi::Internal::MsTeamsPagination, model: Knockapi::Models::Providers::MsTeamListTeamsResponse, options: ) end |
#revoke_access(channel_id, ms_teams_tenant_object:, request_options: {}) ⇒ Knockapi::Models::Providers::MsTeamRevokeAccessResponse
Remove a Microsoft Entra tenant ID from a Microsoft Teams tenant object.
102 103 104 105 106 107 108 109 110 111 |
# File 'lib/knockapi/resources/providers/ms_teams.rb', line 102 def revoke_access(channel_id, params) parsed, = Knockapi::Providers::MsTeamRevokeAccessParams.dump_request(params) @client.request( method: :put, path: ["v1/providers/ms-teams/%1$s/revoke_access", channel_id], query: parsed, model: Knockapi::Models::Providers::MsTeamRevokeAccessResponse, options: ) end |