Class: Teams::Api::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/teams/api/client.rb

Constant Summary collapse

DEFAULT_OAUTH_URL =
"https://token.botframework.com"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_url:, http:, logger: nil, oauth_url: DEFAULT_OAUTH_URL) ⇒ Client

Sub-clients are constructed eagerly like the other SDKs' ApiClient constructors, which also keeps the shared client thread-safe. oauth_url is the Bot Framework token service (cloud-dependent), used by the user token and bot sign-in clients.



16
17
18
19
20
21
22
23
24
25
# File 'lib/teams/api/client.rb', line 16

def initialize(service_url:, http:, logger: nil, oauth_url: DEFAULT_OAUTH_URL)
  @service_url = service_url.sub(%r{/+\z}, "")
  @http = http
  @logger = logger
  @conversations = ConversationClient.new(service_url: @service_url, http:, logger:)
  @teams = TeamClient.new(service_url: @service_url, http:, logger:)
  @meetings = MeetingClient.new(service_url: @service_url, http:, logger:)
  @users = UserClient.new(oauth_url:, http:, logger:)
  @bots = BotClient.new(oauth_url:, http:, logger:)
end

Instance Attribute Details

#botsObject (readonly)

Returns the value of attribute bots.



10
11
12
# File 'lib/teams/api/client.rb', line 10

def bots
  @bots
end

#conversationsObject (readonly)

Returns the value of attribute conversations.



10
11
12
# File 'lib/teams/api/client.rb', line 10

def conversations
  @conversations
end

#httpObject (readonly)

Returns the value of attribute http.



6
7
8
# File 'lib/teams/api/client.rb', line 6

def http
  @http
end

#meetingsObject (readonly)

Returns the value of attribute meetings.



10
11
12
# File 'lib/teams/api/client.rb', line 10

def meetings
  @meetings
end

#service_urlObject (readonly)

Returns the value of attribute service_url.



6
7
8
# File 'lib/teams/api/client.rb', line 6

def service_url
  @service_url
end

#teamsObject (readonly)

Returns the value of attribute teams.



10
11
12
# File 'lib/teams/api/client.rb', line 10

def teams
  @teams
end

#usersObject (readonly)

Returns the value of attribute users.



10
11
12
# File 'lib/teams/api/client.rb', line 10

def users
  @users
end