mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-27 20:30:52 +01:00
174 lines
30 KiB
HTML
174 lines
30 KiB
HTML
<!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_analyticsadmin1_alpha` crate."><meta name="keywords" content="rust, rustlang, rust-lang, google_analyticsadmin1_alpha"><title>google_analyticsadmin1_alpha - 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">☰</div><a href='../google_analyticsadmin1_alpha/index.html'><div class='logo-container rust-logo'><img src='../rust-logo.png' alt='logo'></div></a><p class="location">Crate google_analyticsadmin1_alpha</p><div class="block version"><p>Version 2.0.0+20210331</p></div><div class="sidebar-elems"><a id="all-types" href="all.html"><p>See all google_analyticsadmin1_alpha'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_analyticsadmin1_alpha" 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_analyticsadmin1_alpha</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">−</span>]</a></span><a class="srclink" href="../src/google_analyticsadmin1_alpha/lib.rs.html#5-227" title="goto source code">[src]</a></span></h1><div class="docblock"><p>This documentation was generated from <em>Google Analytics Admin</em> crate version <em>2.0.0+20210331</em>, where <em>20210331</em> is the exact revision of the <em>analyticsadmin:v1alpha</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>Google Analytics Admin</em> <em>v1_alpha</em> API can be found at the
|
||
<a href="http://code.google.com/apis/analytics/docs/mgmt/home.html">official documentation site</a>.
|
||
The original source code is <a href="https://github.com/Byron/google-apis-rs/tree/master/gen/analyticsadmin1_alpha">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_analyticsadmin1_alpha/api/struct.GoogleAnalyticsAdmin.html">hub</a> ... </p>
|
||
<ul>
|
||
<li>account summaries</li>
|
||
<li><a href="../google_analyticsadmin1_alpha/api/struct.AccountSummaryListCall.html"><em>list</em></a></li>
|
||
<li>accounts</li>
|
||
<li><a href="../google_analyticsadmin1_alpha/api/struct.AccountDeleteCall.html"><em>delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountGetCall.html"><em>get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountGetDataSharingSettingCall.html"><em>get data sharing settings</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountListCall.html"><em>list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountPatchCall.html"><em>patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountProvisionAccountTicketCall.html"><em>provision account ticket</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountSearchChangeHistoryEventCall.html"><em>search change history events</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkAuditCall.html"><em>user links audit</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkBatchCreateCall.html"><em>user links batch create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkBatchDeleteCall.html"><em>user links batch delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkBatchGetCall.html"><em>user links batch get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkBatchUpdateCall.html"><em>user links batch update</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkCreateCall.html"><em>user links create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkDeleteCall.html"><em>user links delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkGetCall.html"><em>user links get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkListCall.html"><em>user links list</em></a> and <a href="../google_analyticsadmin1_alpha/api/struct.AccountUserLinkPatchCall.html"><em>user links patch</em></a></li>
|
||
<li>properties</li>
|
||
<li><a href="../google_analyticsadmin1_alpha/api/struct.PropertyAndroidAppDataStreamCreateCall.html"><em>android app data streams create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyAndroidAppDataStreamDeleteCall.html"><em>android app data streams delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyAndroidAppDataStreamGetCall.html"><em>android app data streams get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyAndroidAppDataStreamListCall.html"><em>android app data streams list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyAndroidAppDataStreamPatchCall.html"><em>android app data streams patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyCreateCall.html"><em>create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyDeleteCall.html"><em>delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyFirebaseLinkCreateCall.html"><em>firebase links create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyFirebaseLinkDeleteCall.html"><em>firebase links delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyFirebaseLinkListCall.html"><em>firebase links list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyFirebaseLinkPatchCall.html"><em>firebase links patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyGetCall.html"><em>get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyGoogleAdsLinkCreateCall.html"><em>google ads links create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyGoogleAdsLinkDeleteCall.html"><em>google ads links delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyGoogleAdsLinkListCall.html"><em>google ads links list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyGoogleAdsLinkPatchCall.html"><em>google ads links patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyIosAppDataStreamCreateCall.html"><em>ios app data streams create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyIosAppDataStreamDeleteCall.html"><em>ios app data streams delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyIosAppDataStreamGetCall.html"><em>ios app data streams get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyIosAppDataStreamListCall.html"><em>ios app data streams list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyIosAppDataStreamPatchCall.html"><em>ios app data streams patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyListCall.html"><em>list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyPatchCall.html"><em>patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkAuditCall.html"><em>user links audit</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkBatchCreateCall.html"><em>user links batch create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkBatchDeleteCall.html"><em>user links batch delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkBatchGetCall.html"><em>user links batch get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkBatchUpdateCall.html"><em>user links batch update</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkCreateCall.html"><em>user links create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkDeleteCall.html"><em>user links delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkGetCall.html"><em>user links get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkListCall.html"><em>user links list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyUserLinkPatchCall.html"><em>user links patch</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamCreateCall.html"><em>web data streams create</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamDeleteCall.html"><em>web data streams delete</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamGetCall.html"><em>web data streams get</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamGetEnhancedMeasurementSettingCall.html"><em>web data streams get enhanced measurement settings</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamGetGlobalSiteTagCall.html"><em>web data streams get global site tag</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamListCall.html"><em>web data streams list</em></a>, <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamPatchCall.html"><em>web data streams patch</em></a> and <a href="../google_analyticsadmin1_alpha/api/struct.PropertyWebDataStreamUpdateEnhancedMeasurementSettingCall.html"><em>web data streams update enhanced measurement settings</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_analyticsadmin1_alpha/api/struct.GoogleAnalyticsAdmin.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_analyticsadmin1_alpha/client/trait.MethodsBuilder.html"><em>Method Builders</em></a> which in turn
|
||
allow access to individual <a href="../google_analyticsadmin1_alpha/client/trait.CallBuilder.html"><em>Call Builders</em></a></li>
|
||
</ul>
|
||
</li>
|
||
<li><strong><a href="../google_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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">accounts</span>().<span class="ident">user_links_batch_delete</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">accounts</span>().<span class="ident">user_links_delete</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">accounts</span>().<span class="ident">delete</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">properties</span>().<span class="ident">android_app_data_streams_delete</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">properties</span>().<span class="ident">firebase_links_delete</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">properties</span>().<span class="ident">google_ads_links_delete</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">properties</span>().<span class="ident">ios_app_data_streams_delete</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">properties</span>().<span class="ident">user_links_batch_delete</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">properties</span>().<span class="ident">user_links_delete</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">properties</span>().<span class="ident">web_data_streams_delete</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">properties</span>().<span class="ident">delete</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-analyticsadmin1_alpha = "*"
|
||
# This project intentionally uses an old version of Hyper. See
|
||
# https://github.com/Byron/google-apis-rs/issues/173 for more
|
||
# information.
|
||
hyper = "^0.14"
|
||
hyper-rustls = "^0.22"
|
||
serde = "^1.0"
|
||
serde_json = "^1.0"
|
||
yup-oauth2 = "^5.0"
|
||
</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_analyticsadmin1_alpha</span> <span class="kw">as</span> <span class="ident">analyticsadmin1_alpha</span>;
|
||
<span class="kw">use</span> <span class="ident">analyticsadmin1_alpha</span>::<span class="ident">api</span>::<span class="ident">GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest</span>;
|
||
<span class="kw">use</span> <span class="ident">analyticsadmin1_alpha</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">analyticsadmin1_alpha</span>::<span class="ident">GoogleAnalyticsAdmin</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'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">GoogleAnalyticsAdmin</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">GoogleAnalyticsAdminV1alphaBatchDeleteUserLinksRequest</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">accounts</span>().<span class="ident">user_links_batch_delete</span>(<span class="ident">req</span>, <span class="string">"parent"</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">></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">></span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">"{}"</span>, <span class="ident">e</span>),
|
||
},
|
||
<span class="prelude-val">Ok</span>(<span class="ident">res</span>) <span class="op">=</span><span class="op">></span> <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Success: {:?}"</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_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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("alt", "media")</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_analyticsadmin1_alpha/client/trait.Delegate.html">delegate</a> to the
|
||
<a href="../google_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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_analyticsadmin1_alpha/client/trait.RequestValue.html">encodable</a> and
|
||
<a href="../google_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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_analyticsadmin1_alpha/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>&str</code></li>
|
||
<li><a href="../google_analyticsadmin1_alpha/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_analyticsadmin1_alpha/api/struct.GoogleAnalyticsAdmin.html" title="struct google_analyticsadmin1_alpha::api::GoogleAnalyticsAdmin">GoogleAnalyticsAdmin</a>;</code></td></tr><tr><td><code>pub use client::<a class="type" href="../google_analyticsadmin1_alpha/client/type.Result.html" title="type google_analyticsadmin1_alpha::client::Result">Result</a>;</code></td></tr><tr><td><code>pub use client::<a class="enum" href="../google_analyticsadmin1_alpha/client/enum.Error.html" title="enum google_analyticsadmin1_alpha::client::Error">Error</a>;</code></td></tr><tr><td><code>pub use client::<a class="trait" href="../google_analyticsadmin1_alpha/client/trait.Delegate.html" title="trait google_analyticsadmin1_alpha::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_analyticsadmin1_alpha::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_analyticsadmin1_alpha::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_analyticsadmin1_alpha"></div>
|
||
<script src="../main.js"></script><script defer src="../search-index.js"></script></body></html> |