Class DevicesResource
The "devices" collection of methods.
Inherited Members
Namespace: Google.Apis.HomeGraphService.v1
Assembly: Google.Apis.HomeGraphService.v1.dll
Syntax
public class DevicesResource
Constructors
DevicesResource(IClientService)
Constructs a new resource.
Declaration
public DevicesResource(IClientService service)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service |
Methods
Query(QueryRequest)
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.
Declaration
public virtual DevicesResource.QueryRequest Query(QueryRequest body)
Parameters
Type | Name | Description |
---|---|---|
QueryRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
DevicesResource.QueryRequest |
ReportStateAndNotification(ReportStateAndNotificationRequest)
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 for more
information. This method updates the device state according to its declared
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). This request
must be authorized using service account credentials from your Actions console project.
Declaration
public virtual DevicesResource.ReportStateAndNotificationRequest ReportStateAndNotification(ReportStateAndNotificationRequest body)
Parameters
Type | Name | Description |
---|---|---|
ReportStateAndNotificationRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
DevicesResource.ReportStateAndNotificationRequest |
RequestSync(RequestSyncDevicesRequest)
Requests Google to send an action.devices.SYNC
intent 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.
Declaration
public virtual DevicesResource.RequestSyncRequest RequestSync(RequestSyncDevicesRequest body)
Parameters
Type | Name | Description |
---|---|---|
RequestSyncDevicesRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
DevicesResource.RequestSyncRequest |
Sync(SyncRequest)
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). This request must be authorized using service account
credentials from your Actions console project.
Declaration
public virtual DevicesResource.SyncRequest Sync(SyncRequest body)
Parameters
Type | Name | Description |
---|---|---|
SyncRequest | body | The body of the request. |
Returns
Type | Description |
---|---|
DevicesResource.SyncRequest |