New ‘web_link’ property on API objects
Launchpad has a REST API that exposes almost every object within Launchpad. Most of them have API URLs that closely match the human-readable URL: for instance, https://bugs.launchpad.net/bugs/316694 can also be obtained in machine-oriented JSON or XML form from http://api.launchpad.net/1.0/bugs/316694. (The “1.0” in that URL means this is in the 1.0 API namespace.)
Previously, many Launchpadlib clients used string transformation to get from the API URL to something they could show a human in a web browser.
We’ve just added a web_link
property on all Launchpad objects, so client applications can (and should) now just use that instead. Because this is just sent in the object representation you don’t need to upgrade launchpadlib to see it.
Tags: API, launchpadlib
February 7th, 2011 at 4:10 pm
We only support JSON (it’s not possible to retrieve XML representation of objects.)
February 7th, 2011 at 10:21 pm
@Francis, actually it is, with eg
curl -v -H 'Accept: application/xhtml+xml' 'https://api.qastaging.launchpad.net/1.0/bzr'
February 8th, 2011 at 8:03 pm
@Martin That’s different than a full XML representation. It’s a XHTML rendition of the object which is mainly used to update the UI via the javascript.