Opened 18 years ago
Closed 9 years ago
#1304 closed enhancement (fixed)
Implement tags related XMLRPC methods
Reported by: | Nicolas MONNET | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | TagsPlugin |
Severity: | normal | Keywords: | tags xml rpc xmlrpc |
Cc: | osimons | Trac Release: | 0.11 |
Description
Suggested methods:
void setTags(pagename) string getTags(pagename) void addTag(pagename,tagname) array searchTags(tagquery)
Attachments (1)
Change History (13)
comment:1 Changed 17 years ago by
comment:2 Changed 17 years ago by
Status: | new → assigned |
---|
jimbydamonk: Nice! It'd be good to have the support in the core code, I'll look into adding it.
comment:3 Changed 13 years ago by
Cc: | pkline Steffen Hoffmann added; anonymous removed |
---|
comment:5 Changed 12 years ago by
Trac Release: | 0.10 → 0.11 |
---|
comment:6 follow-up: 11 Changed 11 years ago by
Cc: | osimons added; Steffen Hoffmann removed |
---|---|
Owner: | changed from Alec Thomas to Steffen Hoffmann |
Note that TracTagsXmlrpcPlugin branch has been developed for Trac 0.10 and never changed after initial release.
While it looks like it could still work with Trac 0.11 or later, its tag system support is for tractags<=0.5. Obsolete as it is, there is not much to reuse from this plugin anymore.
I'll finally depreciate TracTagsXmlrpcPlugin after adding the XMLRPC functionality requested here.
Changed 11 years ago by
Attachment: | 20140418_xmlrpc-handler.patch added |
---|
preliminary changes for adding a tags XMLRPC handler
comment:7 Changed 11 years ago by
Because I'm new to the RPC topic I would value code review, thoughts and suggestions on my proposed changes (untested), before I apply them to trunk
.
comment:8 Changed 11 years ago by
Progressing. Seems like XMLRPC has some limitations I need deal with. According to my initial tests it cannot transfer any object. A few standard objects (like 'string', 'list', 'dict') are supported, 'tractags.api.Counter' (custom dict object) or 'set' object are not. This requires some type conversations.
Not sure, how to handle this one:
Trac[xml_rpc] ERROR: Traceback (most recent call last): File "build/bdist.linux-i686/egg/tracrpc/web_ui.py", line 158, in _rpc_process result = (XMLRPCSystem(self.env).get_method(method_name)(req, args))[0] File "build/bdist.linux-i686/egg/tracrpc/api.py", line 197, in __call__ result = self.callable(req, *args) File "build/bdist.linux-i686/egg/tractags/xmlrpc.py", line 70, in getTags return self.tag_sys.get_tags(req, Resource(realm, id)) File "build/bdist.linux-i686/egg/tractags/api.py", line 459, in get_tags .get_resource_tags(req, resource, when=when)) ServiceException: get_resource_tags() got an unexpected keyword argument 'when'
It doesn't like the extra argument that is implicitly added in the call signature of get_tags()
. But what shall I do about it? Other calls to that method inside TagsPlugin work just fine.
comment:9 Changed 11 years ago by
Found this statement: XMLRPC does not allow passing parameters by name, only positional parameters.
So this is not specific to xmlrpclib
but due to the specification, and using methods with keyword arguments is expected to fail. Consequently I need to work around and partially rewrite affected methods.
comment:11 Changed 10 years ago by
Replying to hasienda:
I'll finally depreciate TracTagsXmlrpcPlugin after adding the XMLRPC functionality requested here.
Done.
hey, check this out TracTagsXmlrpcPlugin.