php 7.0.13
nginx 1.11.3
TXP 4.6.2
first off, i should probably file another issue for this, but is there any chance at all for using something a little more... 2017-y? like REST with JSON, even? XML-RPC's all but dead out there.
but moving on,
#!/usr/bin/env python3
import xmlrpc.client
rpc = xmlrpc.client.ServerProxy('https://[SCRUBBED_HTTP_BASIC_AUTH_USER]:[SCRUBBED_HTTP_BASIC_AUTH_PASSWORD]@[SCRUBBED_DOMAIN_SERVING_TXP]/rpc/')
print(rpc.mt.getRecentPostTitles())
SUPER simple call, right?
except I get:
Traceback (most recent call last):
File "./test.py", line 7, in <module>
print(rpc.mt.getRecentPostTitles())
File "/usr/lib/python3.6/xmlrpc/client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1452, in __request
verbose=self.__verbose
File "/usr/lib/python3.6/xmlrpc/client.py", line 1154, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1170, in single_request
return self.parse_response(resp)
File "/usr/lib/python3.6/xmlrpc/client.py", line 1342, in parse_response
return u.close()
File "/usr/lib/python3.6/xmlrpc/client.py", line 656, in close
raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault -32602: 'server error. wrong number of method parameters'>
i seem to get this with everything i try- nothing seems to work.
...oh, except system calls.
...
methods = ['blogger.getRecentPosts',
'blogger.deletePost',
'blogger.getPost',
'blogger.setTemplate',
'blogger.getTemplate',
'blogger.getUserInfo',
'blogger.getUsersBlogs',
'blogger.editPost',
'blogger.newPost']
with xmlrpc.client.ServerProxy('https://{0}:{1}@{2}'.format(b_a_user, b_a_pass, rpc_srv)) as rpc:
for m in methods:
print(m)
print(rpc.system.methodHelp(m))
yields (note that b_a_user, b_a_pass, and rpc_srv are the same values as above):
blogger.getRecentPosts
retrieves a list of posts (default 10)
blogger.deletePost
deletes a given post
blogger.getPost
retrieves contents for the given postid
blogger.setTemplate
updates section template - main=default template, archiveIndex=section template
blogger.getTemplate
return section template - main will return default template, archiveIndex will return section template
blogger.getUserInfo
return information about the current user
blogger.getUsersBlogs
return information about all the blogs a given user is member of
blogger.editPost
changes the contents of a given post
blogger.newPost
makes a new post to a designated blog
so i know it's not on my setup- i can interact with the API itself just fine; all the system API calls work just as expected.
php 7.0.13
nginx 1.11.3
TXP 4.6.2
first off, i should probably file another issue for this, but is there any chance at all for using something a little more... 2017-y? like REST with JSON, even? XML-RPC's all but dead out there.
but moving on,
SUPER simple call, right?
except I get:
i seem to get this with everything i try- nothing seems to work.
...oh, except system calls.
yields (note that b_a_user, b_a_pass, and rpc_srv are the same values as above):
so i know it's not on my setup- i can interact with the API itself just fine; all the system API calls work just as expected.