Thank you.
Now I want to delete an entry. I don't know how. But this is what I am
doing:
XmlDocument ccrDoc = new XmlDocument();
ccrDoc.LoadXml(ccrXmlString); // valid ccr string
newNotice.ExtensionElements.Add(new XmlExtension(ccrDoc.DocumentElement));
reqFactory.CustomHeaders.Add("Authorization: GoogleLogin auth=" +
authToken); // authToken receievd from ClientLogin
reqFactory.CustomHeaders.Add("GData-Version: 2");
string deleteUri = "http://www.google.com//health/feeds/register/ui/" +
profileId + "/" + entryID;
I have profileId . But I don't lknow how to get entryID. Should I store the
entryId of previously posted entry and then use it to delete.
With that assumption, while posting a newNotice I do this:
postedNoticeEntry = service.Insert(new Uri("
https://www.google.com/h9/feeds/register/default"), newNotice);
string id = postedNoticeEntry.Id.ToString();
I was hoping to get EntryId her. Instead it gives me
'Google.Gdata.Atom.ClientId'. How to get entry ID?
Can you please tell me how?
On Wed, Feb 10, 2010 at 9:59 PM, gilad <[email protected]> wrote:
> see
> http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/samples/health/main.cs
> .Net example:
>
> the way to get the profile id through the list feed is:
> HealthFeed feed = service.Query(new
> HealthQuery(HealthQuery.ProfileListFeed));
> Console.WriteLine ("Feed =" + feed);
> foreach (AtomEntry entry in feed.Entries)
> {
> Console.WriteLine("\tProfile " +
> entry.Title.Text + " has ID: " + entry.Content.Content);
> }
>
>
> On Feb 10, 7:37 pm, Viswanatha Rao <[email protected]> wrote:
> > On Wed, Feb 10, 2010 at 5:02 PM, gilad <[email protected]> wrote:
> > > you need to query the /profile/list to get the profileId
> > > see
> > >http://code.google.com/apis/health/docs/2.0/reference.html#ClientLogi.
> ..
> >
> > > hopes that help
> >
> > > Hi Gilad
> >
> > > I tried it:
> >
> > https://www.google.com/health/feeds/profile/list
> > I also triedhttps://www.google.com/h9/feeds/profile/list
> >
> > > I get another exception:
> >
> > Google.GData.Client.GDataRequestException: Execution of request failed:
> > https://www.google.com/health/feeds/profile/list--->
> System.Net.WebException: The
> > remote server returned an error: (401) Unauthorized.
> > at System.Net.HttpWebRequest.GetResponse()
> > at Google.GData.Client.GDataRequest.Execute()
> > --- End of inner exception stack trace ---
> > at Google.GData.Client.GDataRequest.Execute()
> > at Google.GData.Client.GDataGAuthRequest.Execute(Int32 retryCounter)
> > at Google.GData.Client.GDataGAuthRequest.Execute()
> > at Google.GData.Client.Service.Query(Uri queryUri, DateTime
> > ifModifiedSince,String etag, Int64& contentLength)
> > at Google.GData.Client.Service.Query(Uri queryUri, DateTime
> > ifModifiedSince)
> > at Google.GData.Client.Service.Query(FeedQuery feedQuery)
> > at Google.GData.Health.HealthService.Query(HealthQuery feedQuery)
> > at ConsoleApplication3.Program.Main(String[] args) in
> >
> C:\Inetpub\wwwroot\ConsoleApplication3\ConsoleApplication3\Program.cs:line
> > 163
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Health Developers" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<googlehealthdevelopers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/googlehealthdevelopers?hl=en.
>
>
--
Best Regards
--
You received this message because you are subscribed to the Google Groups
"Google Health Developers" 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/googlehealthdevelopers?hl=en.