Struct google_fitness1::UserMethods [] [src]

pub struct UserMethods<'a, C, A> where C: 'a, A: 'a { /* fields omitted */ }

A builder providing access to all methods supported on user resources. It is not used directly, but through the Fitness hub.

Example

Instantiate a resource builder

extern crate hyper;
extern crate yup_oauth2 as oauth2;
extern crate google_fitness1 as fitness1;
 
use std::default::Default;
use oauth2::{Authenticator, DefaultAuthenticatorDelegate, ApplicationSecret, MemoryStorage};
use fitness1::Fitness;
 
let secret: ApplicationSecret = Default::default();
let auth = Authenticator::new(&secret, DefaultAuthenticatorDelegate,
                              hyper::Client::new(),
                              <MemoryStorage as Default>::default(), None);
let mut hub = Fitness::new(hyper::Client::new(), auth);
// Usually you wouldn't bind this to a variable, but keep calling *CallBuilders*
// like `data_sources_create(...)`, `data_sources_datasets_delete(...)`, `data_sources_datasets_get(...)`, `data_sources_datasets_patch(...)`, `data_sources_delete(...)`, `data_sources_get(...)`, `data_sources_list(...)`, `data_sources_patch(...)`, `data_sources_update(...)`, `dataset_aggregate(...)`, `sessions_delete(...)`, `sessions_list(...)` and `sessions_update(...)`
// to build up your call.
let rb = hub.users();

Methods

impl<'a, C, A> UserMethods<'a, C, A>
[src]

Create a builder to help you perform the following task:

Aggregates data of a certain type or stream into buckets divided by a given type of boundary. Multiple data sets of multiple types and from multiple sources can be aggreated into exactly one bucket type per request.

Arguments

  • request - No description provided.
  • userId - Aggregate data for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

Create a builder to help you perform the following task:

Deletes the specified data source. The request will fail if the data source contains any data points.

Arguments

  • userId - Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source to delete.

Create a builder to help you perform the following task:

Returns a dataset containing all data points whose start and end times overlap with the specified range of the dataset minimum start time and maximum end time. Specifically, any data point whose start time is less than or equal to the dataset end time and whose end time is greater than or equal to the dataset start time.

Arguments

  • userId - Retrieve a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source that created the dataset.
  • datasetId - Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers.

Create a builder to help you perform the following task:

Creates a new data source that is unique across all data sources belonging to this user. The data stream ID field can be omitted and will be generated by the server with the correct format. The data stream ID is an ordered combination of some fields from the data source. In addition to the data source fields reflected into the data source ID, the developer project number that is authenticated when creating the data source is included. This developer project number is obfuscated when read by any other developer reading public data types.

Arguments

  • request - No description provided.
  • userId - Create the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

Create a builder to help you perform the following task:

Performs an inclusive delete of all data points whose start and end times have any overlap with the time range specified by the dataset ID. For most data types, the entire data point will be deleted. For data types where the time span represents a consistent value (such as com.google.activity.segment), and a data point straddles either end point of the dataset, only the overlapping portion of the data point will be deleted.

Arguments

  • userId - Delete a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source that created the dataset.
  • datasetId - Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers.

Create a builder to help you perform the following task:

Adds data points to a dataset. The dataset need not be previously created. All points within the given dataset will be returned with subsquent calls to retrieve this dataset. Data points can belong to more than one dataset. This method does not use patch semantics.

Arguments

  • request - No description provided.
  • userId - Patch a dataset for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source that created the dataset.
  • datasetId - Dataset identifier that is a composite of the minimum data point start time and maximum data point end time represented as nanoseconds from the epoch. The ID is formatted like: "startTime-endTime" where startTime and endTime are 64 bit integers.

Create a builder to help you perform the following task:

Deletes a session specified by the given session ID.

Arguments

  • userId - Delete a session for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • sessionId - The ID of the session to be deleted.

Create a builder to help you perform the following task:

Returns the specified data source.

Arguments

  • userId - Retrieve a data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source to retrieve.

Create a builder to help you perform the following task:

Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified.

Data sources are identified by their dataStreamId.

Arguments

  • request - No description provided.
  • userId - Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source to update.

Create a builder to help you perform the following task:

Lists sessions previously created.

Arguments

  • userId - List sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

Create a builder to help you perform the following task:

Updates or insert a given session.

Arguments

  • request - No description provided.
  • userId - Create sessions for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • sessionId - The ID of the session to be created.

Create a builder to help you perform the following task:

Updates the specified data source. The dataStreamId, dataType, type, dataStreamName, and device properties with the exception of version, cannot be modified.

Data sources are identified by their dataStreamId. This method supports patch semantics.

Arguments

  • request - No description provided.
  • userId - Update the data source for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.
  • dataSourceId - The data stream ID of the data source to update.

Create a builder to help you perform the following task:

Lists all data sources that are visible to the developer, using the OAuth scopes provided. The list is not exhaustive; the user may have private data sources that are only visible to other developers, or calls using other scopes.

Arguments

  • userId - List data sources for the person identified. Use me to indicate the authenticated user. Only me is supported at this time.

Trait Implementations

impl<'a, C, A> MethodsBuilder for UserMethods<'a, C, A>
[src]