The edit link is whatever href you see in the
<link rel="edit"..> node for the entry you're
trying to update.

For GData V2 that link looks something like:
PUT /feeds/documents/private/full/document%3Adocument_id

For GData v1 (what you're using), that link
has an additional /VERSION_ID on the end:
PUT /feeds/documents/private/full/document%3Adocument_id/abc1234

The difference is because v2 uses Etags, v1 does not.

See the v1 protocol guide to see what I'm talking about:
http://code.google.com/apis/documents/docs/1.0/developers_guide_protocol.html#UpdatingMetadata

Cheers,
Eric

On Apr 6, 6:53 pm, Daniel Marashlian <[email protected]> wrote:
> Here is the code I'm using to test this (it's in C#). I'm using the
> same code as all of my other tests that are working.
>
> //docID: "df2qg349_240cstz2shf"
> //type: "document"
> private static string EditMetaData(string docID, string type)
>         {
>             try
>             {
>                 //this gets my Client Auth string
>                 string auth = Authenticate();
>
>                 //Create a web request for the Google ClientLogin
> service
>                 HttpWebRequest authRequest = (HttpWebRequest)
> HttpWebRequest.Create("http://docs.google.com/feeds/documents/private/
> full/" + type + "%3A" + docID);
>                 authRequest.KeepAlive = false;
>                 authRequest.ContentType = "application/atom+xml";
>
>                 authRequest.Method = "PUT";
>                 authRequest.Headers.Add("Authorization: GoogleLogin
> auth=" + auth);
>
>                 //Build the POST data
>                 string postBuilder = "<?xml version='1.0'
> encoding='UTF-8'?><atom:entry xmlns:atom='http://www.w3.org/2005/
> Atom'><atom:category scheme='http://schemas.google.com/g/2005#kind'
> term='http://schemas.google.com/docs/2007#document'label='document'/
>
> ><atom:title>change title</atom:title></atom:entry>";
>
>                 //Convert the POST data to a byte[]
>                 byte[] data = ASCIIEncoding.ASCII.GetBytes
> (postBuilder);
>                 authRequest.ContentLength = data.Length;
>
>                 //Get the request stream and POST the data
>                 Stream requestStream = authRequest.GetRequestStream();
>                 requestStream.Write(data, 0, data.Length);
>                 requestStream.Close();
>
>                 //Get the response
>                 HttpWebResponse authResponse = (HttpWebResponse)
> authRequest.GetResponse();
>                 Stream responseStream = authResponse.GetResponseStream
> ();
>                 StreamReader responseReader = new StreamReader
> (responseStream);
>
>                 string response = responseReader.ReadToEnd();
>
>                 //close streams
>                 responseReader.Close();
>                 responseStream.Close();
>                 authResponse.Close();
>             }
>             catch (Exception ex)
>             {
>                 Console.WriteLine(ex.Message);
>                 Console.WriteLine("");
>                 Console.WriteLine(ex.StackTrace);
>             }
>         }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" 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-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to