Re: REST-API: Link/Multilink Properties

Ralf Schlatterbeck <[email protected]>
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
On Thu, Mar 21, 2019 at 11:47:50AM +0100, Ralf Schlatterbeck wrote:
> I'm in the process of drafting the documentation of the REST API.
> 
> Currently all Link and Multilink properties are displayed solely as the
> ID, e.g. for a message we get:
...

> So we get recipients (Multilink to user) or files (Multilink to file) or
> author (Link to user) as only a (list of) id.
> 
> John Rouillard has proposed (I think to me privately) to change this to,
> e.g.
> 
> "recipients": [
>     { "id": "6"
>       "link": "http://...rest/data/user/6"
>     }, ...
> ]

I've now changed this. Johns version is the default with the default
setting of the @verbose parameter 1. If @verbose is set to 0 the old
behaviour (only ID) is selected. With @verbose set to 2 we get the label
property of the item in question, e.g. for file and status the name
property. For users (e.g. in the nosy list) the username property.

Note that the @verbose parameter also controls the display of the
content property, below 2 only a link to the download of the content is
shown. We might make this 3 to distinguish display of the content
property from display of labels.

What do you think?

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   http://www.runtux.com
Reichergasse 131, A-3411 Weidling       email: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.