ETags are a feature of V2 of the Google Data APIs. Picasa Web Albums does
not yet support V2. The "album_version_number" in your example functions in
a similar manner as the ETag might, except it is a part of the URL rather
than a separate entity.

It would help to see a packet capture of the full request/response.

Cheers,
-Jeff

On Thu, Apr 2, 2009 at 11:10 PM, aaronluo <aaron...@gmail.com> wrote:

>
> hi all
> I am trying to update some properties of a speicifc album.  I sent a
> PUT request to URI 'http://picasaweb.google.com/data/entry/api/user/
> <myid>/albumid/<albumid>/<album_version_number>.
>
> The header of the request seems like following:
> Authorization:GoogleLogin auth=<my_auth_token>
> Content-type: application/atom+xml
>
> The body of the reqeust is the new album data like following:
>    <entry xmlns='http://www.w3.org/2005/Atom'
>        xmlns:media='http://search.yahoo.com/mrss/'
>        xmlns:gphoto='http://schemas.google.com/photos/2007'>
>      <title type='text'>newTitle</title>
>      <summary type='text'>newTitle</summary>
>      <gphoto:access>public</gphoto:access>
>      <gphoto:commentingEnabled>true</gphoto:commentingEnabled>
>      <media:group>
>        <media:keywords>newTitle</media:keywords>
>      </media:group>
>      <category scheme='http://schemas.google.com/g/2005#kind'
>        term='http://schemas.google.com/photos/2007#album'></category>
>    </entry>
> But unfortunately, I got a HTTP 500 error. I check the reference of
> the API, and I read some information about ETags which will be used
> when a user wants to update a entry. So I add a new key-value pair to
> the header according to the reference.
> If-Match: <album_version_number>
>
> But this time I got an HTTPPreconditionFailed. It seems that the
> album_version_number doesn't equal ETag of this entry.
> So there are tow questions. One is why I can't update the properites
> of a album via API. Another is how can I get the ETag of a album?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To post to this group, send email to Google-Picasa-Data-API@googlegroups.com
To unsubscribe from this group, send email to 
google-picasa-data-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to