Class: Google::Apis::HealthV4::GoogleHealthAPIService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::HealthV4::GoogleHealthAPIService
- Defined in:
- lib/google/apis/health_v4/service.rb
Overview
Google Health API
The Google Health API lets you view and manage health and fitness metrics and measurement data.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://health.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_delete_data_points(parent, batch_delete_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Delete a batch of identifyable data points.
-
#create_project_subscriber(parent, create_subscriber_payload_object = nil, subscriber_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Registers a new subscriber endpoint to receive notifications.
-
#create_project_subscriber_subscription(parent, create_subscription_payload_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Subscription
Creates a subscription for a specific user to a specific subscriber.
-
#create_user_data_type_data_point(parent, data_point_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Creates a single identifiable data point.
-
#daily_roll_up_data_points(parent, daily_roll_up_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::DailyRollUpDataPointsResponse
Roll up data points over civil time intervals for supported data types.
-
#delete_project_subscriber(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Deletes a subscriber registration.
-
#delete_project_subscriber_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Empty
Deletes a specific user subscription, stopping notifications for this user to this subscriber.
-
#export_user_data_type_data_point_exercise_tcx(name, partial_data: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ExportExerciseTcxResponse
Exports exercise data in TCX format.
-
#get_shl_m_shl_manifest(external_shl_id, manifest_params_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::HttpBody
Forward a manifest request for a given SHL.
-
#get_shl_r(external_shl_id, resource_token, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::HttpBody
Forward a resource request for a given SHL.
-
#get_user_data_type_data_point(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::DataPoint
Get a single identifyable data point.
-
#get_user_identity(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Identity
Gets the user's identity.
-
#get_user_irn_profile(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::IrnProfile
Returns user's IRN Profile details.
-
#get_user_paired_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::PairedDevice
Returns user's Device.
-
#get_user_profile(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Profile
Returns user Profile details.
-
#get_user_settings(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Settings
Returns user settings details.
-
#initialize ⇒ GoogleHealthAPIService
constructor
A new instance of GoogleHealthAPIService.
-
#list_project_subscriber_subscriptions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListSubscriptionsResponse
Lists all active subscriptions for a given subscriber.
-
#list_project_subscribers(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListSubscribersResponse
Lists all subscribers registered within the owned Google Cloud Project.
-
#list_user_data_type_data_points(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListDataPointsResponse
Query user health and fitness data points.
-
#list_user_paired_devices(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListPairedDevicesResponse
Returns the user's list of paired 1P trackers and smartwatches.
-
#patch_project_subscriber(name, subscriber_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's interested in.
-
#patch_project_subscriber_subscription(name, subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Subscription
Updates the data types for an existing user subscription.
-
#patch_user_data_type_data_point(name, data_point_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Updates a single identifiable data point.
-
#reconcile_user_data_type_data_point(parent, data_source_family: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ReconcileDataPointsResponse
Reconcile data points from multiple data sources into a single data stream.
-
#roll_up_data_points(parent, roll_up_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::RollUpDataPointsResponse
Roll up data points over physical time intervals for supported data types.
-
#update_user_profile(name, profile_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Profile
Updates the user's profile details.
-
#update_user_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Settings
Updates the user's settings details.
Constructor Details
#initialize ⇒ GoogleHealthAPIService
Returns a new instance of GoogleHealthAPIService.
48 49 50 51 52 53 |
# File 'lib/google/apis/health_v4/service.rb', line 48 def initialize super(DEFAULT_ENDPOINT_TEMPLATE, '', client_name: 'google-apis-health_v4', client_version: Google::Apis::HealthV4::GEM_VERSION) @batch_path = 'batch' end |
Instance Attribute Details
#key ⇒ String
Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
41 42 43 |
# File 'lib/google/apis/health_v4/service.rb', line 41 def key @key end |
#quota_user ⇒ String
Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
46 47 48 |
# File 'lib/google/apis/health_v4/service.rb', line 46 def quota_user @quota_user end |
Instance Method Details
#batch_delete_data_points(parent, batch_delete_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Delete a batch of identifyable data points.
729 730 731 732 733 734 735 736 737 738 739 |
# File 'lib/google/apis/health_v4/service.rb', line 729 def batch_delete_data_points(parent, batch_delete_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/{+parent}/dataPoints:batchDelete', ) command.request_representation = Google::Apis::HealthV4::BatchDeleteDataPointsRequest::Representation command.request_object = batch_delete_data_points_request_object command.response_representation = Google::Apis::HealthV4::Operation::Representation command.response_class = Google::Apis::HealthV4::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_subscriber(parent, create_subscriber_payload_object = nil, subscriber_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Registers a new subscriber endpoint to receive notifications. A subscriber
represents an application or service that wishes to receive data change
notifications for users who have granted consent. Endpoint Verification:
For a subscriber to be successfully created, the provided endpoint_uri must
be a valid HTTPS endpoint and must pass an automated verification check. The
backend will send two HTTP POST requests to the endpoint_uri: 1. **
Verification with Authorization:** * Headers: Includes Content-Type:
application/json and Authorization (with the exact value from
CreateSubscriberPayload.endpoint_authorization.secret). * Body: "type":
"verification" * Expected Response: HTTP 201 Created. 2. **
Verification without Authorization:** * Headers: Includes Content-Type:
application/json. The Authorization header is OMITTED. * Body: "type":
"verification" * Expected Response: HTTP 401 Unauthorized or 403
Forbidden. Both tests must pass for the subscriber creation to succeed. If
verification fails, the operation will not be completed and an error will be
returned. This process ensures the endpoint is reachable and correctly
validates the Authorization header.
97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/google/apis/health_v4/service.rb', line 97 def create_project_subscriber(parent, create_subscriber_payload_object = nil, subscriber_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/{+parent}/subscribers', ) command.request_representation = Google::Apis::HealthV4::CreateSubscriberPayload::Representation command.request_object = create_subscriber_payload_object command.response_representation = Google::Apis::HealthV4::Operation::Representation command.response_class = Google::Apis::HealthV4::Operation command.params['parent'] = parent unless parent.nil? command.query['subscriberId'] = subscriber_id unless subscriber_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_project_subscriber_subscription(parent, create_subscription_payload_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Subscription
Creates a subscription for a specific user to a specific subscriber. This
method requires the subscriber to have a SubscriptionCreatePolicy set to
MANUAL for the given data types.
278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/google/apis/health_v4/service.rb', line 278 def create_project_subscriber_subscription(parent, create_subscription_payload_object = nil, subscription_id: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/{+parent}/subscriptions', ) command.request_representation = Google::Apis::HealthV4::CreateSubscriptionPayload::Representation command.request_object = create_subscription_payload_object command.response_representation = Google::Apis::HealthV4::Subscription::Representation command.response_class = Google::Apis::HealthV4::Subscription command.params['parent'] = parent unless parent.nil? command.query['subscriptionId'] = subscription_id unless subscription_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#create_user_data_type_data_point(parent, data_point_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Creates a single identifiable data point.
763 764 765 766 767 768 769 770 771 772 773 |
# File 'lib/google/apis/health_v4/service.rb', line 763 def create_user_data_type_data_point(parent, data_point_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/{+parent}/dataPoints', ) command.request_representation = Google::Apis::HealthV4::DataPoint::Representation command.request_object = data_point_object command.response_representation = Google::Apis::HealthV4::Operation::Representation command.response_class = Google::Apis::HealthV4::Operation command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#daily_roll_up_data_points(parent, daily_roll_up_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::DailyRollUpDataPointsResponse
Roll up data points over civil time intervals for supported data types.
799 800 801 802 803 804 805 806 807 808 809 |
# File 'lib/google/apis/health_v4/service.rb', line 799 def daily_roll_up_data_points(parent, daily_roll_up_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/{+parent}/dataPoints:dailyRollUp', ) command.request_representation = Google::Apis::HealthV4::DailyRollUpDataPointsRequest::Representation command.request_object = daily_roll_up_data_points_request_object command.response_representation = Google::Apis::HealthV4::DailyRollUpDataPointsResponse::Representation command.response_class = Google::Apis::HealthV4::DailyRollUpDataPointsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_subscriber(name, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Deletes a subscriber registration. This will stop all notifications to the subscriber's endpoint.
139 140 141 142 143 144 145 146 147 148 |
# File 'lib/google/apis/health_v4/service.rb', line 139 def delete_project_subscriber(name, force: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::Operation::Representation command.response_class = Google::Apis::HealthV4::Operation command.params['name'] = name unless name.nil? command.query['force'] = force unless force.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#delete_project_subscriber_subscription(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Empty
Deletes a specific user subscription, stopping notifications for this user to this subscriber.
319 320 321 322 323 324 325 326 327 |
# File 'lib/google/apis/health_v4/service.rb', line 319 def delete_project_subscriber_subscription(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::Empty::Representation command.response_class = Google::Apis::HealthV4::Empty command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#export_user_data_type_data_point_exercise_tcx(name, partial_data: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ExportExerciseTcxResponse
Exports exercise data in TCX format. IMPORTANT: HTTP clients must append ?
alt=media to the request URL to download the raw TCX file. Example: https://
health.googleapis.com/v4/users/me/dataTypes/exercise/dataPoints/EXERCISE_ID:
exportExerciseTcx?alt=media Without alt=media, the server returns a JSON
response (ExportExerciseTcxResponse) which is intended primarily for gRPC
clients. Note: While the Authorization section below states that any one
of the listed scopes is accepted, this specific method requires the user to
provide both one of the activity_and_fitness scopes (normal or readonly)
AND one of the location scopes (normal or readonly) in their access
token to succeed.
850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'lib/google/apis/health_v4/service.rb', line 850 def export_user_data_type_data_point_exercise_tcx(name, partial_data: nil, fields: nil, quota_user: nil, download_dest: nil, options: nil, &block) if download_dest.nil? command = make_simple_command(:get, 'v4/{+name}:exportExerciseTcx', ) else command = make_download_command(:get, 'v4/{+name}:exportExerciseTcx', ) command.download_dest = download_dest end command.response_representation = Google::Apis::HealthV4::ExportExerciseTcxResponse::Representation command.response_class = Google::Apis::HealthV4::ExportExerciseTcxResponse command.params['name'] = name unless name.nil? command.query['partialData'] = partial_data unless partial_data.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_shl_m_shl_manifest(external_shl_id, manifest_params_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::HttpBody
Forward a manifest request for a given SHL
449 450 451 452 453 454 455 456 457 458 459 |
# File 'lib/google/apis/health_v4/service.rb', line 449 def get_shl_m_shl_manifest(external_shl_id, manifest_params_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/shl/m/{externalShlId}', ) command.request_representation = Google::Apis::HealthV4::ManifestParams::Representation command.request_object = manifest_params_object command.response_representation = Google::Apis::HealthV4::HttpBody::Representation command.response_class = Google::Apis::HealthV4::HttpBody command.params['externalShlId'] = external_shl_id unless external_shl_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_shl_r(external_shl_id, resource_token, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::HttpBody
Forward a resource request for a given SHL
486 487 488 489 490 491 492 493 494 495 |
# File 'lib/google/apis/health_v4/service.rb', line 486 def get_shl_r(external_shl_id, resource_token, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/shl/r/{externalShlId}/{resourceToken}', ) command.response_representation = Google::Apis::HealthV4::HttpBody::Representation command.response_class = Google::Apis::HealthV4::HttpBody command.params['externalShlId'] = external_shl_id unless external_shl_id.nil? command.params['resourceToken'] = resource_token unless resource_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_data_type_data_point(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::DataPoint
Get a single identifyable data point.
888 889 890 891 892 893 894 895 896 |
# File 'lib/google/apis/health_v4/service.rb', line 888 def get_user_data_type_data_point(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::DataPoint::Representation command.response_class = Google::Apis::HealthV4::DataPoint command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_identity(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Identity
Gets the user's identity. It includes the legacy Fitbit user ID and the Google user ID and it can be used by migrating clients to map identifiers between the two systems.
519 520 521 522 523 524 525 526 527 |
# File 'lib/google/apis/health_v4/service.rb', line 519 def get_user_identity(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::Identity::Representation command.response_class = Google::Apis::HealthV4::Identity command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_irn_profile(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::IrnProfile
Returns user's IRN Profile details.
553 554 555 556 557 558 559 560 561 |
# File 'lib/google/apis/health_v4/service.rb', line 553 def get_user_irn_profile(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::IrnProfile::Representation command.response_class = Google::Apis::HealthV4::IrnProfile command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_paired_device(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::PairedDevice
Returns user's Device.
1150 1151 1152 1153 1154 1155 1156 1157 1158 |
# File 'lib/google/apis/health_v4/service.rb', line 1150 def get_user_paired_device(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::PairedDevice::Representation command.response_class = Google::Apis::HealthV4::PairedDevice command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_profile(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Profile
Returns user Profile details.
583 584 585 586 587 588 589 590 591 |
# File 'lib/google/apis/health_v4/service.rb', line 583 def get_user_profile(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::Profile::Representation command.response_class = Google::Apis::HealthV4::Profile command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#get_user_settings(name, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Settings
Returns user settings details.
613 614 615 616 617 618 619 620 621 |
# File 'lib/google/apis/health_v4/service.rb', line 613 def get_user_settings(name, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+name}', ) command.response_representation = Google::Apis::HealthV4::Settings::Representation command.response_class = Google::Apis::HealthV4::Settings command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_subscriber_subscriptions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListSubscriptionsResponse
Lists all active subscriptions for a given subscriber. This can be filtered, for example, by user or data type.
369 370 371 372 373 374 375 376 377 378 379 380 |
# File 'lib/google/apis/health_v4/service.rb', line 369 def list_project_subscriber_subscriptions(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+parent}/subscriptions', ) command.response_representation = Google::Apis::HealthV4::ListSubscriptionsResponse::Representation command.response_class = Google::Apis::HealthV4::ListSubscriptionsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_project_subscribers(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListSubscribersResponse
Lists all subscribers registered within the owned Google Cloud Project.
180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/google/apis/health_v4/service.rb', line 180 def list_project_subscribers(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+parent}/subscribers', ) command.response_representation = Google::Apis::HealthV4::ListSubscribersResponse::Representation command.response_class = Google::Apis::HealthV4::ListSubscribersResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_data_type_data_points(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListDataPointsResponse
Query user health and fitness data points.
980 981 982 983 984 985 986 987 988 989 990 991 |
# File 'lib/google/apis/health_v4/service.rb', line 980 def list_user_data_type_data_points(parent, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+parent}/dataPoints', ) command.response_representation = Google::Apis::HealthV4::ListDataPointsResponse::Representation command.response_class = Google::Apis::HealthV4::ListDataPointsResponse command.params['parent'] = parent unless parent.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#list_user_paired_devices(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ListPairedDevicesResponse
Returns the user's list of paired 1P trackers and smartwatches.
1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 |
# File 'lib/google/apis/health_v4/service.rb', line 1190 def list_user_paired_devices(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+parent}/pairedDevices', ) command.response_representation = Google::Apis::HealthV4::ListPairedDevicesResponse::Representation command.response_class = Google::Apis::HealthV4::ListPairedDevicesResponse command.params['parent'] = parent unless parent.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_subscriber(name, subscriber_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Updates the configuration of an existing subscriber, such as the endpoint URI
or the data types it's interested in. Endpoint Verification: If the
endpoint_uri or endpoint_authorization field is included in the
update_mask, the backend will re-verify the endpoint. The verification
process is the same as described in CreateSubscriber: 1. Verification with
Authorization: POST to the new or existing endpoint_uri with the new or
existing Authorization secret. Expects HTTP 201 Created. 2. Verification
without Authorization: POST to the endpoint_uri without the Authorization
header. Expects HTTP 401 Unauthorized or 403 Forbidden. Both tests must
pass using the potentially updated values for the subscriber update to succeed.
If verification fails, the update will not be applied, and an error will be
returned.
235 236 237 238 239 240 241 242 243 244 245 246 |
# File 'lib/google/apis/health_v4/service.rb', line 235 def patch_project_subscriber(name, subscriber_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v4/{+name}', ) command.request_representation = Google::Apis::HealthV4::Subscriber::Representation command.request_object = subscriber_object command.response_representation = Google::Apis::HealthV4::Operation::Representation command.response_class = Google::Apis::HealthV4::Operation command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_project_subscriber_subscription(name, subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Subscription
Updates the data types for an existing user subscription.
412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/google/apis/health_v4/service.rb', line 412 def patch_project_subscriber_subscription(name, subscription_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v4/{+name}', ) command.request_representation = Google::Apis::HealthV4::Subscription::Representation command.request_object = subscription_object command.response_representation = Google::Apis::HealthV4::Subscription::Representation command.response_class = Google::Apis::HealthV4::Subscription command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#patch_user_data_type_data_point(name, data_point_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Operation
Updates a single identifiable data point. If a data point with the specified
name is not found, the request will fail.
1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 |
# File 'lib/google/apis/health_v4/service.rb', line 1025 def patch_user_data_type_data_point(name, data_point_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v4/{+name}', ) command.request_representation = Google::Apis::HealthV4::DataPoint::Representation command.request_object = data_point_object command.response_representation = Google::Apis::HealthV4::Operation::Representation command.response_class = Google::Apis::HealthV4::Operation command.params['name'] = name unless name.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#reconcile_user_data_type_data_point(parent, data_source_family: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::ReconcileDataPointsResponse
Reconcile data points from multiple data sources into a single data stream.
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 |
# File 'lib/google/apis/health_v4/service.rb', line 1079 def reconcile_user_data_type_data_point(parent, data_source_family: nil, filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'v4/{+parent}/dataPoints:reconcile', ) command.response_representation = Google::Apis::HealthV4::ReconcileDataPointsResponse::Representation command.response_class = Google::Apis::HealthV4::ReconcileDataPointsResponse command.params['parent'] = parent unless parent.nil? command.query['dataSourceFamily'] = data_source_family unless data_source_family.nil? command.query['filter'] = filter unless filter.nil? command.query['pageSize'] = page_size unless page_size.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#roll_up_data_points(parent, roll_up_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::RollUpDataPointsResponse
Roll up data points over physical time intervals for supported data types.
1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 |
# File 'lib/google/apis/health_v4/service.rb', line 1117 def roll_up_data_points(parent, roll_up_data_points_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'v4/{+parent}/dataPoints:rollUp', ) command.request_representation = Google::Apis::HealthV4::RollUpDataPointsRequest::Representation command.request_object = roll_up_data_points_request_object command.response_representation = Google::Apis::HealthV4::RollUpDataPointsResponse::Representation command.response_class = Google::Apis::HealthV4::RollUpDataPointsResponse command.params['parent'] = parent unless parent.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_user_profile(name, profile_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Profile
Updates the user's profile details.
650 651 652 653 654 655 656 657 658 659 660 661 |
# File 'lib/google/apis/health_v4/service.rb', line 650 def update_user_profile(name, profile_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v4/{+name}', ) command.request_representation = Google::Apis::HealthV4::Profile::Representation command.request_object = profile_object command.response_representation = Google::Apis::HealthV4::Profile::Representation command.response_class = Google::Apis::HealthV4::Profile command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |
#update_user_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::HealthV4::Settings
Updates the user's settings details.
690 691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/google/apis/health_v4/service.rb', line 690 def update_user_settings(name, settings_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:patch, 'v4/{+name}', ) command.request_representation = Google::Apis::HealthV4::Settings::Representation command.request_object = settings_object command.response_representation = Google::Apis::HealthV4::Settings::Representation command.response_class = Google::Apis::HealthV4::Settings command.params['name'] = name unless name.nil? command.query['updateMask'] = update_mask unless update_mask.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? execute_or_queue_command(command, &block) end |