Health.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Gdata
  17. * @subpackage Health
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Exception
  24. */
  25. require_once 'Zend/Exception.php';
  26. /**
  27. * @see Zend_Gdata
  28. */
  29. require_once 'Zend/Gdata.php';
  30. /**
  31. * Service class for interacting with the Google Health Data API
  32. *
  33. * @link http://code.google.com/apis/health
  34. *
  35. * @category Zend
  36. * @package Zend_Gdata
  37. * @subpackage Health
  38. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  39. * @license http://framework.zend.com/license/new-bsd New BSD License
  40. */
  41. class Zend_Gdata_Health extends Zend_Gdata
  42. {
  43. /**
  44. * URIs of the AuthSub/OAuth feeds.
  45. */
  46. const AUTHSUB_PROFILE_FEED_URI =
  47. 'https://www.google.com/health/feeds/profile/default';
  48. const AUTHSUB_REGISTER_FEED_URI =
  49. 'https://www.google.com/health/feeds/register/default';
  50. /**
  51. * URIs of the ClientLogin feeds.
  52. */
  53. const CLIENTLOGIN_PROFILELIST_FEED_URI =
  54. 'https://www.google.com/health/feeds/profile/list';
  55. const CLIENTLOGIN_PROFILE_FEED_URI =
  56. 'https://www.google.com/health/feeds/profile/ui';
  57. const CLIENTLOGIN_REGISTER_FEED_URI =
  58. 'https://www.google.com/health/feeds/register/ui';
  59. /**
  60. * Authentication service names for Google Health and the H9 Sandbox.
  61. */
  62. const HEALTH_SERVICE_NAME = 'health';
  63. const H9_SANDBOX_SERVICE_NAME = 'weaver';
  64. /**
  65. * Create Zend_Gdata_Health object
  66. *
  67. * @param Zend_Http_Client $client (optional) The HTTP client to use when
  68. * when communicating with the Google Health servers.
  69. * @param string $applicationId The identity of the application in the form
  70. * of Company-AppName-Version
  71. * @param bool $useH9Sandbox True if the H9 Developer's Sandbox should be
  72. * used instead of production Google Health.
  73. */
  74. public function __construct($client = null, $applicationId = 'MyCompany-MyApp-1.0', $useH9Sandbox = false)
  75. {
  76. throw new Zend_Exception(
  77. 'Google Health API has been discontinued by Google and was removed'
  78. . ' from Zend Framework in 1.12.0. For more information see: '
  79. . 'http://googleblog.blogspot.ca/2011/06/update-on-google-health-and-google.html'
  80. );
  81. }
  82. }