That seemed like a pretty cool use of the API so I emailed him to find out more.
Matthew: What does your plugin do?
Guillermo: The user visible plugin allow the user to search the branches of a project. Basically it’s a view with a search field. This is going to become part of bzr-eclipse, as an extension, to allow searching for branches and branching into a new project directly from one of the results.
But actually it’s a set of plugins
The heart of it is the launchpadlib plugin, it abstracts common features needed by others plugins that need to interact with launchpad, at this moment it provides authentication and access to projects and bugs.
Matthew: How are you accessing the API? Directly or using the Python library?
Guillermo: The first approach was to use the API via Java (and a java implementation of wadl), but as I was reinventing the wheel, I started to look on how to use launchpadlib from java. I’m currently using launchpadlib with an alpha version of Jython-2.5 and some extra patches/libraries missing in Jython and required by launchpadlib.
Matthew: Could you have done this without the Launchpad API?
Guillermo: Doing something like this never crossed my mind before knowning of the API and launchpadlib. Such a task would require screen scraping and all sorts of hacks to get things working … until something in the UI changes, and makes it useless. Also that would increase the load on Launchpad itself and maybe affect other users.
Matthew: How did you find both learning and using the API?
Guillermo: The API is straightforward to learn, also if you can use launchpadlib it’s far easier, just start the python interactive interpreter, import launchpadlib and start prototyping your app
Matthew: What do you like best about the API?
Guillermo: From my point of view the most important aspects are:
- it’s based on standards (wadl, http)
- there is a reference implementation in python (python is awesome to learn how things works)
- it’s well documented, and if you can’t find what you want it’s easy to check if it’s possible using launchpadlib and python interactive interpreter.
Matthew: What’s the worst thing about the API?
Guillermo: I don’t think there is a “worst thing”, the API is evolving quite well.
I’m pretty sure (and know that by experience), that if there is a missing feature that it’s required by a user, the ~launchpadlib-developers team would try to fix it. Obviously, it will require the proper bug report/feature request
Matthew: What would you like to see changed or improved?
Guillermo: Back when I started to work on these plugins, there was no support for the code hosting bit, nor the possibility to search the bugs assigned on a specific project, but after reporting the issues the ~launchpadlib-developers team fixed them.
For more about Guillermo’s Launchpad plugin for Eclipse, see the bzr-eclipse project in Launchpad.