API Documentation

Zend/Gdata/Health.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Gdata  
Subpackage
Health  
Version
$Id: Health.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Gdata_Health

Package: Zend\Gdata\Health

Service class for interacting with the Google Health Data API

Parent(s)
\Zend_Gdata < \Zend_Gdata_App
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Link
http://code.google.com/apis/health  

Constants

Constant  AUTHSUB_PROFILE_FEED_URI = 'https://www.google.com/health/feeds/profile/default'

URIs of the AuthSub/OAuth feeds.

Constant  AUTHSUB_REGISTER_FEED_URI = 'https://www.google.com/health/feeds/register/default'
Constant  CLIENTLOGIN_PROFILELIST_FEED_URI = 'https://www.google.com/health/feeds/profile/list'

URIs of the ClientLogin feeds.

Constant  CLIENTLOGIN_PROFILE_FEED_URI = 'https://www.google.com/health/feeds/profile/ui'
Constant  CLIENTLOGIN_REGISTER_FEED_URI = 'https://www.google.com/health/feeds/register/ui'
Constant  HEALTH_SERVICE_NAME = 'health'

Authentication service names for Google Health and the H9 Sandbox.

Constant  H9_SANDBOX_SERVICE_NAME = 'weaver'

Properties

Propertyprivatestring  $_profileID= 'null'

Profile ID used for all API interactions. This can only be set when using ClientLogin for authentication.

Default valuenullDetails
Type
string
Propertyprivatebool  $_useH9Sandbox= 'false'

True if API calls should be made to the H9 developer sandbox at /h9 rather than /health

Default valuefalseDetails
Type
bool
Propertypublic  $namespaces= 'array('ccr' => 'urn:astm-org:CCR''
static
Default valuearray('ccr' => 'urn:astm-org:CCR'Details
Type

Methods

methodpublic__construct( \Zend_Http_Client $client = null, string $applicationId = 'MyCompany-MyApp-1.0', bool $useH9Sandbox = false ) : void

Create Zend_Gdata_Health object

Parameters
Name Type Description
$client \Zend_Http_Client

(optional) The HTTP client to use when when communicating with the Google Health servers.

$applicationId string

The identity of the application in the form of Company-AppName-Version

$useH9Sandbox bool

True if the H9 Developer's Sandbox should be used instead of production Google Health.

methodpublicgetHealthProfileEntry( mixed $query = null ) : \Zend_Gdata_Health_ProfileEntry

Retrieve a profile entry object

Parameters
Name Type Description
$query mixed

The query for the feed, as a URL or Query

Returns
Type Description
\Zend_Gdata_Health_ProfileEntry
methodpublicgetHealthProfileFeed( mixed $query = null ) : \Zend_Gdata_Health_ProfileFeed

Retrieve a user's profile as a feed object. If ClientLogin is used, the profile associated with $this->_profileID is returned, otherwise the profile associated with the AuthSub token is read.

Parameters
Name Type Description
$query mixed

The query for the feed, as a URL or Query

Returns
Type Description
\Zend_Gdata_Health_ProfileFeed
methodpublicgetHealthProfileListFeed( string $query = null ) : \Zend_Gdata_Feed

Retrieves the list of profiles associated with the user's ClientLogin credentials.

Parameters
Name Type Description
$query string

The query of the feed as a URL or Query object

Returns
Type Description
\Zend_Gdata_Feed
methodpublicgetProfileID( ) : string

Gets the id of the user's profile

Returns
Type Description
string The profile id
methodpublicsendHealthNotice( string $subject, string $body, string $bodyType = null, string $ccrXML = null ) : \Zend_Gdata_Health_ProfileEntry

Posts a new notice using the register feed. This function constructs the atom profile entry.

Parameters
Name Type Description
$subject string

The subject line of the notice

$body string

The message body of the notice

$bodyType string

The (optional) type of message body (text, xhtml, html, etc.)

$ccrXML string

The (optional) CCR to add to the user's profile

Returns
Type Description
\Zend_Gdata_Health_ProfileEntry
methodpublicsetProfileID( string $id ) : \Zend_Gdata_Health

Sets which of the user's profiles will be used

Parameters
Name Type Description
$id string

The profile ID

Returns
Type Description
\Zend_Gdata_Health Provides a fluent interface
Documentation was generated by DocBlox 0.15.1.