Documentation

Google_Service_Fitness_Resource_UsersDataSources extends Google_Service_Resource
in package

The "dataSources" collection of methods.

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

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Fitness_DataSource
Creates a new data source that is unique across all data sources belonging to this user. A data source is a unique source of sensor data. Data sources can expose raw data coming from hardware sensors on local or companion devices.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Fitness_DataSource
Deletes the specified data source. The request will fail if the data source contains any data points. (dataSources.delete)
get()  : Google_Service_Fitness_DataSource
Returns the specified data source. (dataSources.get)
listUsersDataSources()  : Google_Service_Fitness_ListDataSourcesResponse
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)
update()  : Google_Service_Fitness_DataSource
Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified. Data sources are identified by their dataStreamId.
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

create()

Creates a new data source that is unique across all data sources belonging to this user. A data source is a unique source of sensor data. Data sources can expose raw data coming from hardware sensors on local or companion devices.

public create(string $userId, Google_Service_Fitness_DataSource $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Fitness_DataSource

They can also expose derived data, created by transforming or merging other data sources. Multiple data sources can exist for the same data type. Every data point in every dataset inserted into or read from the Fitness API has an associated data source. Each data source produces a unique stream of dataset updates, with a unique data source identifier. Not all changes to data source affect the data stream ID, so that data collected by updated versions of the same application/device can still be considered to belong to the same data source. Data sources are identified using a string generated by the server, based on the contents of the source being created. The dataStreamId field should not be set when invoking this method. It will be automatically generated by the server with the correct format. If a dataStreamId is set, it must match the format that the server would generate. This format is a combination of some fields from the data source, and has a specific order. If it doesn't match, the request will fail with an error. Specifying a DataType which is not a known type (beginning with "com.google.") will create a DataSource with a custom data type. Custom data types are only readable by the application that created them. Custom data types are deprecated; use standard data types instead. In addition to the data source fields included in 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
$userId : string

Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

$postBody : Google_Service_Fitness_DataSource
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Fitness_DataSource

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

Deletes the specified data source. The request will fail if the data source contains any data points. (dataSources.delete)

public delete(string $userId, string $dataSourceId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Fitness_DataSource
Parameters
$userId : string

Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

$dataSourceId : string

The data stream ID of the data source to delete.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Fitness_DataSource

get()

Returns the specified data source. (dataSources.get)

public get(string $userId, string $dataSourceId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Fitness_DataSource
Parameters
$userId : string

Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

$dataSourceId : string

The data stream ID of the data source to retrieve.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Fitness_DataSource

listUsersDataSources()

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)

public listUsersDataSources(string $userId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Fitness_ListDataSourcesResponse
Parameters
$userId : string

List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
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

update()

Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified. Data sources are identified by their dataStreamId.

public update(string $userId, string $dataSourceId, Google_Service_Fitness_DataSource $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Fitness_DataSource

(dataSources.update)

Parameters
$userId : string

Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

$dataSourceId : string

The data stream ID of the data source to update.

$postBody : Google_Service_Fitness_DataSource
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Fitness_DataSource

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results