Google_Service_HomeGraphService_Resource_Devices
extends Google_Service_Resource
in package
The "devices" collection of methods.
Typical usage is:
$homegraphService = new Google_Service_HomeGraphService(...);
$devices = $homegraphService->devices;
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.
- createRequestUri() : string
- Parse/expand request parameters and create a fully qualified request uri.
- query() : Google_Service_HomeGraphService_QueryResponse
- Gets the current states in Home Graph for the given set of the third-party user's devices. The third-party user's identity is passed in via the `agent_user_id` (see QueryRequest). This request must be authorized using service account credentials from your Actions console project.
- reportStateAndNotification() : Google_Service_HomeGraphService_ReportStateAndNotificationResponse
- Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See [Implement Report State](https://developers.google.com/assistant/smarthome/develop/report- state) for more information. This method updates the device state according to its declared [traits](https://developers.google.com/assistant/smarthome/concepts/devices- traits). Publishing a new state value outside of these traits will result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest).
- requestSync() : Google_Service_HomeGraphService_RequestSyncDevicesResponse
- Requests Google to send an `action.devices.SYNC` [intent](https://developers.
- sync() : Google_Service_HomeGraphService_SyncResponse
- Gets all the devices associated with the given third-party user. The third- party user's identity is passed in via the `agent_user_id` (see SyncRequest).
- convertToArrayAndStripNulls() : mixed
Properties
$client
private
Google_Client
$client
$methods
private
array<string|int, mixed>
$methods
$resourceName
private
string
$resourceName
$rootUrl
private
string
$rootUrl
$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
Tags
Return values
Google_Http_Request|expectedClass —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
Return values
string —$requestUrl
query()
Gets the current states in Home Graph for the given set of the third-party user's devices. The third-party user's identity is passed in via the `agent_user_id` (see QueryRequest). This request must be authorized using service account credentials from your Actions console project.
public
query(Google_Service_HomeGraphService_QueryRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_HomeGraphService_QueryResponse
(devices.query)
Parameters
- $postBody : Google_Service_HomeGraphService_QueryRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_HomeGraphService_QueryResponse —reportStateAndNotification()
Reports device state and optionally sends device notifications. Called by your smart home Action when the state of a third-party device changes or you need to send a notification about the device. See [Implement Report State](https://developers.google.com/assistant/smarthome/develop/report- state) for more information. This method updates the device state according to its declared [traits](https://developers.google.com/assistant/smarthome/concepts/devices- traits). Publishing a new state value outside of these traits will result in an `INVALID_ARGUMENT` error response. The third-party user's identity is passed in via the `agent_user_id` (see ReportStateAndNotificationRequest).
public
reportStateAndNotification(Google_Service_HomeGraphService_ReportStateAndNotificationRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_HomeGraphService_ReportStateAndNotificationResponse
This request must be authorized using service account credentials from your Actions console project. (devices.reportStateAndNotification)
Parameters
- $postBody : Google_Service_HomeGraphService_ReportStateAndNotificationRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_HomeGraphService_ReportStateAndNotificationResponse —requestSync()
Requests Google to send an `action.devices.SYNC` [intent](https://developers.
public
requestSync(Google_Service_HomeGraphService_RequestSyncDevicesRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_HomeGraphService_RequestSyncDevicesResponse
google.com/assistant/smarthome/reference/intent/sync) to your smart home
Action to update device metadata for the given user. The third-party user's
identity is passed via the agent_user_id (see RequestSyncDevicesRequest).
This request must be authorized using service account credentials from your
Actions console project. (devices.requestSync)
Parameters
- $postBody : Google_Service_HomeGraphService_RequestSyncDevicesRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_HomeGraphService_RequestSyncDevicesResponse —sync()
Gets all the devices associated with the given third-party user. The third- party user's identity is passed in via the `agent_user_id` (see SyncRequest).
public
sync(Google_Service_HomeGraphService_SyncRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_HomeGraphService_SyncResponse
This request must be authorized using service account credentials from your Actions console project. (devices.sync)
Parameters
- $postBody : Google_Service_HomeGraphService_SyncRequest
- $optParams : array<string|int, mixed> = array()
-
Optional parameters.
Return values
Google_Service_HomeGraphService_SyncResponse —convertToArrayAndStripNulls()
protected
convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
- $o : mixed