API Reference Template

From AlfrescoWiki

Jump to: navigation, search

[[Category: <product version>]] This is a template for documenting JavaScript/Template APIs. Use this template as a guide: you can modify titles and include new sections. To provided context for each section, ensure that you follow each title heading with an introductory sentence. For example, start by saying "This section describes...".

When using this template:

  • delete the text in green
  • replace the text in <angle brackets> with your own words
  • add a category for the product version to which this API relates


Note For Java APIs, generate the reference documentation using javadoc.
For RESTful APIs, generate the reference documentation from the Alfresco Server URL GET http://<host>:<port>/alfresco/service/index/all.mediawiki.

Contents


[edit] API introduction

The <API_NAME_HERE> API allows developers to...

Provide a high-level description of the interface.

Examples of what to include: state the programming language; indicate where within the product that the API is available (within the repository or within the web framework; describes the clients of the interface and how the interface is used.

[edit] Business examples

Using the API, developers can:

  • <business example>
  • <business example>

[edit] References

Provide other references (external and internal)...

[edit] Object type

Where there are groups of methods, create a different section for each grouping. For example, in the JavaScript API there are collections of methods associated with types of object, like the methods on ScriptNode, the methods on Search, and so on.

The following list shows the properties for site:

<property>
Description
<property>
Description

The following sections describe the available methods.

[edit] <Method 1>

This method creates a new site.

<methodname>
Parameters:
<parameter 1> Description
<parameter 2> Description
<parameter 3> Description
Return values:
value Description

Add examples of code use.

Add list of related methods.