lib/lita/adapters/ringcentral/connector.rb in lita-ringcentral-0.0.3 vs lib/lita/adapters/ringcentral/connector.rb in lita-ringcentral-0.1.0

- old
+ new

@@ -5,13 +5,18 @@ module Adapters class RingCentral < Adapter class Connector attr_reader :robot, :client - def initialize(robot, app_key, app_secret, server, username, extension, password, token, sms_number, debug: false) + def initialize(robot, app_key, app_secret, server, username, extension, password, token, sms_number) @robot = robot - @client = RingCentralSdk.new app_key, app_secret, server + @client = RingCentralSdk::REST::Client.new do |config| + config.server_url = server + config.app_key = app_key + config.app_secret = app_secret + config.logger = Lita.logger + end @username = username @extension = extension @password = password @token = token @sms_number = sms_number @@ -48,10 +53,9 @@ to: to_number, text: s ) end end - end end end end \ No newline at end of file