myexperiment-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[myexperiment-hackers] [2179] trunk: added content-types to REST API


From: noreply
Subject: [myexperiment-hackers] [2179] trunk: added content-types to REST API
Date: Mon, 27 Apr 2009 11:44:46 -0400 (EDT)

Revision
2179
Author
dgc
Date
2009-04-27 11:44:46 -0400 (Mon, 27 Apr 2009)

Log Message

added content-types to REST API

Modified Paths

Diff

Modified: trunk/config/tables.xml


(Binary files differ)

Modified: trunk/lib/rest.rb (2178 => 2179)


--- trunk/lib/rest.rb	2009-04-27 15:15:22 UTC (rev 2178)
+++ trunk/lib/rest.rb	2009-04-27 15:44:46 UTC (rev 2179)
@@ -508,6 +508,7 @@
     when 'Job';                    return experiment_job_url(ob.experiment, ob)
     when 'PackContributableEntry'; return rest_resource_uri(ob.contributable)
     when 'PackRemoteEntry';        return ob.uri
+    when 'ContentType';            return nil
 
     when 'Creditation';     return nil
     when 'Attribution';     return nil
@@ -547,6 +548,7 @@
     when 'PackContributableEntry'; return "#{base}/internal-pack-item.xml?id=#{ob.id}"
     when 'PackRemoteEntry';        return "#{base}/external-pack-item.xml?id=#{ob.id}"
     when 'Tagging';                return "#{base}/tagging.xml?id=#{ob.id}"
+    when 'ContentType';            return "#{base}/content-type.xml?id=#{ob.id}"
 
     when 'Creditation';     return "#{base}/credit.xml?id=#{ob.id}"
     when 'Attribution';     return nil
@@ -578,6 +580,7 @@
     when 'Workflow::Version';      return 'workflow'
     when 'Comment';                return 'comment'
     when 'Bookmark';               return 'favourite'
+    when 'ContentType';            return 'content-type'
   end
 
   return 'object'
@@ -602,6 +605,7 @@
     when 'PackContributableEntry'; return rest_object_label_text(ob.contributable)
     when 'PackRemoteEntry';        return ob.title     
     when 'Workflow::Version';      return ob.title
+    when 'ContentType';            return ob.title
   end
 
   return ''

reply via email to

[Prev in Thread] Current Thread [Next in Thread]