Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
Google_Service_Fitness_UsersDataSources_Resource Class Reference

The "dataSources" collection of methods. More...

Inheritance diagram for Google_Service_Fitness_UsersDataSources_Resource:
Google_Service_Resource

Public Member Functions

 call ($name, $arguments, $expected_class=null)
 TODO: This function needs simplifying.
 
 create ($userId, Google_Service_Fitness_DataSource $postBody, $optParams=array())
 Creates a new data source that is unique across all data sources belonging to this user.
 
 delete ($userId, $dataSourceId, $optParams=array())
 Delete the data source if there are no datapoints associated with it (dataSources.delete)
 
 get ($userId, $dataSourceId, $optParams=array())
 Returns a data source identified by a data stream ID.
 
 listUsersDataSources ($userId, $optParams=array())
 Lists all data sources that are visible to the developer, using the OAuth scopes provided.
 
 patch ($userId, $dataSourceId, Google_Service_Fitness_DataSource $postBody, $optParams=array())
 Updates a given data source.
 
 update ($userId, $dataSourceId, Google_Service_Fitness_DataSource $postBody, $optParams=array())
 Updates a given data source.
 

Protected Member Functions

 convertToArrayAndStripNulls ($o)
 

Detailed Description

The "dataSources" collection of methods.

Typical usage is: $fitnessService = new Google_Service_Fitness(...); $dataSources = $fitnessService->dataSources;

Member Function Documentation

◆ call()

Google_Service_Resource::call ( $name,
$arguments,
$expected_class = null )
inherited

TODO: This function needs simplifying.

Parameters
$name
$arguments
$expected_class- optional, the expected class name
Return values
Google_Http_Request|expected_class
Exceptions
Google_Exception

◆ create()

Google_Service_Fitness_UsersDataSources_Resource::create ( $userId,
Google_Service_Fitness_DataSource $postBody,
$optParams = array() )

Creates a new data source that is unique across all data sources belonging to this user.

The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types. (dataSources.create)

Parameters
string$userIdCreate the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
Google_DataSource$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Fitness_DataSource

◆ delete()

Google_Service_Fitness_UsersDataSources_Resource::delete ( $userId,
$dataSourceId,
$optParams = array() )

Delete the data source if there are no datapoints associated with it (dataSources.delete)

Parameters
string$userIdRetrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
string$dataSourceIdThe data stream ID of the data source to delete.
array$optParamsOptional parameters.
Return values
Google_Service_Fitness_DataSource

◆ get()

Google_Service_Fitness_UsersDataSources_Resource::get ( $userId,
$dataSourceId,
$optParams = array() )

Returns a data source identified by a data stream ID.

(dataSources.get)

Parameters
string$userIdRetrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
string$dataSourceIdThe data stream ID of the data source to retrieve.
array$optParamsOptional parameters.
Return values
Google_Service_Fitness_DataSource

◆ listUsersDataSources()

Google_Service_Fitness_UsersDataSources_Resource::listUsersDataSources ( $userId,
$optParams = array() )

Lists all data sources that are visible to the developer, using the OAuth scopes provided.

The list is not exhaustive: the user may have private data sources that are only visible to other developers or calls using other scopes. (dataSources.listUsersDataSources)

Parameters
string$userIdList data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
array$optParamsOptional parameters.

@opt_param string dataTypeName The names of data types to include in the list. If not specified, all data sources will be returned.

Return values
Google_Service_Fitness_ListDataSourcesResponse

◆ patch()

Google_Service_Fitness_UsersDataSources_Resource::patch ( $userId,
$dataSourceId,
Google_Service_Fitness_DataSource $postBody,
$optParams = array() )

Updates a given data source.

It is an error to modify the data source's data stream ID, data type, type, stream name or device information apart from the device version. Changing these fields would require a new unique data stream ID and separate data source.

Data sources are identified by their data stream ID. This method supports patch semantics. (dataSources.patch)

Parameters
string$userIdUpdate the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
string$dataSourceIdThe data stream ID of the data source to update.
Google_DataSource$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Fitness_DataSource

◆ update()

Google_Service_Fitness_UsersDataSources_Resource::update ( $userId,
$dataSourceId,
Google_Service_Fitness_DataSource $postBody,
$optParams = array() )

Updates a given data source.

It is an error to modify the data source's data stream ID, data type, type, stream name or device information apart from the device version. Changing these fields would require a new unique data stream ID and separate data source.

Data sources are identified by their data stream ID. (dataSources.update)

Parameters
string$userIdUpdate the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
string$dataSourceIdThe data stream ID of the data source to update.
Google_DataSource$postBody
array$optParamsOptional parameters.
Return values
Google_Service_Fitness_DataSource

The documentation for this class was generated from the following file: