Publish URI templates for resource types

Bug #274553 reported by Markus Korn
2
Affects Status Importance Assigned to Milestone
lazr.restful
Triaged
Medium
Unassigned

Bug Description

When using launchpadlib I often need a link to a resource without needing the content of the resource itself, it would be nice if launchpadlib could provide functions to create this links.

Example:
I would like to search for bug reported by "thekorn" in ubuntu. The obvious way is:
>>> thekorn = launchpad.people["thekorn"]
>>> ubuntu.searchBugs(bug_reporter=thekorn)

another possible way is:
>>> thekorn = "%s~%s" %(launchpad._root_uri, "thekorn")
>>> ubuntu.searchBugs(bug_reporter=thekorn)

The last method is many times faster.

Markus

Revision history for this message
Leonard Richardson (leonardr) wrote :

We could implement your use case by publishing URI templates for resource types in the WADL. This would also let us get rid of the annoying need to change the XSLT stylesheet every time we add a new resource type. We have discussed this a couple times but haven't implemented it because it would be too much work.

summary: - Please provide functions to create links to resources
+ Publish URI templates for resource types
Changed in launchpadlib:
importance: Undecided → Medium
status: New → Triaged
affects: launchpadlib → lazr.restful
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.