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_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.
657 658 659 660 661 662 663 664 665 666 667 |
# File 'lib/google/apis/health_v4/service.rb', line 657 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.
691 692 693 694 695 696 697 698 699 700 701 |
# File 'lib/google/apis/health_v4/service.rb', line 691 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.
727 728 729 730 731 732 733 734 735 736 737 |
# File 'lib/google/apis/health_v4/service.rb', line 727 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.
778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/google/apis/health_v4/service.rb', line 778 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_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.
816 817 818 819 820 821 822 823 824 |
# File 'lib/google/apis/health_v4/service.rb', line 816 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.
447 448 449 450 451 452 453 454 455 |
# File 'lib/google/apis/health_v4/service.rb', line 447 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.
481 482 483 484 485 486 487 488 489 |
# File 'lib/google/apis/health_v4/service.rb', line 481 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.
1078 1079 1080 1081 1082 1083 1084 1085 1086 |
# File 'lib/google/apis/health_v4/service.rb', line 1078 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.
511 512 513 514 515 516 517 518 519 |
# File 'lib/google/apis/health_v4/service.rb', line 511 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.
541 542 543 544 545 546 547 548 549 |
# File 'lib/google/apis/health_v4/service.rb', line 541 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.
908 909 910 911 912 913 914 915 916 917 918 919 |
# File 'lib/google/apis/health_v4/service.rb', line 908 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.
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 |
# File 'lib/google/apis/health_v4/service.rb', line 1118 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.
953 954 955 956 957 958 959 960 961 962 963 |
# File 'lib/google/apis/health_v4/service.rb', line 953 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.
1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 |
# File 'lib/google/apis/health_v4/service.rb', line 1007 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.
1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 |
# File 'lib/google/apis/health_v4/service.rb', line 1045 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.
578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/google/apis/health_v4/service.rb', line 578 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.
618 619 620 621 622 623 624 625 626 627 628 629 |
# File 'lib/google/apis/health_v4/service.rb', line 618 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 |