This project is not covered by Drupal’s security advisory policy.

Developed on drupal.org now

If you wonder how this relates to project_api, we work together. I guess project_api will be merged into those project, just read it up here

Purpose

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.

Features
  • 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.
Usecase

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

You want to select partial data and store them in CCK using autocompletion? Use update_feed_cck, which als is used by drush_make_ui

drupalmodules.com

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.

Auto Update

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
  1. Just activate the module and the deps.
    1. If you use the update_feed_cck widget, install the patched autcomplete_element module from : http://github.com/EugenMayer/autocomplete_element
  2. Clear the cache once now so the autoload module is working properly
  3. Then go to the the update feed api configuration admin/settings/update_feed_api_settings and configure your feeds.
    1. Look for the example, that should work if you use it for testing.
    2. You can set the stepping, you can calculate 10 seconds for a ten step setup even. Pretty slow due to the XML parsing
    3. Configure the API Versions you want to fetch
  4. Now you can start fetching the projects going to admin/build/refresh_update_feeds
    1. Select the feeds you actually want to update
    2. 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.

API

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.

update_feed_api_get_project_apis($server_key, $short_name)

Get all available api version for this project.

update_feed_api_fetch_releases($project)

Running this for a project, the update-feed for this project is read and all releases are extracted.

Architecture

project.class.inc

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

release.class.inc

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.

update_feed.class.inc

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

project_list.class.inc

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

factories.class.inc

Just some factories to load Projects / Releases

feedentrycontainer.class.inc

Thats actually the basic abstract class of a Project / Release handling all the shared tasks like saving / loading and the data storage (getter, setter).

Project information

Releases