google_api_home_graph v0.4.0 GoogleApi.HomeGraph.V1.Api.Devices View Source
API calls for all endpoints tagged Devices.
Link to this section Summary
Functions
Gets the device states for the devices in QueryRequest.
The third-party user's identity is passed in as agent_user_id. The agent
is identified by the JWT signed by the third-party partner's service
account.
Reports device state and optionally sends device notifications. Called by
an agent when the device state of a third-party changes or the agent wants
to send a notification about the device. See
Implement Report State for more
information.
This method updates a predefined set of states for a device, which all
devices have according to their prescribed traits (for example, a light
will have the OnOff trait that reports
the state on as a boolean value).
A new state may not be created and an INVALID_ARGUMENT code will be thrown
if so. It also optionally takes in a list of Notifications that may be
created, which are associated to this state change.
Requests a SYNC call from Google to a 3p partner's home control agent for
a user.
Gets all the devices associated with the given third-party user.
The third-party user's identity is passed in as agent_user_id. The agent
is identified by the JWT signed by the third-party partner's service
account.
Link to this section Functions
homegraph_devices_query(connection, optional_params \\ [], opts \\ [])
View Sourcehomegraph_devices_query(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.HomeGraph.V1.Model.QueryResponse.t()} | {:ok, Tesla.Env.t()} | {:error, Tesla.Env.t()}
Gets the device states for the devices in QueryRequest.
The third-party user's identity is passed in as agent_user_id. The agent
is identified by the JWT signed by the third-party partner's service
account.
Parameters
connection(type:GoogleApi.HomeGraph.V1.Connection.t) - Connection to serveroptional_params(type:keyword()) - Optional parameters:"$.xgafv"(type:String.t) - V1 error format.:access_token(type:String.t) - OAuth access token.:alt(type:String.t) - Data format for response.:callback(type:String.t) - JSONP:fields(type:String.t) - Selector specifying which fields to include in a partial response.:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.:oauth_token(type:String.t) - OAuth 2.0 token for the current user.:prettyPrint(type:boolean()) - Returns response with indentations and line breaks.:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart").:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart").:body(type:GoogleApi.HomeGraph.V1.Model.QueryRequest.t) -
opts(type:keyword()) - Call options
Returns
{:ok, %GoogleApi.HomeGraph.V1.Model.QueryResponse{}}on success{:error, info}on failure
homegraph_devices_report_state_and_notification(connection, optional_params \\ [], opts \\ [])
View Sourcehomegraph_devices_report_state_and_notification( Tesla.Env.client(), keyword(), keyword() ) :: {:ok, GoogleApi.HomeGraph.V1.Model.ReportStateAndNotificationResponse.t()} | {:ok, Tesla.Env.t()} | {:error, Tesla.Env.t()}
Reports device state and optionally sends device notifications. Called by
an agent when the device state of a third-party changes or the agent wants
to send a notification about the device. See
Implement Report State for more
information.
This method updates a predefined set of states for a device, which all
devices have according to their prescribed traits (for example, a light
will have the OnOff trait that reports
the state on as a boolean value).
A new state may not be created and an INVALID_ARGUMENT code will be thrown
if so. It also optionally takes in a list of Notifications that may be
created, which are associated to this state change.
The third-party user's identity is passed in as agent_user_id.
The agent is identified by the JWT signed by the partner's service account.
Parameters
connection(type:GoogleApi.HomeGraph.V1.Connection.t) - Connection to serveroptional_params(type:keyword()) - Optional parameters:"$.xgafv"(type:String.t) - V1 error format.:access_token(type:String.t) - OAuth access token.:alt(type:String.t) - Data format for response.:callback(type:String.t) - JSONP:fields(type:String.t) - Selector specifying which fields to include in a partial response.:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.:oauth_token(type:String.t) - OAuth 2.0 token for the current user.:prettyPrint(type:boolean()) - Returns response with indentations and line breaks.:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart").:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart").:body(type:GoogleApi.HomeGraph.V1.Model.ReportStateAndNotificationRequest.t) -
opts(type:keyword()) - Call options
Returns
{:ok, %GoogleApi.HomeGraph.V1.Model.ReportStateAndNotificationResponse{}}on success{:error, info}on failure
homegraph_devices_request_sync(connection, optional_params \\ [], opts \\ [])
View Sourcehomegraph_devices_request_sync(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.HomeGraph.V1.Model.RequestSyncDevicesResponse.t()} | {:ok, Tesla.Env.t()} | {:error, Tesla.Env.t()}
Requests a SYNC call from Google to a 3p partner's home control agent for
a user.
The third-party user's identity is passed in as agent_user_id
(see RequestSyncDevicesRequest) and forwarded back to the agent.
The agent is identified by the API key or JWT signed by the partner's
service account.
Parameters
connection(type:GoogleApi.HomeGraph.V1.Connection.t) - Connection to serveroptional_params(type:keyword()) - Optional parameters:"$.xgafv"(type:String.t) - V1 error format.:access_token(type:String.t) - OAuth access token.:alt(type:String.t) - Data format for response.:callback(type:String.t) - JSONP:fields(type:String.t) - Selector specifying which fields to include in a partial response.:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.:oauth_token(type:String.t) - OAuth 2.0 token for the current user.:prettyPrint(type:boolean()) - Returns response with indentations and line breaks.:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart").:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart").:body(type:GoogleApi.HomeGraph.V1.Model.RequestSyncDevicesRequest.t) -
opts(type:keyword()) - Call options
Returns
{:ok, %GoogleApi.HomeGraph.V1.Model.RequestSyncDevicesResponse{}}on success{:error, info}on failure
homegraph_devices_sync(connection, optional_params \\ [], opts \\ [])
View Sourcehomegraph_devices_sync(Tesla.Env.client(), keyword(), keyword()) :: {:ok, GoogleApi.HomeGraph.V1.Model.SyncResponse.t()} | {:ok, Tesla.Env.t()} | {:error, Tesla.Env.t()}
Gets all the devices associated with the given third-party user.
The third-party user's identity is passed in as agent_user_id. The agent
is identified by the JWT signed by the third-party partner's service
account.
Parameters
connection(type:GoogleApi.HomeGraph.V1.Connection.t) - Connection to serveroptional_params(type:keyword()) - Optional parameters:"$.xgafv"(type:String.t) - V1 error format.:access_token(type:String.t) - OAuth access token.:alt(type:String.t) - Data format for response.:callback(type:String.t) - JSONP:fields(type:String.t) - Selector specifying which fields to include in a partial response.:key(type:String.t) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.:oauth_token(type:String.t) - OAuth 2.0 token for the current user.:prettyPrint(type:boolean()) - Returns response with indentations and line breaks.:quotaUser(type:String.t) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.:uploadType(type:String.t) - Legacy upload protocol for media (e.g. "media", "multipart").:upload_protocol(type:String.t) - Upload protocol for media (e.g. "raw", "multipart").:body(type:GoogleApi.HomeGraph.V1.Model.SyncRequest.t) -
opts(type:keyword()) - Call options
Returns
{:ok, %GoogleApi.HomeGraph.V1.Model.SyncResponse{}}on success{:error, info}on failure