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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---