diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-03-19 01:27:32 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2011-03-19 01:27:32 +0100 |
commit | f3dd861efbc4de8c32f2e97331e0a64ecf91f99a (patch) | |
tree | 7c3e8c8f6afffedb113a28b4a73176157608d50c /config | |
parent | c818bcf94687e005fe7dfc6e4f5efe3760046aae (diff) | |
download | ecs2-f3dd861efbc4de8c32f2e97331e0a64ecf91f99a.tar.gz ecs2-f3dd861efbc4de8c32f2e97331e0a64ecf91f99a.zip |
New collection subresource "details" added.
Now it's possible to ask for detailed (meta) information of a list resource.
All querystrings supported my normal list resources could be used.
Only the original sender can do that:
curl .... -X GET https://server/<namespace>/<name>/details
You will get back a list of member subresource "details" representations:
[
{
"receivers": [
{
"itsyou": true,
"mid": 1,
"cid": 2
},
{
"itsyou": false,
"mid": 2,
"cid": 2
}
],
"senders": [
{
"mid": 1
},
{
"mid": 1
}
],
"url": "courselinks/10",
"content_type": "application/json"
},
...
]
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb index 770ac67..d8edc3c 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -38,7 +38,7 @@ ActionController::Routing::Routes.draw do |map| map.resources r.ressource.to_sym, :path_prefix => '/'+r.namespace, :name_prefix => r.namespace+'_', :controller => 'messages', :only => [:index, :show, :create, :update, :destroy], - :collection => { :fifo => [:get, :post], :lifo => [:get, :post] }, + :collection => { :fifo => [:get, :post], :lifo => [:get, :post], :details => :get }, :member => { :receivers => :get, :details => :get } end rescue ActiveRecord::StatementInvalid |