Class: Teams::Api::Client
- Inherits:
-
Object
- Object
- Teams::Api::Client
- Defined in:
- lib/teams/api/client.rb
Constant Summary collapse
- DEFAULT_OAUTH_URL =
"https://token.botframework.com"
Instance Attribute Summary collapse
-
#bots ⇒ Object
readonly
Returns the value of attribute bots.
-
#conversations ⇒ Object
readonly
Returns the value of attribute conversations.
-
#http ⇒ Object
readonly
Returns the value of attribute http.
-
#meetings ⇒ Object
readonly
Returns the value of attribute meetings.
-
#service_url ⇒ Object
readonly
Returns the value of attribute service_url.
-
#teams ⇒ Object
readonly
Returns the value of attribute teams.
-
#users ⇒ Object
readonly
Returns the value of attribute users.
Instance Method Summary collapse
-
#initialize(service_url:, http:, logger: nil, oauth_url: DEFAULT_OAUTH_URL) ⇒ Client
constructor
Sub-clients are constructed eagerly like the other SDKs' ApiClient constructors, which also keeps the shared client thread-safe.
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
#bots ⇒ Object (readonly)
Returns the value of attribute bots.
10 11 12 |
# File 'lib/teams/api/client.rb', line 10 def bots @bots end |
#conversations ⇒ Object (readonly)
Returns the value of attribute conversations.
10 11 12 |
# File 'lib/teams/api/client.rb', line 10 def conversations @conversations end |
#http ⇒ Object (readonly)
Returns the value of attribute http.
6 7 8 |
# File 'lib/teams/api/client.rb', line 6 def http @http end |
#meetings ⇒ Object (readonly)
Returns the value of attribute meetings.
10 11 12 |
# File 'lib/teams/api/client.rb', line 10 def meetings @meetings end |
#service_url ⇒ Object (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 |
#teams ⇒ Object (readonly)
Returns the value of attribute teams.
10 11 12 |
# File 'lib/teams/api/client.rb', line 10 def teams @teams end |
#users ⇒ Object (readonly)
Returns the value of attribute users.
10 11 12 |
# File 'lib/teams/api/client.rb', line 10 def users @users end |