Modify

Opened 17 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)

20140418_xmlrpc-handler.patch (4.5 KB) - added by Steffen Hoffmann 10 years ago.
preliminary changes for adding a tags XMLRPC handler

Download all attachments as: .zip

Change History (13)

comment:1 Changed 16 years ago by Mike Buzzetti

hey, check this out TracTagsXmlrpcPlugin.

comment:2 Changed 16 years ago by Alec Thomas

Status: newassigned

jimbydamonk: Nice! It'd be good to have the support in the core code, I'll look into adding it.

comment:3 Changed 12 years ago by Ryan J Ollos

Cc: pkline Steffen Hoffmann added; anonymous removed

comment:4 Changed 12 years ago by Ryan J Ollos

Cc: pkline removed

#2822 closed as a duplicate.

comment:5 Changed 12 years ago by Ryan J Ollos

Trac Release: 0.100.11

comment:6 Changed 10 years ago by Steffen Hoffmann

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 10 years ago by Steffen Hoffmann

preliminary changes for adding a tags XMLRPC handler

comment:7 Changed 10 years ago by Steffen Hoffmann

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 10 years ago by Steffen Hoffmann

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 10 years ago by Steffen Hoffmann

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:10 Changed 10 years ago by Steffen Hoffmann

In 13858:

TagsPlugin: Add component for RPC access to tag system methods, refs #1304.

comment:11 in reply to:  6 Changed 10 years ago by Steffen Hoffmann

Replying to hasienda:

I'll finally depreciate TracTagsXmlrpcPlugin after adding the XMLRPC functionality requested here.

Done.

comment:12 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: assignedclosed

In 14945:

0.8: Tag 0.8 release

Fixes #1304, #1344, #3660, #3891, #9064, #9797, #11661, #11690, #11695, #11888, #11950, #11954, #11968, #12202, #12292, #12434, #12486.

Refs #12415.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.