launchpad-users team mailing list archive
Mailing list archive
Re: Getting the most recent bugs in a project/team
2009/3/11 Mike Rooney <mrooney@xxxxxxxxx>:
> I am the author of the bug announcing bot EeeBotu which announces bugs
> in #ubuntu-bugs-announce. I was hoping to figure out if it was
> possible to use the API to get say the 5 most recently filed bugs for
> a project/team, and then obtain all the relevant information about
> Currently I am using http://feeds.launchpad.net/$NAME/latest-bugs.atom
> to get the most recent reports, from which I can get most of the
> relevant information. However I am still using screen scraping to get
> the Component such as universe or main.
> Now with the API I'd like to take a fresh look at this problem, and
> see if there is a more robust and less "parsy" way to accomplish such
> a goal.
Yes there is!
>>> latest_tasks = launchpad.distributions['ubuntu'].searchTasks(order_by='-datecreated')[:5]
>>> for task in latest_tasks:
... print task.bug.id, task.bug.title, task.status,