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

Re: AtomPub Media Repository



2010/2/8 Jan Algermissen <algermissen1971@xxxxxxx>
 
GET /the-service/images/at-the-beach/original/at-the-beach.jpg
Accept: image/jpeg

200 Ok
Content-Type: image/jpeg
Link-Template: </the-service/images/at-the-beach/conversions/{template}>;rel="http://your.org/specs/rels/conversions"

[image data]
 
About this; I've now defined that an URI Template for a photo can look like so:

Link-Template: </acme/photos/{template}/at-the-beach/>;
               rel="http://example.com/acme/templates/"

And that an URI Template for a template can look like so:

Link-Template: </acme/photos/thumbnail/{photo}/>;
               rel="http://example.com/acme/photos/"

All fine and dandy. However, I would like to expand this so the client can insert even more pre-known values into the URI. I would like to make as much of this parameterized, as the clients of this AtomPub server will be pretty smart and built with a lot of knowledge.

For instance, I would like to have a URI Template for each customer, to allow the client to interpolate both template and photo at runtime. The template itself can look like so:

Link-Template: </acme/photos/{template}/{photo}/>;

I can't figure out what to do with the "rel" parameter, though. On top of this, I'd like the client to be able to interpolate the category into the URI, because photos may be named in a way that is only unique within a given category, but not globally across a customer. I'm not entirely sure of this requirement yet, but let's say it's absolute. Is it solvable? How?

--
Asbjørn Ulsberg           -=|=-        asbjorn@xxxxxxxxxx
«He's a loathsome offensive brute, yet I can't look away»