I started to document the API at http://drupal.org/node/369399.

However, I think it is easier to keep the documentation up to date if it is documented directly in the module. So I started a privatemsg.api.php file, which documents all hooks, this is how Drupal 7 and more and more modules handle it now.

The documention is not finished, but it is a start and can still be improvided. I also added some @todo's.

If other patches will then change or extend the API, they can directly change the documentation too.

The current patch is only about privatemsg.module and does not change any code, it just adds documentation.

You can see how it looks at: http://blog.worldempire.ch/api. When the patch is commited, we can either point to that page or add it to some of the contrib documentation pages out there.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

FileSize
25.51 KB

Re-roll of the patch, http://blog.worldempire.ch/api is up to date again.

Berdir’s picture

FileSize
25.59 KB

Another re-roll, forgot the include some changes I had on my laptop.

This patch currently contains the following three things:

- privatemsg.api.module: hook documentation and the topics with examples and so on you can see at my blog
- apidoc updates and fixes for privatemsg.module
- Some inline doc coding style fixes, pointed out by the Coder Tough Love module by Morbus.

While this is not perfect, it still makes sense to commit now, I think. There are no functional changes and we can then improve it with follow-up patches. (A rule could be to improve the apidoc/inline docs in a patch for each changed function).

litwol’s picture

Status: Needs review » Fixed

In it went, great work :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.