hutzbot 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hutzbot/hutzbot.rb +3 -2
- data/lib/hutzbot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7e32ac3cb651a6954d11601c55dfc45534c353d515965b5439b91adb06307dc
|
4
|
+
data.tar.gz: 285769f8a0f1d7839a352bfa5b2081b370ee4f69c3c1754740f7342b95eb61a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81294683367c96e4a71a9c41c633aac30869f15f855e13a181a564f2eaefefc298ee90bc48e31958eb45b0af045ff8f22f100ec56c8e5b96adfafe47037f8f6f
|
7
|
+
data.tar.gz: 86580da0ed02d5191ca4504760361dbd80b644285d6a28f2a3678a0cf43279ecf49c243a619c472471972dcf43a70200d12b2b2389624428f8167c5c8c6b54eb
|
data/lib/hutzbot/hutzbot.rb
CHANGED
@@ -70,11 +70,12 @@ module Hutzbot
|
|
70
70
|
|
71
71
|
|
72
72
|
class Hutzbot
|
73
|
-
def initialize logger, host, user, key
|
73
|
+
def initialize logger, host, user, key, application
|
74
74
|
@logger = logger
|
75
75
|
@host = host
|
76
76
|
@user = user
|
77
77
|
@key = key
|
78
|
+
@application = application
|
78
79
|
@options = { headers: { 'X-User-Email' => @user, 'X-User-Token' => @key, 'Accept' => 'application/json' } }
|
79
80
|
end
|
80
81
|
|
@@ -127,7 +128,7 @@ module Hutzbot
|
|
127
128
|
end
|
128
129
|
|
129
130
|
def create_conversation params
|
130
|
-
response = HTTParty.post("#{@host}/conversations", @options.merge({ query: { conversation: params.merge({ application:
|
131
|
+
response = HTTParty.post("#{@host}/conversations", @options.merge({ query: { conversation: params.merge({ application: @application }) } }))
|
131
132
|
check_errors response
|
132
133
|
Conversation.new(JSON.parse(response.body))
|
133
134
|
end
|
data/lib/hutzbot/version.rb
CHANGED