On Nov 2, 9:29 pm, petem <[EMAIL PROTECTED]> wrote:
> On Nov 2, 7:18 am, "Eric (Google)" <[EMAIL PROTECTED]> wrote:
>
> > ... Until then,
> > it's realatively straightforward to use the Atom and service
> > base classes to connect to Health.
>
> > Here's a great Google App Engine sample that may
> > help:http://code.google.com/p/googlehealthsamples/source/browse/#svn/trunk...
>
> Eric, thanks for the reference you gave but it hasn't helped me. If I
> can couch a specific question then your answer might get me
> started ....
>
> I'm trying to create ./examples/health/health_example.py, along the
> lines of the other API samples. It uses ClientLogin/ProgramaticLogin.
> The next step is to implement a GetHealthProfileListFeed(), and
> therein I expect to call HealthProfileListFeedFromString(). The impl
> of this latter
> function requires definition and use of a HealthProfileListFeed class,
> subclassed from AtomBase, for which I need a _namespace and an _tag.
> I cannot find where to find the namespace and tag and similar detail
> amongst the docs.
The profile/list feed is a basic atom feed. All of it's tags/
elementsfall under the atom ns. See
http://code.google.com/apis/health/reference.html#ClientLoginProfileListFeed
>
> Perhaps a few notes on subclassing the AtomBase class suitably for
> parsing the CCR items?
For the profile/default feeds, CCR data is attached at the end of
each
atom <entry> as an xml blob. It falls under <ContinuityOfCareRecord
xmlns="urn:astm-org:CCR">
See
http://code.google.com/apis/health/developers_guide_protocol.html#GettingProfile
for the structure of the profile feed.
The python client does a decent job of interpreting the CCR as an
extension element,
putting it in a different namespace. Here's some quick code:
import gdata
import gdata.service
import atom
service = gdata.service.GDataService(email='[EMAIL PROTECTED]',
password='paSSword', service='health')
service.ProgrammaticLogin()
feed = service.Get(uri='https://www.google.com/health/feeds/profile/
list')
...not sure if any of this helps.
Eric
>
> Once I get past that, I guess I'm referring to the CCR docs to get
> atom detail for ClientLogin profile feed items?
>
> Thanks if you can help.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---