Struct google_proximitybeacon1_beta1::BeaconMethods
[−]
[src]
pub struct BeaconMethods<'a, C, A> where
C: 'a,
A: 'a, { /* fields omitted */ }
A builder providing access to all methods supported on beacon resources.
It is not used directly, but through the Proximitybeacon
hub.
Example
Instantiate a resource builder
extern crate hyper; extern crate hyper_rustls; extern crate yup_oauth2 as oauth2; extern crate google_proximitybeacon1_beta1 as proximitybeacon1_beta1; use std::default::Default; use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage}; use proximitybeacon1_beta1::Proximitybeacon; let secret: ApplicationSecret = Default::default(); let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate, hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), <MemoryStorage as Default>::default(), None); let mut hub = Proximitybeacon::new(hyper::Client::with_connector(hyper::net::HttpsConnector::new(hyper_rustls::TlsClient::new())), auth); // Usually you wouldn't bind this to a variable, but keep calling *CallBuilders* // like `activate(...)`, `attachments_batch_delete(...)`, `attachments_create(...)`, `attachments_delete(...)`, `attachments_list(...)`, `deactivate(...)`, `decommission(...)`, `delete(...)`, `diagnostics_list(...)`, `get(...)`, `list(...)`, `register(...)` and `update(...)` // to build up your call. let rb = hub.beacons();
Methods
impl<'a, C, A> BeaconMethods<'a, C, A>
[src]
fn attachments_list(
&self,
beacon_name: &str
) -> BeaconAttachmentListCall<'a, C, A>
&self,
beacon_name: &str
) -> BeaconAttachmentListCall<'a, C, A>
Create a builder to help you perform the following task:
Returns the attachments for the specified beacon that match the specified namespaced-type pattern.
To control which namespaced types are returned, you add the
namespacedType
query parameter to the request. You must either use
*/*
, to return all attachments, or the namespace must be one of
the ones returned from the namespaces
endpoint.
Authenticate using an OAuth access token from a signed-in user with viewer, Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- Beacon whose attachments should be fetched. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.
fn get(&self, beacon_name: &str) -> BeaconGetCall<'a, C, A>
Create a builder to help you perform the following task:
Returns detailed information about the specified beacon.
Authenticate using an OAuth access token from a signed-in user with viewer, Is owner or Can edit permissions in the Google Developers Console project.
Requests may supply an Eddystone-EID beacon name in the form:
beacons/4!beaconId
where the beaconId
is the base16 ephemeral ID
broadcast by the beacon. The returned Beacon
object will contain the
beacon's stable Eddystone-UID. Clients not authorized to resolve the
beacon's ephemeral Eddystone-EID broadcast will receive an error.
Arguments
beaconName
- Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.
fn attachments_create(
&self,
request: BeaconAttachment,
beacon_name: &str
) -> BeaconAttachmentCreateCall<'a, C, A>
&self,
request: BeaconAttachment,
beacon_name: &str
) -> BeaconAttachmentCreateCall<'a, C, A>
Create a builder to help you perform the following task:
Associates the given data with the specified beacon. Attachment data must contain two parts:
- A namespaced type.
- The actual attachment data itself.
namespaces
endpoint, while the type can be a string of any characters except for the
forward slash (/
) up to 100 characters in length.
Attachment data can be up to 1024 bytes long.
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
request
- No description provided.beaconName
- Beacon on which the attachment should be created. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.
fn decommission(&self, beacon_name: &str) -> BeaconDecommissionCall<'a, C, A>
Create a builder to help you perform the following task:
Decommissions the specified beacon in the service. This beacon will no
longer be returned from beaconinfo.getforobserved
. This operation is
permanent -- you will not be able to re-register a beacon with this ID
again.
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- Beacon that should be decommissioned. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID of the beacon's "stable" UID. Required.
fn activate(&self, beacon_name: &str) -> BeaconActivateCall<'a, C, A>
Create a builder to help you perform the following task:
Activates a beacon. A beacon that is active will return information
and attachment data when queried via beaconinfo.getforobserved
.
Calling this method on an already active beacon will do nothing (but
will return a successful response code).
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- Beacon that should be activated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.
fn list(&self) -> BeaconListCall<'a, C, A>
Create a builder to help you perform the following task:
Searches the beacon registry for beacons that match the given search criteria. Only those beacons that the client has permission to list will be returned.
Authenticate using an OAuth access token from a signed-in user with viewer, Is owner or Can edit permissions in the Google Developers Console project.
fn update(
&self,
request: Beacon,
beacon_name: &str
) -> BeaconUpdateCall<'a, C, A>
&self,
request: Beacon,
beacon_name: &str
) -> BeaconUpdateCall<'a, C, A>
Create a builder to help you perform the following task:
Updates the information about the specified beacon. Any field that you do not populate in the submitted beacon will be permanently erased, so you should follow the "read, modify, write" pattern to avoid inadvertently destroying data.
Changes to the beacon status via this method will be silently ignored. To update beacon status, use the separate methods on this API for activation, deactivation, and decommissioning. Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
request
- No description provided.beaconName
- Resource name of this beacon. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone,1
for iBeacon, or5
for AltBeacon. This field must be left empty when registering. After reading a beacon, clients can use the name for future operations.
fn attachments_delete(
&self,
attachment_name: &str
) -> BeaconAttachmentDeleteCall<'a, C, A>
&self,
attachment_name: &str
) -> BeaconAttachmentDeleteCall<'a, C, A>
Create a builder to help you perform the following task:
Deletes the specified attachment for the given beacon. Each attachment has
a unique attachment name (attachmentName
) which is returned when you
fetch the attachment data via this API. You specify this with the delete
request to control which attachment is removed. This operation cannot be
undone.
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
attachmentName
- The attachment name (attachmentName
) of the attachment to remove. For example:beacons/3!893737abc9/attachments/c5e937-af0-494-959-ec49d12738
. For Eddystone-EID beacons, the beacon ID portion (3!893737abc9
) may be the beacon's current EID, or its "stable" Eddystone-UID. Required.
fn deactivate(&self, beacon_name: &str) -> BeaconDeactivateCall<'a, C, A>
Create a builder to help you perform the following task:
Deactivates a beacon. Once deactivated, the API will not return
information nor attachment data for the beacon when queried via
beaconinfo.getforobserved
. Calling this method on an already inactive
beacon will do nothing (but will return a successful response code).
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- Beacon that should be deactivated. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.
fn register(&self, request: Beacon) -> BeaconRegisterCall<'a, C, A>
Create a builder to help you perform the following task:
Registers a previously unregistered beacon given its advertisedId
.
These IDs are unique within the system. An ID can be registered only once.
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
request
- No description provided.
fn delete(&self, beacon_name: &str) -> BeaconDeleteCall<'a, C, A>
Create a builder to help you perform the following task:
Deletes the specified beacon including all diagnostics data for the beacon as well as any attachments on the beacon (including those belonging to other projects). This operation cannot be undone.
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- Beacon that should be deleted. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.
fn diagnostics_list(
&self,
beacon_name: &str
) -> BeaconDiagnosticListCall<'a, C, A>
&self,
beacon_name: &str
) -> BeaconDiagnosticListCall<'a, C, A>
Create a builder to help you perform the following task:
List the diagnostics for a single beacon. You can also list diagnostics for
all the beacons owned by your Google Developers Console project by using
the beacon name beacons/-
.
Authenticate using an OAuth access token from a signed-in user with viewer, Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- Beacon that the diagnostics are for.
fn attachments_batch_delete(
&self,
beacon_name: &str
) -> BeaconAttachmentBatchDeleteCall<'a, C, A>
&self,
beacon_name: &str
) -> BeaconAttachmentBatchDeleteCall<'a, C, A>
Create a builder to help you perform the following task:
Deletes multiple attachments on a given beacon. This operation is permanent and cannot be undone.
You can optionally specify namespacedType
to choose which attachments
should be deleted. If you do not specify namespacedType
, all your
attachments on the given beacon will be deleted. You also may explicitly
specify */*
to delete all.
Authenticate using an OAuth access token from a signed-in user with Is owner or Can edit permissions in the Google Developers Console project.
Arguments
beaconName
- The beacon whose attachments should be deleted. A beacon name has the format "beacons/N!beaconId" where the beaconId is the base16 ID broadcast by the beacon and N is a code for the beacon's type. Possible values are3
for Eddystone-UID,4
for Eddystone-EID,1
for iBeacon, or5
for AltBeacon. For Eddystone-EID beacons, you may use either the current EID or the beacon's "stable" UID. Required.