On Oct 14, 7:52 am, FranceTelecomIphoneGeek <[EMAIL PROTECTED]>
wrote:
> Thanks so much for help. I successfully downloaded my profile.
>
> One more question, what is easiest way to parse the data, since I did
> not find objective-C api, do I have to parse feed and CCR by myself,
> or there are some packages available for objective c.
None that Google provides.
If you can't find a library on the web, you'll just
have to parse the CCR XML using an Objective-C XML
library along with XPath or something similar.
Unfortunately, Objective-C is not my strong point so
I can't offer any suggestions :(
Eric
>
> Thanks again
>
> On Oct 2, 6:19 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote:
>
> > myProfileName needs to
> > be:https://www.google.com/health/feeds/profile/ui/mpZ0aCIjHws
>
> > The process is to query the profile/list feed to determine the
> > profileID
> > you want to interact with. Then, use the profile/ui feed
> > with a profileID appended on the end to query an actual profile.
>
> > Eric
>
> > On Oct 1, 11:38 am, FranceTelecomIphoneGeek <[EMAIL PROTECTED]>
> > wrote:
>
> > > Here is objective-C code for query of profile
> > > myProfileName ="https://www.google.com/health/feeds/profile/list/
> > > mpZ0aCIjHws"; Which I got from profile/list request.
>
> > > NSMutableURLRequest *httpReq = [[NSMutableURLRequest alloc]
> > > initWithURL:[NSURL URLWithString:myProfileName] ];
> > > [httpReq setTimeoutInterval:30.0];
> > > //[httpReq setCachePolicy:NSURLRequestReloadIgnoringCacheData];
> > > [httpReq setHTTPMethod:@"GET"];
> > > //set headers
> > > [httpReq addValue:@"Content-Type"
> > > forHTTPHeaderField:@"application/
> > > atom+xml"];
> > > NSString* param = [NSString stringWithFormat:@"GoogleLogin
> > > auth=%@",
> > > [parameter objectForKey:@"Auth"]];
> > > [httpReq setValue:param forHTTPHeaderField: @"Authorization"];
> > > [httpReq addValue:@"Authorization" forHTTPHeaderField:param];
> > > NSHTTPURLResponse *response = nil;
> > > NSData *data = nil;
> > > NSError *error = nil;
> > > NSString* responseStr;
> > > data = [NSURLConnection sendSynchronousRequest:httpReq
> > > returningResponse:&response error:&error];
>
> > > Thanks
>
> > > On Oct 1, 2:23 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote:
>
> > > > You'll have to post a code snippet. This could be a number of things.
>
> > > > Eric
>
> > > > On Oct 1, 7:12 am, FranceTelecomIphoneGeek <[EMAIL PROTECTED]> wrote:
>
> > > > > Hey Eric,
>
> > > > > I fixed the problem of previous reply, that was one parameter I pass
> > > > > was wrong. Anyway I got my profile list, then I query my profile by
> > > > > using the id from profile list request, here is the error I got:
> > > > > "
> > > > > Oops an error has occured.
> > > > > Please include the following information in your error report:
>
> > > > > AP52v_RbKoJPN4H_rVU3s-
> > > > > TvZ3XGbWktjM05iyCrpf57zvcS_W9oj2Ak1_QYl9LNkElYpalY2pUDKsufbd5LEI9Wp1AT3r7tY
> > > > > HKd__Z_dnCwDAQ7ZXQru6FsVM72e04_7tG0xAwbZdoZi8GbeQVEIdgOy-
> > > > > n8M2UNRbsgSv3s4btz6u30z04wX_TcTeLLWo7rGFZJVKCt6XU97ppsUM_S9i1f_4DYeTYGLYg-
> > > > > c0ITK_BCybxqjs_R9REbGJRoavUPtYlQnvfAr4U2oQcuTzUaxZC07i0Lx4K9TnJI84vViiauEi2
> > > > > dgx-
> > > > > v2h5fw_Redc29ySbhhLprBjT_2NYoMnfXmF1_gm8UMOPVkzqI3aXm-sMX-
> > > > > Cf85swkVnUvZ7Lk1J1hZU_yIceula7ZUD-
> > > > > OpXGiJ3y9odLF5XaprbYpbYzCrHEKzKdTF2AR6_b2WM0mXp2f0dDmGPIz9qVrbzOobiRaPQKgtJ
> > > > > _wbpQ4Wssa_sA80aTE_8FlU1MbRmzs6FvybY4ZqjctCCrDUT1v540NPG21Pgyrxa-
> > > > > XaxZnpy9LYfZRzWpcPdtrYyg5dEbRQdZsy5_v6ApQl8Sf8N0obVC04ixIZlSlC6rsIGHOGSV3yl
> > > > >
> > > > > lUSeNGxlFEXf7k1JDw4HuGOmDTnySbsmOAB2J47qZSR6kAUKsQYtjtccikL1St9RQHAOlCwpgBL
> > > > > O9XQgtuYS_OILYh1a03YdZea-
> > > > > dfR0SBQ5cb_hsmhjH9S_27HKaUrV8QI2uXOY6r7eVPMh7S_qVx7J0JpmTaP3O-
> > > > > j0Az0dwOhNF9DPZnnOZhDpmsApiL0k06n_7tY_NRss_OcFAH05drC0qHfZ6tdZEBSjhLjAwXKCV
> > > > > 66effL0jbsmhGVlaUv8XFYV5p8x-
> > > > > DHzNz22fCea_9tJNlIcpFtnxdassoVmiK47VfOPeto7LzZEChgsNxApVLHVmDFrp-
> > > > > dvPAvzwY4c921_GftPHJltR8W4VxvxrF5Nr5093JInBETIy9q00boWBixQdAFYa5MJ76VogKSS0
> > > > >
> > > > > mtTNaMI0R_fQHUHH_jmYHSS5QPbqqlFPvDTT65NCOlopHOknXKcrnHsA9ASCkmf29mNADG0V-
> > > > > yAWecQcpI3xqdgSwuodKlBgz-
> > > > > AGdMcd2c9QXr6N8z894Z4mL7hFsDXPfRqK1zgJsngpcENGlPZPw3Qg-7LkdreAg9q_iXHzyqAMf
> > > > > d3vEUp_JiOZwdp9f0bg0dTqmEernq7IDEN3dwHVxOXBr2zG-
> > > > > pFheSpnMK9GHgZjSuQgOwpGZwue9uQ6oPH5d3-SsannR4cWrx00C"
>
> > > > > Is it my error or google health problem?
>
> > > > > Thanks
>
> > > > > On Sep 30, 5:31 pm, FranceTelecomIphoneGeek <[EMAIL PROTECTED]>
> > > > > wrote:
>
> > > > > > Eric
> > > > > > Thanks for quick response.
> > > > > > Here are what I did:
> > > > > > send request:
> > > > > > GEThttps://www.google.com/health/feeds/profile/list
> > > > > > Content-Type: application/atom+xml
> > > > > > Authorization: GoogleLogin auth="My token"
>
> > > > > > response:
> > > > > > <HTML>
> > > > > > <HEAD>
> > > > > > <TITLE>Token invalid</TITLE>
> > > > > > </HEAD>
> > > > > > <BODY BGCOLOR="#FFFFFF" TEXT="#000000">
> > > > > > <H1>Token invalid</H1>
> > > > > > <H2>Error 401</H2>
> > > > > > </BODY>
> > > > > > </HTML>
>
> > > > > > I must did something wrong.
>
> > > > > > Thanks again.
>
> > > > > > On Sep 30, 5:04 pm, "Eric (Google)" <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Hi,
>
> > > > > > > The ClientLogin feeds are a little diferrent than their AuthSub
> > > > > > > counterparts. You need to specify a profileID let the server
> > > > > > > know why profile to interact with. The format is:
> > > > > > > GEThttps://www.google.com/health/feeds/profile/ui/profileID
>
> > > > > > > To determine the correct profileID, I would query the
> > > > > > > profile/list feed first:
> > > > > > > GEThttps://www.google.com/health/feeds/profile/list
>
> > > > > > > See this doc for
> > > > > > > reference:http://code.google.com/apis/health/reference.html#ClientLoginFeeds
>
> > > > > > > Eric
>
> > > > > > > On Sep 30, 1:28 pm, FranceTelecomIphoneGeek <[EMAIL PROTECTED]>
> > > > > > > wrote:
>
> > > > > > > > Hey,
> > > > > > > > I am a newbie for google health and I am writing an application
> > > > > > > > on
> > > > > > > >Iphoneto access google health data. Since GData client api with
> > > > > > > > Health support is not there yet, I am just trying to use http
> > > > > > > > request
> > > > > > > > and response to retrieve profile.
>
> > > > > > > > I successfully authenticated with google ClientLogin api, and I
> > > > > > > > got
> > > > > > > > auth token. Then I tried to read profile by following http
> > > > > > > > request:
> > > > > > > > "https://www.google.com/health/feeds/profile/default"
>
> > > > > > > > GET /health/feeds/profile/default HTTP/1.1
> > > > > > > > Content-Type: application/atom+xml
> > > > > > > > Authorization: GoogleLogin auth="My token"
>
> > > > > > > > I got error message "Token invalid". How can I resolve this?
>
> > > > > > > > Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---