lita-onewheel-wolfram-alpha 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 568fdb625d8249fa73b2a9c24c38a680b45223af
|
4
|
+
data.tar.gz: 5cade098191fea9db8621cbaaf0a70be1868aa24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cafda9a1aad6b8d22d23729897ccf078f1e2b030849e03dc5d296dac577a2eeb8f9e9ae0b165437715696295d2e4df029220b4d0289a709d33e3804536fdde35
|
7
|
+
data.tar.gz: 01b0f7d4985d522c5625a28bdad365536abfc302145639dd00a6d0035a0fc2ceccadb13313dd919f2080f70b5e00ef6f312dde5a344e65eb50de43be747dd5d1
|
@@ -22,8 +22,10 @@ module Lita
|
|
22
22
|
|
23
23
|
def parse_response(noko_doc, query)
|
24
24
|
success_node = noko_doc.xpath('queryresult').attribute('success')
|
25
|
+
Lita.logger.debug "Success attr: #{success_node.to_s}"
|
25
26
|
if success_node.to_s == 'true'
|
26
27
|
pods = noko_doc.xpath('//pod')
|
28
|
+
Lita.logger.debug "Pod title: #{pods[1].attribute('title').to_s}"
|
27
29
|
if pods[1].attribute('title').to_s == 'Plot'
|
28
30
|
pods[1].xpath('//img')[1].attribute('src').to_s
|
29
31
|
else
|
@@ -36,6 +38,7 @@ module Lita
|
|
36
38
|
end
|
37
39
|
|
38
40
|
def make_api_call(query)
|
41
|
+
Lita.logger.debug "Making api call for #{query}"
|
39
42
|
uri = build_uri query
|
40
43
|
response = RestClient.get(uri)
|
41
44
|
Nokogiri::XML response.to_s
|