pub struct BeaconListCall<'a, S>
where S: 'a,
{ /* private fields */ }
Expand description

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.

A builder for the list method supported by a beacon resource. It is not used directly, but through a BeaconMethods instance.

§Example

Instantiate a resource method builder

 
// You can configure optional parameters by calling the respective setters at will, and
// execute the final call using `doit()`.
// Values shown here are possibly random and not representative !
let result = hub.beacons().list()
             .q("sed")
             .project_id("no")
             .page_token("Stet")
             .page_size(-13)
             .doit().await;

Implementations§

source§

impl<'a, S> BeaconListCall<'a, S>
where S: Service<Uri> + Clone + Send + Sync + 'static, S::Response: Connection + AsyncRead + AsyncWrite + Send + Unpin + 'static, S::Future: Send + Unpin + 'static, S::Error: Into<Box<dyn StdError + Send + Sync>>,

source

pub async fn doit(self) -> Result<(Response<Body>, ListBeaconsResponse)>

Perform the operation you have build so far.

source

pub fn q(self, new_value: &str) -> BeaconListCall<'a, S>

Filter query string that supports the following field filters:

  • description:"<string>" For example: description:“Room 3” Returns beacons whose description matches tokens in the string “Room 3” (not necessarily that exact string). The string must be double-quoted.
  • status:<enum> For example: status:active Returns beacons whose status matches the given value. Values must be one of the Beacon.Status enum values (case insensitive). Accepts multiple filters which will be combined with OR logic.
  • stability:<enum> For example: stability:mobile Returns beacons whose expected stability matches the given value. Values must be one of the Beacon.Stability enum values (case insensitive). Accepts multiple filters which will be combined with OR logic.
  • place_id:"<string>" For example: place_id:“ChIJVSZzVR8FdkgRXGmmm6SslKw=” Returns beacons explicitly registered at the given place, expressed as a Place ID obtained from Google Places API. Does not match places inside the given place. Does not consider the beacon’s actual location (which may be different from its registered place). Accepts multiple filters that will be combined with OR logic. The place ID must be double-quoted.
  • registration_time[<|>|<=|>=]<integer> For example: registration_time>=1433116800 Returns beacons whose registration time matches the given filter. Supports the operators: <, >, <=, and >=. Timestamp must be expressed as an integer number of seconds since midnight January 1, 1970 UTC. Accepts at most two filters that will be combined with AND logic, to support “between” semantics. If more than two are supplied, the latter ones are ignored.
  • lat:<double> lng:<double> radius:<integer> For example: lat:51.1232343 lng:-1.093852 radius:1000 Returns beacons whose registered location is within the given circle. When any of these fields are given, all are required. Latitude and longitude must be decimal degrees between -90.0 and 90.0 and between -180.0 and 180.0 respectively. Radius must be an integer number of meters between 10 and 1,000,000 (1000 km).
  • property:"<string>=<string>" For example: property:“battery-type=CR2032” Returns beacons which have a property of the given name and value. Supports multiple filters which will be combined with OR logic. The entire name=value string must be double-quoted as one string.
  • attachment_type:"<string>" For example: attachment_type:“my-namespace/my-type” Returns beacons having at least one attachment of the given namespaced type. Supports “any within this namespace” via the partial wildcard syntax: “my-namespace/*”. Supports multiple filters which will be combined with OR logic. The string must be double-quoted.
  • indoor_level:"<string>" For example: indoor_level:“1” Returns beacons which are located on the given indoor level. Accepts multiple filters that will be combined with OR logic.

Multiple filters on the same field are combined with OR logic (except registration_time which is combined with AND logic). Multiple filters on different fields are combined with AND logic. Filters should be separated by spaces.

As with any HTTP query string parameter, the whole filter expression must be URL-encoded.

Example REST request: GET /v1beta1/beacons?q=status:active%20lat:51.123%20lng:-1.095%20radius:1000

Sets the q query property to the given value.

source

pub fn project_id(self, new_value: &str) -> BeaconListCall<'a, S>

The project id to list beacons under. If not present then the project credential that made the request is used as the project. Optional.

Sets the project id query property to the given value.

source

pub fn page_token(self, new_value: &str) -> BeaconListCall<'a, S>

A pagination token obtained from a previous request to list beacons.

Sets the page token query property to the given value.

source

pub fn page_size(self, new_value: i32) -> BeaconListCall<'a, S>

The maximum number of records to return for this request, up to a server-defined upper limit.

Sets the page size query property to the given value.

source

pub fn delegate(self, new_value: &'a mut dyn Delegate) -> BeaconListCall<'a, S>

The delegate implementation is consulted whenever there is an intermediate result, or if something goes wrong while executing the actual API request.

                  It should be used to handle progress information, and to implement a certain level of resilience.

Sets the delegate property to the given value.

source

pub fn param<T>(self, name: T, value: T) -> BeaconListCall<'a, S>
where T: AsRef<str>,

Set any additional parameter of the query string used in the request. It should be used to set parameters which are not yet available through their own setters.

Please note that this method must not be used to set any of the known parameters which have their own setter method. If done anyway, the request will fail.

§Additional Parameters
  • $.xgafv (query-string) - V1 error format.
  • access_token (query-string) - OAuth access token.
  • alt (query-string) - Data format for response.
  • callback (query-string) - JSONP
  • fields (query-string) - Selector specifying which fields to include in a partial response.
  • key (query-string) - 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 (query-string) - OAuth 2.0 token for the current user.
  • prettyPrint (query-boolean) - Returns response with indentations and line breaks.
  • quotaUser (query-string) - 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 (query-string) - Legacy upload protocol for media (e.g. “media”, “multipart”).
  • upload_protocol (query-string) - Upload protocol for media (e.g. “raw”, “multipart”).
source

pub fn add_scope<St>(self, scope: St) -> BeaconListCall<'a, S>
where St: AsRef<str>,

Identifies the authorization scope for the method you are building.

Use this method to actively specify which scope should be used, instead of the default Scope variant Scope::UserlocationBeaconRegistry.

The scope will be added to a set of scopes. This is important as one can maintain access tokens for more than one scope.

Usually there is more than one suitable scope to authorize an operation, some of which may encompass more rights than others. For example, for listing resources, a read-only scope will be sufficient, a read-write scope will do as well.

source

pub fn add_scopes<I, St>(self, scopes: I) -> BeaconListCall<'a, S>
where I: IntoIterator<Item = St>, St: AsRef<str>,

Identifies the authorization scope(s) for the method you are building.

See Self::add_scope() for details.

source

pub fn clear_scopes(self) -> BeaconListCall<'a, S>

Removes all scopes, and no default scope will be used either. In this case, you have to specify your API-key using the key parameter (see Self::param() for details).

Trait Implementations§

source§

impl<'a, S> CallBuilder for BeaconListCall<'a, S>

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for BeaconListCall<'a, S>

§

impl<'a, S> Send for BeaconListCall<'a, S>
where S: Sync,

§

impl<'a, S> !Sync for BeaconListCall<'a, S>

§

impl<'a, S> Unpin for BeaconListCall<'a, S>

§

impl<'a, S> !UnwindSafe for BeaconListCall<'a, S>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more