plugin XEP-0060: renamed psGet bridge method to psItemGet
This commit is contained in:
parent
444926825c
commit
ba8534ee4f
2 changed files with 7 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ __commands__ = ["Pubsub"]
|
|||
class Get(base.CommandBase):
|
||||
|
||||
def __init__(self, host):
|
||||
base.CommandBase.__init__(self, host, 'get', use_verbose=True, use_output=C.OUTPUT_LIST_XML, help=_(u'get pubsub item(s)'))
|
||||
base.CommandBase.__init__(self, host, 'get', use_output=C.OUTPUT_LIST_XML, help=_(u'get pubsub item(s)'))
|
||||
self.need_loop=True
|
||||
|
||||
def add_parser_options(self):
|
||||
|
|
@ -44,17 +44,17 @@ class Get(base.CommandBase):
|
|||
# TODO: add MAM filters
|
||||
|
||||
|
||||
def psGetCb(self, ps_result):
|
||||
def psItemGetCb(self, ps_result):
|
||||
self.output(ps_result[0])
|
||||
self.host.quit(C.EXIT_OK)
|
||||
|
||||
def psGetEb(self, failure_):
|
||||
def psItemGetEb(self, failure_):
|
||||
self.disp(u"can't get pubsub items: {reason}".format(
|
||||
reason=failure_), error=True)
|
||||
self.host.quit(C.EXIT_BRIDGE_ERRBACK)
|
||||
|
||||
def start(self):
|
||||
self.host.bridge.psGet(
|
||||
self.host.bridge.psItemGet(
|
||||
self.args.service,
|
||||
self.args.node,
|
||||
self.args.max,
|
||||
|
|
@ -62,8 +62,8 @@ class Get(base.CommandBase):
|
|||
self.args.sub_id,
|
||||
{},
|
||||
self.profile,
|
||||
callback=self.psGetCb,
|
||||
errback=self.psGetEb)
|
||||
callback=self.psItemGetCb,
|
||||
errback=self.psItemGetEb)
|
||||
|
||||
|
||||
class Pubsub(base.CommandBase):
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ class XEP_0060(object):
|
|||
self._mam = host.plugins.get('XEP-0313')
|
||||
self._node_cb = {} # dictionnary of callbacks for node (key: node, value: list of callbacks)
|
||||
self.rt_sessions = sat_defer.RTDeferredSessions()
|
||||
host.bridge.addMethod("psGet", ".plugin", in_sign='ssiassa{ss}s', out_sign='(asa{ss})', method=self._getItems, async=True)
|
||||
host.bridge.addMethod("psDeleteNode", ".plugin", in_sign='sss', out_sign='', method=self._deleteNode, async=True)
|
||||
host.bridge.addMethod("psItemGet", ".plugin", in_sign='ssiassa{ss}s', out_sign='(asa{ss})', method=self._getItems, async=True)
|
||||
host.bridge.addMethod("psRetractItem", ".plugin", in_sign='sssbs', out_sign='', method=self._retractItem, async=True)
|
||||
host.bridge.addMethod("psRetractItems", ".plugin", in_sign='ssasbs', out_sign='', method=self._retractItems, async=True)
|
||||
host.bridge.addMethod("psSubscribeToMany", ".plugin", in_sign='a(ss)sa{ss}s', out_sign='s', method=self._subscribeToMany)
|
||||
|
|
|
|||
Loading…
Reference in a new issue