Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 401 and 402] [Versions 401 and 403]

(no description)

File Size: 1568 lines (47 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 26 classes

Google_Service_Fitness:: (1 method):
  __construct()

Google_Service_Fitness_Users_Resource:: (0 methods):

Google_Service_Fitness_UsersDataSources_Resource:: (6 methods):
  create()
  delete()
  get()
  listUsersDataSources()
  patch()
  update()

Google_Service_Fitness_UsersDataSourcesDatasets_Resource:: (3 methods):
  delete()
  get()
  patch()

Google_Service_Fitness_UsersDataset_Resource:: (1 method):
  aggregate()

Google_Service_Fitness_UsersSessions_Resource:: (3 methods):
  delete()
  listUsersSessions()
  update()

Google_Service_Fitness_AggregateBucket:: (12 methods):
  setActivity()
  getActivity()
  setDataset()
  getDataset()
  setEndTimeMillis()
  getEndTimeMillis()
  setSession()
  getSession()
  setStartTimeMillis()
  getStartTimeMillis()
  setType()
  getType()

Google_Service_Fitness_AggregateBy:: (4 methods):
  setDataSourceId()
  getDataSourceId()
  setDataTypeName()
  getDataTypeName()

Google_Service_Fitness_AggregateRequest:: (14 methods):
  setAggregateBy()
  getAggregateBy()
  setBucketByActivitySegment()
  getBucketByActivitySegment()
  setBucketByActivityType()
  getBucketByActivityType()
  setBucketBySession()
  getBucketBySession()
  setBucketByTime()
  getBucketByTime()
  setEndTimeMillis()
  getEndTimeMillis()
  setStartTimeMillis()
  getStartTimeMillis()

Google_Service_Fitness_AggregateResponse:: (2 methods):
  setBucket()
  getBucket()

Google_Service_Fitness_Application:: (8 methods):
  setDetailsUrl()
  getDetailsUrl()
  setName()
  getName()
  setPackageName()
  getPackageName()
  setVersion()
  getVersion()

Google_Service_Fitness_BucketByActivity:: (4 methods):
  setActivityDataSourceId()
  getActivityDataSourceId()
  setMinDurationMillis()
  getMinDurationMillis()

Google_Service_Fitness_BucketBySession:: (2 methods):
  setMinDurationMillis()
  getMinDurationMillis()

Google_Service_Fitness_BucketByTime:: (2 methods):
  setDurationMillis()
  getDurationMillis()

Google_Service_Fitness_DataPoint:: (16 methods):
  setComputationTimeMillis()
  getComputationTimeMillis()
  setDataTypeName()
  getDataTypeName()
  setEndTimeNanos()
  getEndTimeNanos()
  setModifiedTimeMillis()
  getModifiedTimeMillis()
  setOriginDataSourceId()
  getOriginDataSourceId()
  setRawTimestampNanos()
  getRawTimestampNanos()
  setStartTimeNanos()
  getStartTimeNanos()
  setValue()
  getValue()

Google_Service_Fitness_DataSource:: (14 methods):
  setApplication()
  getApplication()
  setDataStreamId()
  getDataStreamId()
  setDataStreamName()
  getDataStreamName()
  setDataType()
  getDataType()
  setDevice()
  getDevice()
  setName()
  getName()
  setType()
  getType()

Google_Service_Fitness_DataType:: (4 methods):
  setField()
  getField()
  setName()
  getName()

Google_Service_Fitness_DataTypeField:: (6 methods):
  setFormat()
  getFormat()
  setName()
  getName()
  setOptional()
  getOptional()

Google_Service_Fitness_Dataset:: (10 methods):
  setDataSourceId()
  getDataSourceId()
  setMaxEndTimeNs()
  getMaxEndTimeNs()
  setMinStartTimeNs()
  getMinStartTimeNs()
  setNextPageToken()
  getNextPageToken()
  setPoint()
  getPoint()

Google_Service_Fitness_Device:: (10 methods):
  setManufacturer()
  getManufacturer()
  setModel()
  getModel()
  setType()
  getType()
  setUid()
  getUid()
  setVersion()
  getVersion()

Google_Service_Fitness_ListDataSourcesResponse:: (2 methods):
  setDataSource()
  getDataSource()

Google_Service_Fitness_ListSessionsResponse:: (6 methods):
  setDeletedSession()
  getDeletedSession()
  setNextPageToken()
  getNextPageToken()
  setSession()
  getSession()

Google_Service_Fitness_MapValue:: (2 methods):
  setFpVal()
  getFpVal()

Google_Service_Fitness_Session:: (18 methods):
  setActiveTimeMillis()
  getActiveTimeMillis()
  setActivityType()
  getActivityType()
  setApplication()
  getApplication()
  setDescription()
  getDescription()
  setEndTimeMillis()
  getEndTimeMillis()
  setId()
  getId()
  setModifiedTimeMillis()
  getModifiedTimeMillis()
  setName()
  getName()
  setStartTimeMillis()
  getStartTimeMillis()

Google_Service_Fitness_Value:: (8 methods):
  setFpVal()
  getFpVal()
  setIntVal()
  getIntVal()
  setMapVal()
  getMapVal()
  setStringVal()
  getStringVal()

Google_Service_Fitness_ValueMapValEntry:: (4 methods):
  setKey()
  getKey()
  setValue()
  getValue()


Class: Google_Service_Fitness  - X-Ref

Service definition for Fitness (v1).

<p>
Google Fit API</p>

<p>
For more information about this service, see the API
<a href="https://developers.google.com/fit/rest/" target="_blank">Documentation</a>
</p>

__construct(Google_Client $client)   X-Ref
Constructs the internal representation of the Fitness service.

param: Google_Client $client

Class: Google_Service_Fitness_Users_Resource  - X-Ref

The "users" collection of methods.
Typical usage is:
<code>
$fitnessService = new Google_Service_Fitness(...);
$users = $fitnessService->users;
</code>

Class: Google_Service_Fitness_UsersDataSources_Resource  - X-Ref

The "dataSources" collection of methods.
Typical usage is:
<code>
$fitnessService = new Google_Service_Fitness(...);
$dataSources = $fitnessService->dataSources;
</code>

create($userId, Google_Service_Fitness_DataSource $postBody, $optParams = array()   X-Ref
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)

param: string $userId Create the data source for the person identified. Use
param: Google_DataSource $postBody
param: array $optParams Optional parameters.
return: Google_Service_Fitness_DataSource

delete($userId, $dataSourceId, $optParams = array()   X-Ref
Delete the data source if there are no datapoints associated with it
(dataSources.delete)

param: string $userId Retrieve a data source for the person identified. Use
param: string $dataSourceId The data stream ID of the data source to delete.
param: array $optParams Optional parameters.
return: Google_Service_Fitness_DataSource

get($userId, $dataSourceId, $optParams = array()   X-Ref
Returns a data source identified by a data stream ID. (dataSources.get)

param: string $userId Retrieve a data source for the person identified. Use
param: string $dataSourceId The data stream ID of the data source to
param: array $optParams Optional parameters.
return: Google_Service_Fitness_DataSource

listUsersDataSources($userId, $optParams = array()   X-Ref
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)

param: string $userId List data sources for the person identified. Use me to
param: array $optParams Optional parameters.
return: Google_Service_Fitness_ListDataSourcesResponse

patch($userId, $dataSourceId, Google_Service_Fitness_DataSource $postBody, $optParams = array()   X-Ref
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)

param: string $userId Update the data source for the person identified. Use
param: string $dataSourceId The data stream ID of the data source to update.
param: Google_DataSource $postBody
param: array $optParams Optional parameters.
return: Google_Service_Fitness_DataSource

update($userId, $dataSourceId, Google_Service_Fitness_DataSource $postBody, $optParams = array()   X-Ref
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)

param: string $userId Update the data source for the person identified. Use
param: string $dataSourceId The data stream ID of the data source to update.
param: Google_DataSource $postBody
param: array $optParams Optional parameters.
return: Google_Service_Fitness_DataSource

Class: Google_Service_Fitness_UsersDataSourcesDatasets_Resource  - X-Ref

The "datasets" collection of methods.
Typical usage is:
<code>
$fitnessService = new Google_Service_Fitness(...);
$datasets = $fitnessService->datasets;
</code>

delete($userId, $dataSourceId, $datasetId, $optParams = array()   X-Ref
Performs an inclusive delete of all data points whose start and end times
have any overlap with the time range specified by the dataset ID. For most
data types, the entire data point will be deleted. For data types where the
time span represents a consistent value (such as
com.google.activity.segment), and a data point straddles either end point of
the dataset, only the overlapping portion of the data point will be deleted.
(datasets.delete)

param: string $userId Delete a dataset for the person identified. Use me to
param: string $dataSourceId The data stream ID of the data source that
param: string $datasetId Dataset identifier that is a composite of the
param: array $optParams Optional parameters.

get($userId, $dataSourceId, $datasetId, $optParams = array()   X-Ref
Returns a dataset containing all data points whose start and end times
overlap with the specified range of the dataset minimum start time and
maximum end time. Specifically, any data point whose start time is less than
or equal to the dataset end time and whose end time is greater than or equal
to the dataset start time. (datasets.get)

param: string $userId Retrieve a dataset for the person identified. Use me to
param: string $dataSourceId The data stream ID of the data source that
param: string $datasetId Dataset identifier that is a composite of the
param: array $optParams Optional parameters.
return: Google_Service_Fitness_Dataset

patch($userId, $dataSourceId, $datasetId, Google_Service_Fitness_Dataset $postBody, $optParams = array()   X-Ref
Adds data points to a dataset. The dataset need not be previously created.
All points within the given dataset will be returned with subsquent calls to
retrieve this dataset. Data points can belong to more than one dataset. This
method does not use patch semantics. (datasets.patch)

param: string $userId Patch a dataset for the person identified. Use me to
param: string $dataSourceId The data stream ID of the data source that
param: string $datasetId Dataset identifier that is a composite of the
param: Google_Dataset $postBody
param: array $optParams Optional parameters.
return: Google_Service_Fitness_Dataset

Class: Google_Service_Fitness_UsersDataset_Resource  - X-Ref

The "dataset" collection of methods.
Typical usage is:
<code>
$fitnessService = new Google_Service_Fitness(...);
$dataset = $fitnessService->dataset;
</code>

aggregate($userId, Google_Service_Fitness_AggregateRequest $postBody, $optParams = array()   X-Ref
Aggregates data of a certain type or stream into buckets divided by a given
type of boundary. Multiple data sets of multiple types and from multiple
sources can be aggreated into exactly one bucket type per request.
(dataset.aggregate)

param: string $userId Aggregate data for the person identified. Use me to
param: Google_AggregateRequest $postBody
param: array $optParams Optional parameters.
return: Google_Service_Fitness_AggregateResponse

Class: Google_Service_Fitness_UsersSessions_Resource  - X-Ref

The "sessions" collection of methods.
Typical usage is:
<code>
$fitnessService = new Google_Service_Fitness(...);
$sessions = $fitnessService->sessions;
</code>

delete($userId, $sessionId, $optParams = array()   X-Ref
Deletes a session specified by the given session ID. (sessions.delete)

param: string $userId Delete a session for the person identified. Use me to
param: string $sessionId The ID of the session to be deleted.
param: array $optParams Optional parameters.

listUsersSessions($userId, $optParams = array()   X-Ref
Lists sessions previously created. (sessions.listUsersSessions)

param: string $userId List sessions for the person identified. Use me to
param: array $optParams Optional parameters.
return: Google_Service_Fitness_ListSessionsResponse

update($userId, $sessionId, Google_Service_Fitness_Session $postBody, $optParams = array()   X-Ref
Updates or insert a given session. (sessions.update)

param: string $userId Create sessions for the person identified. Use me to
param: string $sessionId The ID of the session to be created.
param: Google_Session $postBody
param: array $optParams Optional parameters.
return: Google_Service_Fitness_Session

Class: Google_Service_Fitness_AggregateBucket  - X-Ref

setActivity($activity)   X-Ref
No description

getActivity()   X-Ref
No description

setDataset($dataset)   X-Ref
No description

getDataset()   X-Ref
No description

setEndTimeMillis($endTimeMillis)   X-Ref
No description

getEndTimeMillis()   X-Ref
No description

setSession(Google_Service_Fitness_Session $session)   X-Ref
No description

getSession()   X-Ref
No description

setStartTimeMillis($startTimeMillis)   X-Ref
No description

getStartTimeMillis()   X-Ref
No description

setType($type)   X-Ref
No description

getType()   X-Ref
No description

Class: Google_Service_Fitness_AggregateBy  - X-Ref

setDataSourceId($dataSourceId)   X-Ref
No description

getDataSourceId()   X-Ref
No description

setDataTypeName($dataTypeName)   X-Ref
No description

getDataTypeName()   X-Ref
No description

Class: Google_Service_Fitness_AggregateRequest  - X-Ref

setAggregateBy($aggregateBy)   X-Ref
No description

getAggregateBy()   X-Ref
No description

setBucketByActivitySegment(Google_Service_Fitness_BucketByActivity $bucketByActivitySegment)   X-Ref
No description

getBucketByActivitySegment()   X-Ref
No description

setBucketByActivityType(Google_Service_Fitness_BucketByActivity $bucketByActivityType)   X-Ref
No description

getBucketByActivityType()   X-Ref
No description

setBucketBySession(Google_Service_Fitness_BucketBySession $bucketBySession)   X-Ref
No description

getBucketBySession()   X-Ref
No description

setBucketByTime(Google_Service_Fitness_BucketByTime $bucketByTime)   X-Ref
No description

getBucketByTime()   X-Ref
No description

setEndTimeMillis($endTimeMillis)   X-Ref
No description

getEndTimeMillis()   X-Ref
No description

setStartTimeMillis($startTimeMillis)   X-Ref
No description

getStartTimeMillis()   X-Ref
No description

Class: Google_Service_Fitness_AggregateResponse  - X-Ref

setBucket($bucket)   X-Ref
No description

getBucket()   X-Ref
No description

Class: Google_Service_Fitness_Application  - X-Ref

setDetailsUrl($detailsUrl)   X-Ref
No description

getDetailsUrl()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

setPackageName($packageName)   X-Ref
No description

getPackageName()   X-Ref
No description

setVersion($version)   X-Ref
No description

getVersion()   X-Ref
No description

Class: Google_Service_Fitness_DataPoint  - X-Ref

setComputationTimeMillis($computationTimeMillis)   X-Ref
No description

getComputationTimeMillis()   X-Ref
No description

setDataTypeName($dataTypeName)   X-Ref
No description

getDataTypeName()   X-Ref
No description

setEndTimeNanos($endTimeNanos)   X-Ref
No description

getEndTimeNanos()   X-Ref
No description

setModifiedTimeMillis($modifiedTimeMillis)   X-Ref
No description

getModifiedTimeMillis()   X-Ref
No description

setOriginDataSourceId($originDataSourceId)   X-Ref
No description

getOriginDataSourceId()   X-Ref
No description

setRawTimestampNanos($rawTimestampNanos)   X-Ref
No description

getRawTimestampNanos()   X-Ref
No description

setStartTimeNanos($startTimeNanos)   X-Ref
No description

getStartTimeNanos()   X-Ref
No description

setValue($value)   X-Ref
No description

getValue()   X-Ref
No description

Class: Google_Service_Fitness_DataSource  - X-Ref

setApplication(Google_Service_Fitness_Application $application)   X-Ref
No description

getApplication()   X-Ref
No description

setDataStreamId($dataStreamId)   X-Ref
No description

getDataStreamId()   X-Ref
No description

setDataStreamName($dataStreamName)   X-Ref
No description

getDataStreamName()   X-Ref
No description

setDataType(Google_Service_Fitness_DataType $dataType)   X-Ref
No description

getDataType()   X-Ref
No description

setDevice(Google_Service_Fitness_Device $device)   X-Ref
No description

getDevice()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

setType($type)   X-Ref
No description

getType()   X-Ref
No description

Class: Google_Service_Fitness_DataType  - X-Ref

setField($field)   X-Ref
No description

getField()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

Class: Google_Service_Fitness_DataTypeField  - X-Ref

setFormat($format)   X-Ref
No description

getFormat()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

setOptional($optional)   X-Ref
No description

getOptional()   X-Ref
No description

Class: Google_Service_Fitness_Dataset  - X-Ref

setDataSourceId($dataSourceId)   X-Ref
No description

getDataSourceId()   X-Ref
No description

setMaxEndTimeNs($maxEndTimeNs)   X-Ref
No description

getMaxEndTimeNs()   X-Ref
No description

setMinStartTimeNs($minStartTimeNs)   X-Ref
No description

getMinStartTimeNs()   X-Ref
No description

setNextPageToken($nextPageToken)   X-Ref
No description

getNextPageToken()   X-Ref
No description

setPoint($point)   X-Ref
No description

getPoint()   X-Ref
No description

Class: Google_Service_Fitness_Device  - X-Ref

setManufacturer($manufacturer)   X-Ref
No description

getManufacturer()   X-Ref
No description

setModel($model)   X-Ref
No description

getModel()   X-Ref
No description

setType($type)   X-Ref
No description

getType()   X-Ref
No description

setUid($uid)   X-Ref
No description

getUid()   X-Ref
No description

setVersion($version)   X-Ref
No description

getVersion()   X-Ref
No description

Class: Google_Service_Fitness_ListSessionsResponse  - X-Ref

setDeletedSession($deletedSession)   X-Ref
No description

getDeletedSession()   X-Ref
No description

setNextPageToken($nextPageToken)   X-Ref
No description

getNextPageToken()   X-Ref
No description

setSession($session)   X-Ref
No description

getSession()   X-Ref
No description

Class: Google_Service_Fitness_MapValue  - X-Ref

setFpVal($fpVal)   X-Ref
No description

getFpVal()   X-Ref
No description

Class: Google_Service_Fitness_Session  - X-Ref

setActiveTimeMillis($activeTimeMillis)   X-Ref
No description

getActiveTimeMillis()   X-Ref
No description

setActivityType($activityType)   X-Ref
No description

getActivityType()   X-Ref
No description

setApplication(Google_Service_Fitness_Application $application)   X-Ref
No description

getApplication()   X-Ref
No description

setDescription($description)   X-Ref
No description

getDescription()   X-Ref
No description

setEndTimeMillis($endTimeMillis)   X-Ref
No description

getEndTimeMillis()   X-Ref
No description

setId($id)   X-Ref
No description

getId()   X-Ref
No description

setModifiedTimeMillis($modifiedTimeMillis)   X-Ref
No description

getModifiedTimeMillis()   X-Ref
No description

setName($name)   X-Ref
No description

getName()   X-Ref
No description

setStartTimeMillis($startTimeMillis)   X-Ref
No description

getStartTimeMillis()   X-Ref
No description

Class: Google_Service_Fitness_Value  - X-Ref

setFpVal($fpVal)   X-Ref
No description

getFpVal()   X-Ref
No description

setIntVal($intVal)   X-Ref
No description

getIntVal()   X-Ref
No description

setMapVal($mapVal)   X-Ref
No description

getMapVal()   X-Ref
No description

setStringVal($stringVal)   X-Ref
No description

getStringVal()   X-Ref
No description

Class: Google_Service_Fitness_ValueMapValEntry  - X-Ref

setKey($key)   X-Ref
No description

getKey()   X-Ref
No description

setValue(Google_Service_Fitness_MapValue $value)   X-Ref
No description

getValue()   X-Ref
No description