watson-assistant-chatbot 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 73c249936eb92afbf17633947de7d22e8443e6b9c16983eb8c2deee084946f67
4
- data.tar.gz: e9c1f0cba7ede2a81b052cb9aa102aae9f901f5b5a153bb81fbe8332881fbed9
3
+ metadata.gz: 8afcfdafc856d47abfde428b1bb4f68d7cd0dfe6673aa495534eb864fe6fb3f9
4
+ data.tar.gz: 48aeaf00f97360d57da14ab0ae85bda5ec276400b5fb73625fe43d52b73ca748
5
5
  SHA512:
6
- metadata.gz: be358115b1d597d7a7e182a27748257e913a2d0825b7bddd6eb06267bb4fecf33bafa8b0791044bc4ebb7bd5e0f7b609b4efec043d1a1e7c8c175fa7dfe2d148
7
- data.tar.gz: 5dc2fab5cd8a9e2051fa370f17b0d7b5d39add98406024f59ff0faed0ac164262d1119adbb208581921558e3f4d316ffb3037ae1d125f4b87a7672df2cc2cc43
6
+ metadata.gz: f56aed58a9146c677aa9bb175df9a42e7c8dad08c0e48b79d396cb06ede075ee482a9eb5b6608b594ed0dca909e7ff971a955a4df94ecd533a81e7c76162312e
7
+ data.tar.gz: ead9f11d628208cbad9efd4b18e50e1cbbb9eef69f0a3a3fcdf2945071480c55dd95d7104509254ea9a8642773ec985f17cd79c3627c8cba063f05c43bf831b6
@@ -11,19 +11,25 @@ module WatsonAssistant
11
11
  INTENT_UNDETECTED = '-- undetected --'
12
12
 
13
13
  class Chatbot
14
- attr_accessor :user_id, :password, :workspace_id
14
+ attr_accessor :user_id, :password, :api_key, :workspace_id
15
15
 
16
16
  @api_domain = 'gateway.watsonplatform.net'
17
- @api_version = '2018-02-16'
17
+ @api_version = '2019-02-28'
18
18
 
19
19
  class << self
20
20
  attr_accessor :api_domain, :api_version
21
21
  end
22
22
 
23
- def initialize(user_id, password, workspace_id)
23
+ def initialize(user_id, password, workspace_id, api_key = nil)
24
24
  @user_id = user_id
25
25
  @password = password
26
26
  @workspace_id = workspace_id
27
+ @api_key = api_key
28
+
29
+ if api_key then
30
+ @user_id = 'apikey'
31
+ @password = api_key
32
+ end
27
33
  end
28
34
 
29
35
  def message(request)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watson-assistant-chatbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julian I. Kamil
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2019-12-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby chatbot that uses Watson Assistant
14
14
  email: julian.kamil@gmail.com