Gallery 3 uses Atom to represent its resources exposed through REST. General comments:
We expose the following:
We can describe the comment feed using only standard Atom constructs. The only problem is that all Atom entries must have a title element that should not be empty. Issues:
<?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <id>http://gallery.example.com/comments</id> <title type="text">Comments on Ocean Beach Sunset</title> <updated>2008-11-15T12:00:00Z</updated> <link rel="self" href="http://gallery.example.com/comments" /> <link rel="related" type="application/atom+xml" title="Get photo meta data" href="http://gallery.example.com/photos/23" /> <link rel="related" type="text/html" title="View photo in Gallery" href="http://gallery.example.com/photos/23" /> <link rel="related" type="image/jpeg" title="Download photo" href="http://gallery.example.com/photos/SanFran/sunset.jpg" length="1234" /> <entry> <id>http://gallery.example.com/comments/32</id> <updated>2008-11-15T12:00:00Z</updated> <title></title> <author> <uri>http://gallery.example.com/users/3</uri> <name>Jonathan Doe</name> <email>jdoe@example.com</email> </author> <content type="html">Wow, that's <b>beautiful!>/b></content> </entry> </feed>
We expose all of a comment's meta data, plus links to its photo, photo meta data and user meta data.
<?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom"> <id>http://gallery.example.com/comments/32</id> <updated>2008-11-15T12:00:00Z</updated> <title>Comment on Ocean Beach Sunset</title> <author> <uri>http://gallery.example.com/users/3</uri> <name>Jonathan Doe</name> <email>jdoe@example.com</email> </author> <content type="html">Wow, that's <b>beautiful!>/b></content> <link rel="self" href="http://gallery.example.com/comments/32" /> <link rel="related" type="application/atom+xml" title="Get photo meta data" href="http://gallery.example.com/photos/23" /> <link rel="related" type="text/html" title="View photo in Gallery" href="http://gallery.example.com/photos/23" /> <link rel="related" type="image/jpeg" title="Download photo" href="http://gallery.example.com/photos/SanFran/sunset.jpg" length="1234" /> </entry>