diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2010-01-22 00:27:00 -0800 | 
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2010-01-22 00:27:00 -0800 | 
| commit | bcf1caad1459a458a7923335a4a6bc521816de40 (patch) | |
| tree | fc3815c13e079d0b1b25f3929dcb73f2de7ca927 /system/libraries/drivers/Config | |
| parent | 3665391f8bbf40aa27acc816dc546237461e1cba (diff) | |
Reshape the rest code to be more consistent with regards to
relationships.  Now when you view a resource, it has 4 top level
elements:
url: the url of this resource
resource: array of key value pairs describing the resource
members: array of urls to members of this collection
relationships: array of array of members.
Relationships are a special type of collection that links two
different resources together.  To remove a relationship, just
DELETE its url.  To create a relationship, POST to its
collection.
Individual modules can add their own relationships to any
resource via a callback mechanism.
Example:
  Array(
    [url] => http://g3.com/rest/item/1
    [resource] => Array (
      [id] => 1
      [album_cover_item_id] => 4
      [captured] =>
      [created] => 1264056417
      [description] =>
      [height] =>
      ...
    )
    [members] => Array(
      [0] => http://g3.com/rest/item/2
      [1] => http://g3.com/rest/item/3
      [2] => http://g3.com/rest/item/4
      [3] => http://g3.com/rest/item/5
      ...
    )
    [relationships] => Array(
      [tags] => Array (
      [0] => http://g3.com/rest/tag_item/2,1
      [1] => http://g3.com/rest/tag_item/23,1
      )
    )
  )
Diffstat (limited to 'system/libraries/drivers/Config')
0 files changed, 0 insertions, 0 deletions
