Files
google-apis-rs/google_analytics3/index.html
2021-04-02 00:20:57 +08:00

177 lines
31 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="API documentation for the Rust `google_analytics3` crate."><meta name="keywords" content="rust, rustlang, rust-lang, google_analytics3"><title>google_analytics3 - Rust</title><link rel="stylesheet" type="text/css" href="../normalize.css"><link rel="stylesheet" type="text/css" href="../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../ayu.css" disabled ><script id="default-settings"></script><script src="../storage.js"></script><noscript><link rel="stylesheet" href="../noscript.css"></noscript><link rel="icon" type="image/svg+xml" href="../favicon.svg">
<link rel="alternate icon" type="image/png" href="../favicon-16x16.png">
<link rel="alternate icon" type="image/png" href="../favicon-32x32.png"><style type="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../google_analytics3/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate google_analytics3</p><div class="block version"><p>Version 2.0.0+20190807</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all google_analytics3's items</p></a><div class="block items"><ul><li><a href="#reexports">Re-exports</a></li><li><a href="#modules">Modules</a></li></ul></div><p class="location"></p><div id="sidebar-vars" data-name="google_analytics3" data-ty="mod" data-relpath="../"></div></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu"><img src="../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices" role="menu"></div></div><script src="../theme.js"></script><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" disabled autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" class="help-button">?</button>
<a id="settings-menu" href="../settings.html"><img src="../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Crate <a class="mod" href="">google_analytics3</a></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../src/google_analytics3/lib.rs.html#5-230" title="goto source code">[src]</a></span></h1><div class="docblock"><p>This documentation was generated from <em>analytics</em> crate version <em>2.0.0+20190807</em>, where <em>20190807</em> is the exact revision of the <em>analytics:v3</em> schema built by the <a href="http://www.makotemplates.org/">mako</a> code generator <em>v2.0.0</em>.</p>
<p>Everything else about the <em>analytics</em> <em>v3</em> API can be found at the
<a href="https://developers.google.com/analytics/">official documentation site</a>.
The original source code is <a href="https://github.com/Byron/google-apis-rs/tree/master/gen/analytics3">on github</a>.</p>
<h1 id="features" class="section-header"><a href="#features">Features</a></h1>
<p>Handle the following <em>Resources</em> with ease from the central <a href="../google_analytics3/api/struct.Analytics.html">hub</a> ... </p>
<ul>
<li>data</li>
<li><a href="../google_analytics3/api/struct.DataGaGetCall.html"><em>ga get</em></a>, <a href="../google_analytics3/api/struct.DataMcfGetCall.html"><em>mcf get</em></a> and <a href="../google_analytics3/api/struct.DataRealtimeGetCall.html"><em>realtime get</em></a></li>
<li>management</li>
<li><a href="../google_analytics3/api/struct.ManagementAccountSummaryListCall.html"><em>account summaries list</em></a>, <a href="../google_analytics3/api/struct.ManagementAccountUserLinkDeleteCall.html"><em>account user links delete</em></a>, <a href="../google_analytics3/api/struct.ManagementAccountUserLinkInsertCall.html"><em>account user links insert</em></a>, <a href="../google_analytics3/api/struct.ManagementAccountUserLinkListCall.html"><em>account user links list</em></a>, <a href="../google_analytics3/api/struct.ManagementAccountUserLinkUpdateCall.html"><em>account user links update</em></a>, <a href="../google_analytics3/api/struct.ManagementAccountListCall.html"><em>accounts list</em></a>, <a href="../google_analytics3/api/struct.ManagementClientIdHashClientIdCall.html"><em>client id hash client id</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomDataSourceListCall.html"><em>custom data sources list</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomDimensionGetCall.html"><em>custom dimensions get</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomDimensionInsertCall.html"><em>custom dimensions insert</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomDimensionListCall.html"><em>custom dimensions list</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomDimensionPatchCall.html"><em>custom dimensions patch</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomDimensionUpdateCall.html"><em>custom dimensions update</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomMetricGetCall.html"><em>custom metrics get</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomMetricInsertCall.html"><em>custom metrics insert</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomMetricListCall.html"><em>custom metrics list</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomMetricPatchCall.html"><em>custom metrics patch</em></a>, <a href="../google_analytics3/api/struct.ManagementCustomMetricUpdateCall.html"><em>custom metrics update</em></a>, <a href="../google_analytics3/api/struct.ManagementExperimentDeleteCall.html"><em>experiments delete</em></a>, <a href="../google_analytics3/api/struct.ManagementExperimentGetCall.html"><em>experiments get</em></a>, <a href="../google_analytics3/api/struct.ManagementExperimentInsertCall.html"><em>experiments insert</em></a>, <a href="../google_analytics3/api/struct.ManagementExperimentListCall.html"><em>experiments list</em></a>, <a href="../google_analytics3/api/struct.ManagementExperimentPatchCall.html"><em>experiments patch</em></a>, <a href="../google_analytics3/api/struct.ManagementExperimentUpdateCall.html"><em>experiments update</em></a>, <a href="../google_analytics3/api/struct.ManagementFilterDeleteCall.html"><em>filters delete</em></a>, <a href="../google_analytics3/api/struct.ManagementFilterGetCall.html"><em>filters get</em></a>, <a href="../google_analytics3/api/struct.ManagementFilterInsertCall.html"><em>filters insert</em></a>, <a href="../google_analytics3/api/struct.ManagementFilterListCall.html"><em>filters list</em></a>, <a href="../google_analytics3/api/struct.ManagementFilterPatchCall.html"><em>filters patch</em></a>, <a href="../google_analytics3/api/struct.ManagementFilterUpdateCall.html"><em>filters update</em></a>, <a href="../google_analytics3/api/struct.ManagementGoalGetCall.html"><em>goals get</em></a>, <a href="../google_analytics3/api/struct.ManagementGoalInsertCall.html"><em>goals insert</em></a>, <a href="../google_analytics3/api/struct.ManagementGoalListCall.html"><em>goals list</em></a>, <a href="../google_analytics3/api/struct.ManagementGoalPatchCall.html"><em>goals patch</em></a>, <a href="../google_analytics3/api/struct.ManagementGoalUpdateCall.html"><em>goals update</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileFilterLinkDeleteCall.html"><em>profile filter links delete</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileFilterLinkGetCall.html"><em>profile filter links get</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileFilterLinkInsertCall.html"><em>profile filter links insert</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileFilterLinkListCall.html"><em>profile filter links list</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileFilterLinkPatchCall.html"><em>profile filter links patch</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileFilterLinkUpdateCall.html"><em>profile filter links update</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileUserLinkDeleteCall.html"><em>profile user links delete</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileUserLinkInsertCall.html"><em>profile user links insert</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileUserLinkListCall.html"><em>profile user links list</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileUserLinkUpdateCall.html"><em>profile user links update</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileDeleteCall.html"><em>profiles delete</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileGetCall.html"><em>profiles get</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileInsertCall.html"><em>profiles insert</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileListCall.html"><em>profiles list</em></a>, <a href="../google_analytics3/api/struct.ManagementProfilePatchCall.html"><em>profiles patch</em></a>, <a href="../google_analytics3/api/struct.ManagementProfileUpdateCall.html"><em>profiles update</em></a>, <a href="../google_analytics3/api/struct.ManagementRemarketingAudienceDeleteCall.html"><em>remarketing audience delete</em></a>, <a href="../google_analytics3/api/struct.ManagementRemarketingAudienceGetCall.html"><em>remarketing audience get</em></a>, <a href="../google_analytics3/api/struct.ManagementRemarketingAudienceInsertCall.html"><em>remarketing audience insert</em></a>, <a href="../google_analytics3/api/struct.ManagementRemarketingAudienceListCall.html"><em>remarketing audience list</em></a>, <a href="../google_analytics3/api/struct.ManagementRemarketingAudiencePatchCall.html"><em>remarketing audience patch</em></a>, <a href="../google_analytics3/api/struct.ManagementRemarketingAudienceUpdateCall.html"><em>remarketing audience update</em></a>, <a href="../google_analytics3/api/struct.ManagementSegmentListCall.html"><em>segments list</em></a>, <a href="../google_analytics3/api/struct.ManagementUnsampledReportDeleteCall.html"><em>unsampled reports delete</em></a>, <a href="../google_analytics3/api/struct.ManagementUnsampledReportGetCall.html"><em>unsampled reports get</em></a>, <a href="../google_analytics3/api/struct.ManagementUnsampledReportInsertCall.html"><em>unsampled reports insert</em></a>, <a href="../google_analytics3/api/struct.ManagementUnsampledReportListCall.html"><em>unsampled reports list</em></a>, <a href="../google_analytics3/api/struct.ManagementUploadDeleteUploadDataCall.html"><em>uploads delete upload data</em></a>, <a href="../google_analytics3/api/struct.ManagementUploadGetCall.html"><em>uploads get</em></a>, <a href="../google_analytics3/api/struct.ManagementUploadListCall.html"><em>uploads list</em></a>, <a href="../google_analytics3/api/struct.ManagementUploadUploadDataCall.html"><em>uploads upload data</em></a>, <a href="../google_analytics3/api/struct.ManagementWebPropertyAdWordsLinkDeleteCall.html"><em>web property ad words links delete</em></a>, <a href="../google_analytics3/api/struct.ManagementWebPropertyAdWordsLinkGetCall.html"><em>web property ad words links get</em></a>, <a href="../google_analytics3/api/struct.ManagementWebPropertyAdWordsLinkInsertCall.html"><em>web property ad words links insert</em></a>, <a href="../google_analytics3/api/struct.ManagementWebPropertyAdWordsLinkListCall.html"><em>web property ad words links list</em></a>, <a href="../google_analytics3/api/struct.ManagementWebPropertyAdWordsLinkPatchCall.html"><em>web property ad words links patch</em></a>, <a href="../google_analytics3/api/struct.ManagementWebPropertyAdWordsLinkUpdateCall.html"><em>web property ad words links update</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyGetCall.html"><em>webproperties get</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyInsertCall.html"><em>webproperties insert</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyListCall.html"><em>webproperties list</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyPatchCall.html"><em>webproperties patch</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyUpdateCall.html"><em>webproperties update</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyUserLinkDeleteCall.html"><em>webproperty user links delete</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyUserLinkInsertCall.html"><em>webproperty user links insert</em></a>, <a href="../google_analytics3/api/struct.ManagementWebpropertyUserLinkListCall.html"><em>webproperty user links list</em></a> and <a href="../google_analytics3/api/struct.ManagementWebpropertyUserLinkUpdateCall.html"><em>webproperty user links update</em></a></li>
<li>metadata</li>
<li><a href="../google_analytics3/api/struct.MetadataColumnListCall.html"><em>columns list</em></a></li>
<li>provisioning</li>
<li><a href="../google_analytics3/api/struct.ProvisioningCreateAccountTicketCall.html"><em>create account ticket</em></a> and <a href="../google_analytics3/api/struct.ProvisioningCreateAccountTreeCall.html"><em>create account tree</em></a></li>
<li>user deletion</li>
<li><a href="../google_analytics3/api/struct.UserDeletionUserDeletionRequestUpsertCall.html"><em>user deletion request upsert</em></a></li>
</ul>
<p>Upload supported by ...</p>
<ul>
<li><a href="../google_analytics3/api/struct.ManagementUploadUploadDataCall.html"><em>uploads upload data management</em></a></li>
</ul>
<p>Not what you are looking for ? Find all other Google APIs in their Rust <a href="http://byron.github.io/google-apis-rs">documentation index</a>.</p>
<h1 id="structure-of-this-library" class="section-header"><a href="#structure-of-this-library">Structure of this Library</a></h1>
<p>The API is structured into the following primary items:</p>
<ul>
<li><strong><a href="../google_analytics3/api/struct.Analytics.html">Hub</a></strong>
<ul>
<li>a central object to maintain state and allow accessing all <em>Activities</em></li>
<li>creates <a href="../google_analytics3/client/trait.MethodsBuilder.html"><em>Method Builders</em></a> which in turn
allow access to individual <a href="../google_analytics3/client/trait.CallBuilder.html"><em>Call Builders</em></a></li>
</ul>
</li>
<li><strong><a href="../google_analytics3/client/trait.Resource.html">Resources</a></strong>
<ul>
<li>primary types that you can apply <em>Activities</em> to</li>
<li>a collection of properties and <em>Parts</em></li>
<li><strong><a href="../google_analytics3/client/trait.Part.html">Parts</a></strong>
<ul>
<li>a collection of properties</li>
<li>never directly used in <em>Activities</em></li>
</ul>
</li>
</ul>
</li>
<li><strong><a href="../google_analytics3/client/trait.CallBuilder.html">Activities</a></strong>
<ul>
<li>operations to apply to <em>Resources</em></li>
</ul>
</li>
</ul>
<p>All <em>structures</em> are marked with applicable traits to further categorize them and ease browsing.</p>
<p>Generally speaking, you can invoke <em>Activities</em> like this:</p>
<pre><code class="language-Rust,ignore">let r = hub.resource().activity(...).doit().await
</code></pre>
<p>Or specifically ...</p>
<div class='information'><div class='tooltip ignore'></div></div><div class="example-wrap"><pre class="rust rust-example-rendered ignore">
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">account_user_links_insert</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">account_user_links_update</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">profile_user_links_insert</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">profile_user_links_update</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">webproperty_user_links_insert</span>(...).<span class="ident">doit</span>().<span class="kw">await</span>
<span class="kw">let</span> <span class="ident">r</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">webproperty_user_links_update</span>(...).<span class="ident">doit</span>().<span class="kw">await</span></pre></div>
<p>The <code>resource()</code> and <code>activity(...)</code> calls create <a href="http://en.wikipedia.org/wiki/Builder_pattern">builders</a>. The second one dealing with <code>Activities</code>
supports various methods to configure the impending operation (not shown here). It is made such that all required arguments have to be
specified right away (i.e. <code>(...)</code>), whereas all optional ones can be <a href="http://en.wikipedia.org/wiki/Builder_pattern">build up</a> as desired.
The <code>doit()</code> method performs the actual communication with the server and returns the respective result.</p>
<h1 id="usage" class="section-header"><a href="#usage">Usage</a></h1><h2 id="setting-up-your-project" class="section-header"><a href="#setting-up-your-project">Setting up your Project</a></h2>
<p>To use this library, you would put the following lines into your <code>Cargo.toml</code> file:</p>
<pre><code class="language-toml">[dependencies]
google-analytics3 = &quot;*&quot;
# This project intentionally uses an old version of Hyper. See
# https://github.com/Byron/google-apis-rs/issues/173 for more
# information.
hyper = &quot;^0.14&quot;
hyper-rustls = &quot;^0.22&quot;
serde = &quot;^1.0&quot;
serde_json = &quot;^1.0&quot;
yup-oauth2 = &quot;^5.0&quot;
</code></pre>
<h2 id="a-complete-example" class="section-header"><a href="#a-complete-example">A complete example</a></h2>
<div class="example-wrap"><pre class="rust rust-example-rendered">
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">hyper</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">hyper_rustls</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">yup_oauth2</span> <span class="kw">as</span> <span class="ident">oauth2</span>;
<span class="kw">extern</span> <span class="kw">crate</span> <span class="ident">google_analytics3</span> <span class="kw">as</span> <span class="ident">analytics3</span>;
<span class="kw">use</span> <span class="ident">analytics3</span>::<span class="ident">api</span>::<span class="ident">EntityUserLink</span>;
<span class="kw">use</span> <span class="ident">analytics3</span>::{<span class="prelude-ty">Result</span>, <span class="ident">Error</span>};
<span class="kw">use</span> <span class="ident">std</span>::<span class="ident">default</span>::<span class="ident">Default</span>;
<span class="kw">use</span> <span class="ident">oauth2</span>;
<span class="kw">use</span> <span class="ident">analytics3</span>::<span class="ident">Analytics</span>;
<span class="comment">// Get an ApplicationSecret instance by some means. It contains the `client_id` and </span>
<span class="comment">// `client_secret`, among other things.</span>
<span class="kw">let</span> <span class="ident">secret</span>: <span class="ident">oauth2</span>::<span class="ident">ApplicationSecret</span> <span class="op">=</span> <span class="ident">Default</span>::<span class="ident">default</span>();
<span class="comment">// Instantiate the authenticator. It will choose a suitable authentication flow for you, </span>
<span class="comment">// unless you replace `None` with the desired Flow.</span>
<span class="comment">// Provide your own `AuthenticatorDelegate` to adjust the way it operates and get feedback about </span>
<span class="comment">// what&#39;s going on. You probably want to bring in your own `TokenStorage` to persist tokens and</span>
<span class="comment">// retrieve them from storage.</span>
<span class="kw">let</span> <span class="ident">auth</span> <span class="op">=</span> <span class="ident">yup_oauth2</span>::<span class="ident">InstalledFlowAuthenticator</span>::<span class="ident">builder</span>(
<span class="ident">secret</span>,
<span class="ident">yup_oauth2</span>::<span class="ident">InstalledFlowReturnMethod</span>::<span class="ident">HTTPRedirect</span>,
).<span class="ident">build</span>().<span class="kw">await</span>.<span class="ident">unwrap</span>();
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">hub</span> <span class="op">=</span> <span class="ident">Analytics</span>::<span class="ident">new</span>(<span class="ident">hyper</span>::<span class="ident">Client</span>::<span class="ident">builder</span>().<span class="ident">build</span>(<span class="ident">hyper_rustls</span>::<span class="ident">HttpsConnector</span>::<span class="ident">with_native_roots</span>()), <span class="ident">auth</span>);
<span class="comment">// As the method needs a request, you would usually fill it with the desired information</span>
<span class="comment">// into the respective structure. Some of the parts shown here might not be applicable !</span>
<span class="comment">// Values shown here are possibly random and not representative !</span>
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">req</span> <span class="op">=</span> <span class="ident">EntityUserLink</span>::<span class="ident">default</span>();
<span class="comment">// You can configure optional parameters by calling the respective setters at will, and</span>
<span class="comment">// execute the final call using `doit()`.</span>
<span class="comment">// Values shown here are possibly random and not representative !</span>
<span class="kw">let</span> <span class="ident">result</span> <span class="op">=</span> <span class="ident">hub</span>.<span class="ident">management</span>().<span class="ident">profile_user_links_update</span>(<span class="ident">req</span>, <span class="string">&quot;accountId&quot;</span>, <span class="string">&quot;webPropertyId&quot;</span>, <span class="string">&quot;profileId&quot;</span>, <span class="string">&quot;linkId&quot;</span>)
.<span class="ident">doit</span>().<span class="kw">await</span>;
<span class="kw">match</span> <span class="ident">result</span> {
<span class="prelude-val">Err</span>(<span class="ident">e</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="kw">match</span> <span class="ident">e</span> {
<span class="comment">// The Error enum provides details about what exactly happened.</span>
<span class="comment">// You can also just use its `Debug`, `Display` or `Error` traits</span>
<span class="ident">Error</span>::<span class="ident">HttpError</span>(<span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">Io</span>(<span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">MissingAPIKey</span>
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">MissingToken</span>(<span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">Cancelled</span>
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">UploadSizeLimitExceeded</span>(<span class="kw">_</span>, <span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">Failure</span>(<span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">BadRequest</span>(<span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">FieldClash</span>(<span class="kw">_</span>)
<span class="op">|</span><span class="ident">Error</span>::<span class="ident">JsonDecodeError</span>(<span class="kw">_</span>, <span class="kw">_</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;{}&quot;</span>, <span class="ident">e</span>),
},
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">&gt;</span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">&quot;Success: {:?}&quot;</span>, <span class="ident">res</span>),
}</pre></div>
<h2 id="handling-errors" class="section-header"><a href="#handling-errors">Handling Errors</a></h2>
<p>All errors produced by the system are provided either as <a href="../google_analytics3/client/type.Result.html">Result</a> enumeration as return value of
the doit() methods, or handed as possibly intermediate results to either the
<a href="../google_analytics3/client/trait.Delegate.html">Hub Delegate</a>, or the <a href="https://docs.rs/yup-oauth2/*/yup_oauth2/trait.AuthenticatorDelegate.html">Authenticator Delegate</a>.</p>
<p>When delegates handle errors or intermediate values, they may have a chance to instruct the system to retry. This
makes the system potentially resilient to all kinds of errors.</p>
<h2 id="uploads-and-downloads" class="section-header"><a href="#uploads-and-downloads">Uploads and Downloads</a></h2>
<p>If a method supports downloads, the response body, which is part of the <a href="../google_analytics3/client/type.Result.html">Result</a>, should be
read by you to obtain the media.
If such a method also supports a <a href="../google_analytics3/client/trait.ResponseResult.html">Response Result</a>, it will return that by default.
You can see it as meta-data for the actual media. To trigger a media download, you will have to set up the builder by making
this call: <code>.param(&quot;alt&quot;, &quot;media&quot;)</code>.</p>
<p>Methods supporting uploads can do so using up to 2 different protocols:
<em>simple</em> and <em>resumable</em>. The distinctiveness of each is represented by customized
<code>doit(...)</code> methods, which are then named <code>upload(...)</code> and <code>upload_resumable(...)</code> respectively.</p>
<h2 id="customization-and-callbacks" class="section-header"><a href="#customization-and-callbacks">Customization and Callbacks</a></h2>
<p>You may alter the way an <code>doit()</code> method is called by providing a <a href="../google_analytics3/client/trait.Delegate.html">delegate</a> to the
<a href="../google_analytics3/client/trait.CallBuilder.html">Method Builder</a> before making the final <code>doit()</code> call.
Respective methods will be called to provide progress information, as well as determine whether the system should
retry on failure.</p>
<p>The <a href="../google_analytics3/client/trait.Delegate.html">delegate trait</a> is default-implemented, allowing you to customize it with minimal effort.</p>
<h2 id="optional-parts-in-server-requests" class="section-header"><a href="#optional-parts-in-server-requests">Optional Parts in Server-Requests</a></h2>
<p>All structures provided by this library are made to be <a href="../google_analytics3/client/trait.RequestValue.html">encodable</a> and
<a href="../google_analytics3/client/trait.ResponseResult.html">decodable</a> via <em>json</em>. Optionals are used to indicate that partial requests are responses
are valid.
Most optionals are are considered <a href="../google_analytics3/client/trait.Part.html">Parts</a> which are identifiable by name, which will be sent to
the server to indicate either the set parts of the request or the desired parts in the response.</p>
<h2 id="builder-arguments" class="section-header"><a href="#builder-arguments">Builder Arguments</a></h2>
<p>Using <a href="../google_analytics3/client/trait.CallBuilder.html">method builders</a>, you are able to prepare an action call by repeatedly calling it's methods.
These will always take a single argument, for which the following statements are true.</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Plain_old_data_structure">PODs</a> are handed by copy</li>
<li>strings are passed as <code>&amp;str</code></li>
<li><a href="../google_analytics3/client/trait.RequestValue.html">request values</a> are moved</li>
</ul>
<p>Arguments will always be copied or cloned into the builder, to make them independent of their original life times.</p>
</div><h2 id="reexports" class="section-header"><a href="#reexports">Re-exports</a></h2>
<table><tr><td><code>pub use api::<a class="struct" href="../google_analytics3/api/struct.Analytics.html" title="struct google_analytics3::api::Analytics">Analytics</a>;</code></td></tr><tr><td><code>pub use client::<a class="type" href="../google_analytics3/client/type.Result.html" title="type google_analytics3::client::Result">Result</a>;</code></td></tr><tr><td><code>pub use client::<a class="enum" href="../google_analytics3/client/enum.Error.html" title="enum google_analytics3::client::Error">Error</a>;</code></td></tr><tr><td><code>pub use client::<a class="trait" href="../google_analytics3/client/trait.Delegate.html" title="trait google_analytics3::client::Delegate">Delegate</a>;</code></td></tr></table><h2 id="modules" class="section-header"><a href="#modules">Modules</a></h2>
<table><tr class="module-item"><td><a class="mod" href="api/index.html" title="google_analytics3::api mod">api</a></td><td class="docblock-short"></td></tr><tr class="module-item"><td><a class="mod" href="client/index.html" title="google_analytics3::client mod">client</a></td><td class="docblock-short"></td></tr></table></section><section id="search" class="content hidden"></section><section class="footer"></section><div id="rustdoc-vars" data-root-path="../" data-current-crate="google_analytics3"></div>
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html>