Developed on drupal.org now
Think about you can fetch the projects and all the meta informations like releases (you can delay the release fetching making it lazy) and all other fields using a central API.
The special thing about this is can do this from different places (and update feed implementation), drupal.org with project, your own feature server under “yourdomain.org” and what ever you like.
All you need is a update-feed integration like the one from Project or Fserver, or your write your own fetch handler fetching those informations out of .. hmm, git, some DB, a FILE?
Looking for a concrete example?: drush_make_ui
Later on, you can seperate projects by the place they have been fetched.
As i described before, you can handle several sources. That means there is no issue having views on your own feature server and on drupal.org. Both projects are saved and can be selected by there source.
- Can handle several sources ( x-Feature Server, x-Project Servers ) at the same time (no problems with overlays)
- Using dbtng its working under D7
- Views integration (thanks Daniel!)
- You can search in the projects using an easy API
- Fetches releases (also with lazy fetching on demand)
- Can filter on APIs (8.x, 7.x etc.)
- OOP implementation. Add your own feed-fetchers, formats or whatever you like.
drush make ui
A concrete implementation / use of the update_feed_api is drush_make_ui . Build your make file with autocompletition!
update feed cck
They list and rate all modules (and releases)of drupal.org. Now they could do this using this api from different servers like the feature server of Open Atrium
Doxygen of all module
You want to generate doxygen docs for all projects and all their releases. You can use the API to fetch them and later show them on you site.
Yes this can be done using CVS also, but what about an arbitary feature server or your own server? The update_feed_api makes it possible to implement this for more generalized.
Like Drupal module for auto-updating your site. You fetch the current versions available and decide buy GUI what you want to update.
Drush module / version autocompletition
Well yeah, think about you get a autocompletiton on modules / version / api on the console. Lovely!Installation / Usage
- Just activate the module and the deps.
- If you use the update_feed_cck widget, install the patched autcomplete_element module from : http://github.com/EugenMayer/autocomplete_element
- Clear the cache once now so the autoload module is working properly
- Then go to the the update feed api configuration admin/settings/update_feed_api_settings and configure your feeds.
- Look for the example, that should work if you use it for testing.
- You can set the stepping, you can calculate 10 seconds for a ten step setup even. Pretty slow due to the XML parsing
- Configure the API Versions you want to fetch
- Now you can start fetching the projects going to admin/build/refresh_update_feeds
- Select the feeds you actually want to update
- Select wheather you want to fetch the release ( takes some time )
Have fun, takes some time :)Workflow
Update feed entries are featch (project list) and for each project, the project informations and releases are fetched. Those informations are stored in the local database for usage with anything you like.
Use it for autocompletition or what ever you like. The database will be regenerated using cron jobs and caches.
Developers API (thats what you most probably will need for the start)
All those methods are in the update_feed_api.api.inc file.
update_feed_api_search_projects($server_key, $api_version, $search)
Search and get projects of a specific api of a specifc server matching the short_name / title.
update_feed_api_get_projects($server_key, $api_version, $load_releases = TRUE)
Load all projects of a specific api of a specifc server.
update_feed_api_get_project($server_key, $short_name, $api_version, $load_releases = TRUE)
Load a specific projects of a specific api of a specific server.
update_feed_api_api_get_project_by_pid($pid, $load_releases = TRUE)
Load same as update_feed_api_get_project, but loading by pid directly.
Get all available api version for this project.
Running this for a project, the update-feed for this project is read and all releases are extracted.
This is a abstraction of a Project and the ‘main class you gonna use’. You can load/save/update a project from a Database or from a feed. You will use this container for your purpose like autocompletition.
It also has an interface to work with the project release (of the current project identified by the server_key, short_name, api version).
You can extend this class with needed methods for your applications or change some of its behavior
Container for a release with its meta data. You can load/save/update a release using this class (or the factory). Exactly the same interface as a release.
A basic implementation of a update feed fetcher for drupalas “Project” module (like its used on drupal.org) and for the feature server. You can change the way sources are fetched or from where.
Paths on the server are abstracted with tokens, so you can override and redefine you own protocols with only some few lines of code
A helper class to maintain a list of projects. You can add / remove / check for existens or start a search for projects in the database and store the result in the list. Together with the “to_array” function you can have nice transformations on those lists, which are needed pretty often
Just some factories to load Projects / Releases
Thats actually the basic abstract class of a Project / Release handling all the shared tasks like saving / loading and the data storage (getter, setter).