I am trying to delete a row but want to make sure no one else edited it. 
This is what I am trying and it is not working.

1. Get a row
curl --silent -X GET --header "GData-Version: 3.0" --header "Authorization: 
GoogleLogin auth=$TOKEN" 
https://spreadsheets.google.com/feeds/list/xxx/od6/private/full/cokwr | 
tidy -xml -indent -quiet | egrep "etag|title"
gd:etag='"YGdaHlAXHyt7Ig.."'>
<title>TEST1</title>

2. Change a cell. (The etag changed)  

3. The etag changed.
curl --silent -X GET --header "GData-Version: 3.0" --header "Authorization: 
GoogleLogin auth=$TOKEN" 
https://spreadsheets.google.com/feeds/list/xxx/od6/private/full/cokwr | 
tidy -xml -indent -quiet | egrep "etag|title"
gd:etag='"agoUURMYXyt7ImA."'>
<title>TEST1-new</title> 

4. Delete the row with the old etag in the If-Match header. This should 
fail since it has changed.
 curl --silent -X DELETE --header 'If-Match: "YGdaHlAXHyt7Ig.."' --header 
"GData-Version: 3.0" --header "Authorization: GoogleLogin auth=$TOKEN" 
https://spreadsheets.google.com/feeds/list/xxx/od6/private/full/cokwr

5. The delete did happen. The row is gone and it should not be.

Does anyone have ant ideas what is wrong?

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to