Class: Infrawrench::TeamNamespace
- Inherits:
-
Object
- Object
- Infrawrench::TeamNamespace
- Defined in:
- lib/infrawrench/client.rb,
sig/infrawrench/sdk.rbs
Overview
client.team
Instance Attribute Summary collapse
-
#invitations ⇒ TeamInvitationsNamespace
readonly
client.team.invitations. -
#members ⇒ TeamMembersNamespace
readonly
client.team.members. -
#roles ⇒ TeamRolesNamespace
readonly
client.team.roles.
Instance Method Summary collapse
-
#initialize(transport) ⇒ TeamNamespace
constructor
private
A new instance of TeamNamespace.
-
#me(org_id: nil, request_options: nil) ⇒ Hash
Current user's effective permissions and role.
-
#permissions(org_id: nil, request_options: nil) ⇒ Hash
List all permission strings the server recognises.
Constructor Details
#initialize(transport) ⇒ TeamNamespace
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 TeamNamespace.
5521 5522 5523 5524 5525 5526 |
# File 'lib/infrawrench/client.rb', line 5521 def initialize(transport) @transport = transport @invitations = TeamInvitationsNamespace.new(@transport) @members = TeamMembersNamespace.new(@transport) @roles = TeamRolesNamespace.new(@transport) end |
Instance Attribute Details
#invitations ⇒ TeamInvitationsNamespace (readonly)
Returns client.team.invitations.
5513 5514 5515 |
# File 'lib/infrawrench/client.rb', line 5513 def invitations @invitations end |
#members ⇒ TeamMembersNamespace (readonly)
Returns client.team.members.
5515 5516 5517 |
# File 'lib/infrawrench/client.rb', line 5515 def members @members end |
#roles ⇒ TeamRolesNamespace (readonly)
Returns client.team.roles.
5517 5518 5519 |
# File 'lib/infrawrench/client.rb', line 5517 def roles @roles end |
Instance Method Details
#me(org_id: nil, request_options: nil) ⇒ Hash
Current user's effective permissions and role
GET /api/org/orgId/team/me
5537 5538 5539 5540 5541 5542 5543 5544 |
# File 'lib/infrawrench/client.rb', line 5537 def me(org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/team/me", path_params: { "orgId" => org_id }, request_options: ) end |
#permissions(org_id: nil, request_options: nil) ⇒ Hash
List all permission strings the server recognises
Requires permission: team:read.
GET /api/org/orgId/team/permissions
5557 5558 5559 5560 5561 5562 5563 5564 |
# File 'lib/infrawrench/client.rb', line 5557 def (org_id: nil, request_options: nil) @transport.request( http_method: "GET", path: "/api/org/{orgId}/team/permissions", path_params: { "orgId" => org_id }, request_options: ) end |