xmlrpc_controller 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xmlrpc_controller.rb +5 -2
- data/lib/xmlrpc_controller/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c7a8179ce9623abc5aa7f2a3bbd596f5ff29cd8
|
4
|
+
data.tar.gz: 72939737fa9932c8a3756893bab76f21033d7657
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e494358ae3b0cf0e423a6bd7a6849a774e52dafd11c89c38830405e942ed767639800d81346af90fca071e837f9eab21041d54c02d44979ca6141aec3f88813
|
7
|
+
data.tar.gz: 423b276b4cdf90a49391411fea10cf7a7e2074c42c37da69fa4c52ae95b13aa0bfb61e047103fb439435dd5c5f955aae8fccb940cca39fbc952dee1dde36034e
|
data/lib/xmlrpc_controller.rb
CHANGED
@@ -45,11 +45,14 @@ module XmlrpcController
|
|
45
45
|
rpc_response("xml.value { xml.array { xml.data }}")
|
46
46
|
end
|
47
47
|
|
48
|
+
# TODO better error handling of empty title/categories
|
48
49
|
def metaWeblog_newPost(args)
|
49
50
|
new_post_params = Hash.from_xml(args.children[3].to_s)['param']['value']['struct']['member']
|
50
|
-
title = new_post_params[0]['value']['string']
|
51
|
+
# title = new_post_params[0]['value']['string']
|
52
|
+
title =''
|
51
53
|
body = new_post_params[1]['value']['string']
|
52
|
-
categories =
|
54
|
+
categories = []
|
55
|
+
# categories = (new_post_params[2]['value']['array']['data']['value'].class == Array ? new_post_params[2]['value']['array']['data']['value'].map { |e| e['string'] } : [new_post_params[2]['value']['array']['data']['value']['string']] )
|
53
56
|
tags = (new_post_params[3]['value']['array']['data']['value'].class == Array ? new_post_params[3]['value']['array']['data']['value'].map { |e| e['string'] } : [new_post_params[3]['value']['array']['data']['value']['string']] )
|
54
57
|
ifttt_new_post(title, body, categories, tags)
|
55
58
|
rpc_response("xml.value 'nothing'")
|