Developer:RatingsResource

From myExperiment
Jump to: navigation, search

Index of ratings

Planned.

Create rating

Planned.


Read rating

URL: GET http://www.myexperiment.org/rating.xml?id=1

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<rating uri="http://www.myexperiment.org/rating.xml?id=1" resource="http://www.myexperiment.org/workflows/6/ratings/1">
  <owner uri="http://www.myexperiment.org/user.xml?id=2" resource="http://www.myexperiment.org/users/2">David Withers</owner> 
  <rating>4</rating> 
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at> 
</rating>


Update rating

URL: PUT http://www.myexperiment.org/rating.xml?id=1

Example input:

<?xml version="1.0" encoding="UTF-8" ?>
<rating>
  <rating>5</rating>
</rating>


Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<rating uri="http://www.myexperiment.org/rating.xml?id=1" resource="http://www.myexperiment.org/workflows/6/ratings/1">
  <owner uri="http://www.myexperiment.org/user.xml?id=2" resource="http://www.myexperiment.org/users/2">David Withers</owner> 
  <rating>5</rating> 
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at> 
</rating>


Delete rating

URL: DELETE http://www.myexperiment.org/rating.xml?id=1

Example output:

<?xml version="1.0" encoding="UTF-8" ?> 
<rating uri="http://www.myexperiment.org/rating.xml?id=1" resource="http://www.myexperiment.org/workflows/6/ratings/1">
  <owner uri="http://www.myexperiment.org/user.xml?id=2" resource="http://www.myexperiment.org/users/2">David Withers</owner> 
  <rating>5</rating> 
  <created-at>Wed Oct 03 18:36:31 +0100 2007</created-at> 
</rating>


Elements for rating

  • id - the id of the rating
  • owner - the user who submitted for the rating
  • subject - the subject being rated (e.g. a workflow, file, pack, etc.)
  • rating - the rating score (a integer between 1 and 5)
  • created-at - the date/time the rating was submitted