API Content Resource
Content resources hold the information that is displayed in Stikis. Currently, this may consist of text with HTML markup. The following table summarizes the attributes and constraints on Content resources.
| Attribute | Description | Constraints | Default | Read-only | Required on create |
|---|---|---|---|---|---|
| id | A unique numeric identifier for the content. | Positive integer. | nil | yes | no |
| stiki_id | The stiki that the content belongs to (and by extension the page and user). | Positive integer. Must refer to an existing stiki. | nil | no | yes (determined from nested url) |
| html | Html code that is displayed in the content. | Text | "" | no | no |
Available actions
The following pages provide details on the actions that are available for the content resource.
- Create: Create a new content on the site.
- Destroy: Delete a content from the site.
- Edit: Get a form for updating a content.
- New: Get a form for creating a new content.
- Show: Retrieve a copy of a content.
- Update: Update the attributes of a content.
Likely changes
The reason for separating the Content resource out from the Stiki resource that contains it is so that it might be possible for stikis to contain different kinds of content than just HTML text. In the past, I’ve experimented with making different kinds of content, for example a citation content, which could fetch article information from a user’s citeulike database, or a photo content. I still think there’s potential in these ideas, but I’m going to concentrate my development efforts on the core functionality of the site for the present time. That is, editing and arranging short snippets of text.