

API Reference — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 API Reference google\_api\_accelerated\_mobile\_page\_url v0.11.0

===================================================================

 Modules

----------

[GoogleApi.AcceleratedMobilePageUrl.V1](GoogleApi.AcceleratedMobilePageUrl.V1.html)

API client metadata for GoogleApi.AcceleratedMobilePageUrl.V1.

[GoogleApi.AcceleratedMobilePageUrl.V1.Api.AmpUrls](GoogleApi.AcceleratedMobilePageUrl.V1.Api.AmpUrls.html)

API calls for all endpoints tagged `AmpUrls`.

[GoogleApi.AcceleratedMobilePageUrl.V1.Connection](GoogleApi.AcceleratedMobilePageUrl.V1.Connection.html)

Handle Tesla connections for GoogleApi.AcceleratedMobilePageUrl.V1.

[GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl](GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl.html)

AMP URL response for a requested URL.

[GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError](GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError.html)

AMP URL Error resource for a requested URL that couldn't be found.

[GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest](GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest.html)

AMP URL request for a batch of URLs.

[GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse](GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse.html)

Batch AMP URL response.





GoogleApi.AcceleratedMobilePageUrl.V1 — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1 (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/metadata.ex#L18 "View Source")

====================================================================================================================================================================================================================================================================================================

API client metadata for GoogleApi.AcceleratedMobilePageUrl.V1.

 

[Link to this section](#summary)

 Summary

==========================================

[Functions](#functions)

------------------------

[discovery\_revision()](#discovery_revision/0)

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#discovery_revision/0 "Link to this function")

discovery\_revision()

=====================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/metadata.ex#L25 "View Source")





GoogleApi.AcceleratedMobilePageUrl.V1.Api.AmpUrls — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1.Api.AmpUrls (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/api/amp_urls.ex#L18 "View Source")

====================================================================================================================================================================================================================================================================================================================

API calls for all endpoints tagged `AmpUrls`.

 

[Link to this section](#summary)

 Summary

==========================================

[Functions](#functions)

------------------------

[acceleratedmobilepageurl\_amp\_urls\_batch\_get(connection, optional\_params \\ [], opts \\ [])](#acceleratedmobilepageurl_amp_urls_batch_get/3)

Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#acceleratedmobilepageurl_amp_urls_batch_get/3 "Link to this function")

acceleratedmobilepageurl\_amp\_urls\_batch\_get(connection, optional\_params \\ [], opts \\ [])

===============================================================================================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/api/amp_urls.ex#L59 "View Source")

Specs

-----

```

acceleratedmobilepageurl_amp_urls_batch_get(

  [Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(),

  [keyword](https://hexdocs.pm/elixir/typespecs.html#built-in-types)(),

  [keyword](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

) ::

  {:ok, [GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse.t](GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse.html#t:t/0)()}

  | {:ok, [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)()}

  | {:ok, [list](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()}

  | {:error, [any](https://hexdocs.pm/elixir/typespecs.html#basic-types)()}

```

Returns AMP URL(s) and equivalent [AMP Cache URL(s)](/amp/cache/overview#amp-cache-url-format).

 Parameters

-------------

* `connection` (*type:* `GoogleApi.AcceleratedMobilePageUrl.V1.Connection.t`) - Connection to server

* `optional_params` (*type:* `keyword()`) - Optional parameters

	+ `:"$.xgafv"` (*type:* `String.t`) - V1 error format.

	+ `:access_token` (*type:* `String.t`) - OAuth access token.

	+ `:alt` (*type:* `String.t`) - Data format for response.

	+ `:callback` (*type:* `String.t`) - JSONP

	+ `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.

	+ `:key` (*type:* `String.t`) - 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` (*type:* `String.t`) - OAuth 2.0 token for the current user.

	+ `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.

	+ `:quotaUser` (*type:* `String.t`) - 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` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").

	+ `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").

	+ `:body` (*type:* `GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest.t`) -

* `opts` (*type:* `keyword()`) - Call options

 Returns

----------

* `{:ok, %GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse{}}` on success

* `{:error, info}` on failure

 





GoogleApi.AcceleratedMobilePageUrl.V1.Connection — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1.Connection (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L18 "View Source")

=================================================================================================================================================================================================================================================================================================================

Handle Tesla connections for GoogleApi.AcceleratedMobilePageUrl.V1.

 

[Link to this section](#summary)

 Summary

==========================================

[Types](#types)

----------------

[option()](#t:option/0)

[t()](#t:t/0)

[Functions](#functions)

------------------------

[delete(client, url, opts)](#delete/3)

Perform a DELETE request.

[delete!(client, url, opts)](#delete!/3)

Perform a DELETE request.

[execute(connection, request)](#execute/2)

Execute a request on this connection

[get(client, url, opts)](#get/3)

Perform a GET request.

[get!(client, url, opts)](#get!/3)

Perform a GET request.

[head(client, url, opts)](#head/3)

Perform a HEAD request.

[head!(client, url, opts)](#head!/3)

Perform a HEAD request.

[new()](#new/0)

Configure an authless client connection

[new(token)](#new/1)

Configure a client connection using a function which yields a Bearer token.

[options(client, url, opts)](#options/3)

Perform a OPTIONS request.

[options!(client, url, opts)](#options!/3)

Perform a OPTIONS request.

[patch(client, url, body, opts)](#patch/4)

Perform a PATCH request.

[patch!(client, url, body, opts)](#patch!/4)

Perform a PATCH request.

[post(client, url, body, opts)](#post/4)

Perform a POST request.

[post!(client, url, body, opts)](#post!/4)

Perform a POST request.

[put(client, url, body, opts)](#put/4)

Perform a PUT request.

[put!(client, url, body, opts)](#put!/4)

Perform a PUT request.

[request(client \\ %Tesla.Client{}, options)](#request/2)

Perform a request.

[request!(client \\ %Tesla.Client{}, options)](#request!/2)

Perform request and raise in case of error.

[trace(client, url, opts)](#trace/3)

Perform a TRACE request.

[trace!(client, url, opts)](#trace!/3)

Perform a TRACE request.

[Link to this section](#types)

Types

=====================================

[Link to this type](#t:option/0 "Link to this type")

option()

========

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

option() ::

  {:method, [Tesla.Env.method](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:method/0)()}

  | {:url, [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)()}

  | {:query, [Tesla.Env.query](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:query/0)()}

  | {:headers, [Tesla.Env.headers](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:headers/0)()}

  | {:body, [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)()}

  | {:opts, [Tesla.Env.opts](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:opts/0)()}

```

[Link to this type](#t:t/0 "Link to this type")

t()

===

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L23 "View Source")

Specs

-----

```

t() :: [Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)()

```

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#delete/3 "Link to this function")

delete(client, url, opts)

=========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

delete([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a DELETE request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

delete("/users")

delete("/users", query: [scope: "admin"])

delete(client, "/users")

delete(client, "/users", query: [scope: "admin"])

delete(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#delete!/3 "Link to this function")

delete!(client, url, opts)

==========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

delete!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a DELETE request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

delete!("/users")

delete!("/users", query: [scope: "admin"])

delete!(client, "/users")

delete!(client, "/users", query: [scope: "admin"])

delete!(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#execute/2 "Link to this function")

execute(connection, request)

============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

execute([Tesla.Client.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Client.html#t:t/0)(), [GoogleApi.Gax.Request.t](https://hexdocs.pm/google_gax/0.4.0/GoogleApi.Gax.Request.html#t:t/0)()) :: {:ok, [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)()}

```

Execute a request on this connection

 Returns

----------

* `{:ok, Tesla.Env.t}` - If the call was successful

* `{:error, reason}` - If the call failed

 

[Link to this function](#get/3 "Link to this function")

get(client, url, opts)

======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

get([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a GET request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

get("/users")

get("/users", query: [scope: "admin"])

get(client, "/users")

get(client, "/users", query: [scope: "admin"])

get(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#get!/3 "Link to this function")

get!(client, url, opts)

=======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

get!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a GET request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

get!("/users")

get!("/users", query: [scope: "admin"])

get!(client, "/users")

get!(client, "/users", query: [scope: "admin"])

get!(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#head/3 "Link to this function")

head(client, url, opts)

=======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

head([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a HEAD request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

head("/users")

head("/users", query: [scope: "admin"])

head(client, "/users")

head(client, "/users", query: [scope: "admin"])

head(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#head!/3 "Link to this function")

head!(client, url, opts)

========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

head!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a HEAD request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

head!("/users")

head!("/users", query: [scope: "admin"])

head!(client, "/users")

head!(client, "/users", query: [scope: "admin"])

head!(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#new/0 "Link to this function")

new()

=====

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

new() :: [Tesla.Client.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Client.html#t:t/0)()

```

Configure an authless client connection

 Returns

----------

* `Tesla.Env.client`

 

[Link to this function](#new/1 "Link to this function")

new(token)

==========

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

new([String.t](https://hexdocs.pm/elixir/String.html#t:t/0)()) :: [Tesla.Client.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Client.html#t:t/0)()

```

```

new(([[String.t](https://hexdocs.pm/elixir/String.html#t:t/0)()] -> [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)())) :: [Tesla.Client.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Client.html#t:t/0)()

```

Configure a client connection using a function which yields a Bearer token.

 Parameters

-------------

* `token_fetcher` (*type:* `list(String.t()) -> String.t()`) - Callback

which provides an OAuth2 token given a list of scopes

 Returns

----------

* `Tesla.Env.client`

 

[Link to this function](#options/3 "Link to this function")

options(client, url, opts)

==========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

options([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a OPTIONS request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

options("/users")

options("/users", query: [scope: "admin"])

options(client, "/users")

options(client, "/users", query: [scope: "admin"])

options(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#options!/3 "Link to this function")

options!(client, url, opts)

===========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

options!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a OPTIONS request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

options!("/users")

options!("/users", query: [scope: "admin"])

options!(client, "/users")

options!(client, "/users", query: [scope: "admin"])

options!(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#patch/4 "Link to this function")

patch(client, url, body, opts)

==============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

patch([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a PATCH request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

patch("/users", %{name: "Jon"})

patch("/users", %{name: "Jon"}, query: [scope: "admin"])

patch(client, "/users", %{name: "Jon"})

patch(client, "/users", %{name: "Jon"}, query: [scope: "admin"])

```

 

[Link to this function](#patch!/4 "Link to this function")

patch!(client, url, body, opts)

===============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

patch!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a PATCH request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

patch!("/users", %{name: "Jon"})

patch!("/users", %{name: "Jon"}, query: [scope: "admin"])

patch!(client, "/users", %{name: "Jon"})

patch!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])

```

 

[Link to this function](#post/4 "Link to this function")

post(client, url, body, opts)

=============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

post([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a POST request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

post("/users", %{name: "Jon"})

post("/users", %{name: "Jon"}, query: [scope: "admin"])

post(client, "/users", %{name: "Jon"})

post(client, "/users", %{name: "Jon"}, query: [scope: "admin"])

```

 

[Link to this function](#post!/4 "Link to this function")

post!(client, url, body, opts)

==============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

post!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a POST request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

post!("/users", %{name: "Jon"})

post!("/users", %{name: "Jon"}, query: [scope: "admin"])

post!(client, "/users", %{name: "Jon"})

post!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])

```

 

[Link to this function](#put/4 "Link to this function")

put(client, url, body, opts)

============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

put([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a PUT request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

put("/users", %{name: "Jon"})

put("/users", %{name: "Jon"}, query: [scope: "admin"])

put(client, "/users", %{name: "Jon"})

put(client, "/users", %{name: "Jon"}, query: [scope: "admin"])

```

 

[Link to this function](#put!/4 "Link to this function")

put!(client, url, body, opts)

=============================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

put!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [Tesla.Env.body](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:body/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a PUT request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

put!("/users", %{name: "Jon"})

put!("/users", %{name: "Jon"}, query: [scope: "admin"])

put!(client, "/users", %{name: "Jon"})

put!(client, "/users", %{name: "Jon"}, query: [scope: "admin"])

```

 

[Link to this function](#request/2 "Link to this function")

request(client \\ %Tesla.Client{}, options)

===========================================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

request([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a request.

 Options

----------

* `:method` - the request method, one of [:head, :get, :delete, :trace, :options, :post, :put, :patch]

* `:url` - either full url e.g. "[http://example.com/some/path"](http://example.com/some/path%22) or just "/some/path" if using [`Tesla.Middleware.BaseUrl`](https://hexdocs.pm/tesla/1.4.0/Tesla.Middleware.BaseUrl.html)

* `:query` - a keyword list of query params, e.g. `[page: 1, per_page: 100]`

* `:headers` - a keyworld list of headers, e.g. `[{"content-type", "text/plain"}]`

* `:body` - depends on used middleware:

	+ by default it can be a binary

	+ if using e.g. JSON encoding middleware it can be a nested map

	+ if adapter supports it it can be a Stream with any of the above

* `:opts` - custom, per-request middleware or adapter options

 Examples

-----------

```

ExampleApi.request(method: :get, url: "/users/path")

# use shortcut methods

ExampleApi.get("/users/1")

ExampleApi.post(client, "/users", %{name: "Jon"})

```

 

[Link to this function](#request!/2 "Link to this function")

request!(client \\ %Tesla.Client{}, options)

============================================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

request!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform request and raise in case of error.

This is similar to [`request/2`](#request/2) behaviour from Tesla 0.x

See [`request/2`](#request/2) for list of available options.

 

[Link to this function](#trace/3 "Link to this function")

trace(client, url, opts)

========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

trace([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) :: [Tesla.Env.result](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:result/0)()

```

Perform a TRACE request.

See [`request/1`](#request/1) or [`request/2`](#request/2) for options definition.

```

trace("/users")

trace("/users", query: [scope: "admin"])

trace(client, "/users")

trace(client, "/users", query: [scope: "admin"])

trace(client, "/users", body: %{name: "Jon"})

```

 

[Link to this function](#trace!/3 "Link to this function")

trace!(client, url, opts)

=========================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/connection.ex#L25 "View Source")

Specs

-----

```

trace!([Tesla.Env.client](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:client/0)(), [Tesla.Env.url](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:url/0)(), [[option](#t:option/0)()]) ::

  [Tesla.Env.t](https://hexdocs.pm/tesla/1.4.0/Tesla.Env.html#t:t/0)() | [no\_return](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()

```

Perform a TRACE request.

See [`request!/1`](#request!/1) or [`request!/2`](#request!/2) for options definition.

```

trace!("/users")

trace!("/users", query: [scope: "admin"])

trace!(client, "/users")

trace!(client, "/users", query: [scope: "admin"])

trace!(client, "/users", body: %{name: "Jon"})

```

 





GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url.ex#L18 "View Source")

======================================================================================================================================================================================================================================================================================================================

AMP URL response for a requested URL.

 Attributes

-------------

* `ampUrl` (*type:* `String.t`, *default:* `nil`) - The AMP URL pointing to the publisher's web server.

* `cdnAmpUrl` (*type:* `String.t`, *default:* `nil`) - The [AMP Cache URL](/amp/cache/overview#amp-cache-url-format) pointing to the cached document in the Google AMP Cache.

* `originalUrl` (*type:* `String.t`, *default:* `nil`) - The original non-AMP URL.

 

[Link to this section](#summary)

 Summary

==========================================

[Types](#types)

----------------

[t()](#t:t/0)

[Functions](#functions)

------------------------

[decode(value, options)](#decode/2)

Unwrap a decoded JSON object into its complex fields.

[Link to this section](#types)

Types

=====================================

[Link to this type](#t:t/0 "Link to this type")

t()

===

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url.ex#L31 "View Source")

Specs

-----

```

t() :: %GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl{

  ampUrl: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil,

  cdnAmpUrl: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil,

  originalUrl: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil

}

```

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#decode/2 "Link to this function")

decode(value, options)

======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url.ex#L18 "View Source")

Specs

-----

```

decode([struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)(), [keyword](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()) :: [struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)()

```

Unwrap a decoded JSON object into its complex fields.

 





GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url_error.ex#L18 "View Source")

=================================================================================================================================================================================================================================================================================================================================

AMP URL Error resource for a requested URL that couldn't be found.

 Attributes

-------------

* `errorCode` (*type:* `String.t`, *default:* `nil`) - The error code of an API call.

* `errorMessage` (*type:* `String.t`, *default:* `nil`) - An optional descriptive error message.

* `originalUrl` (*type:* `String.t`, *default:* `nil`) - The original non-AMP URL.

 

[Link to this section](#summary)

 Summary

==========================================

[Types](#types)

----------------

[t()](#t:t/0)

[Functions](#functions)

------------------------

[decode(value, options)](#decode/2)

Unwrap a decoded JSON object into its complex fields.

[Link to this section](#types)

Types

=====================================

[Link to this type](#t:t/0 "Link to this type")

t()

===

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url_error.ex#L31 "View Source")

Specs

-----

```

t() :: %GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError{

  errorCode: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil,

  errorMessage: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil,

  originalUrl: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil

}

```

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#decode/2 "Link to this function")

decode(value, options)

======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/amp_url_error.ex#L18 "View Source")

Specs

-----

```

decode([struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)(), [keyword](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()) :: [struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)()

```

Unwrap a decoded JSON object into its complex fields.

 





GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/batch_get_amp_urls_request.ex#L18 "View Source")

=========================================================================================================================================================================================================================================================================================================================================================

AMP URL request for a batch of URLs.

 Attributes

-------------

* `lookupStrategy` (*type:* `String.t`, *default:* `nil`) - The lookup\_strategy being requested.

* `urls` (*type:* `list(String.t)`, *default:* `nil`) - List of URLs to look up for the paired AMP URLs. The URLs are case-sensitive. Up to 50 URLs per lookup (see [Usage Limits](/amp/cache/reference/limits)).

 

[Link to this section](#summary)

 Summary

==========================================

[Types](#types)

----------------

[t()](#t:t/0)

[Functions](#functions)

------------------------

[decode(value, options)](#decode/2)

Unwrap a decoded JSON object into its complex fields.

[Link to this section](#types)

Types

=====================================

[Link to this type](#t:t/0 "Link to this type")

t()

===

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/batch_get_amp_urls_request.ex#L30 "View Source")

Specs

-----

```

t() :: %GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsRequest{

  lookupStrategy: [String.t](https://hexdocs.pm/elixir/String.html#t:t/0)() | nil,

  urls: [[String.t](https://hexdocs.pm/elixir/String.html#t:t/0)()] | nil

}

```

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#decode/2 "Link to this function")

decode(value, options)

======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/batch_get_amp_urls_request.ex#L18 "View Source")

Specs

-----

```

decode([struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)(), [keyword](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()) :: [struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)()

```

Unwrap a decoded JSON object into its complex fields.

 





GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse — google\_api\_accelerated\_mobile\_page\_url v0.11.0

try { if(localStorage.getItem('night-mode') === 'true') document.body.className += ' night-mode'; } catch (e) { }

 GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse (google\_api\_accelerated\_mobile\_page\_url v0.11.0)

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/batch_get_amp_urls_response.ex#L18 "View Source")

===========================================================================================================================================================================================================================================================================================================================================================

Batch AMP URL response.

 Attributes

-------------

* `ampUrls` (*type:* `list(GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl.t)`, *default:* `nil`) - For each URL in BatchAmpUrlsRequest, the URL response. The response might not be in the same order as URLs in the batch request. If BatchAmpUrlsRequest contains duplicate URLs, AmpUrl is generated only once.

* `urlErrors` (*type:* `list(GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError.t)`, *default:* `nil`) - The errors for requested URLs that have no AMP URL.

 

[Link to this section](#summary)

 Summary

==========================================

[Types](#types)

----------------

[t()](#t:t/0)

[Functions](#functions)

------------------------

[decode(value, options)](#decode/2)

Unwrap a decoded JSON object into its complex fields.

[Link to this section](#types)

Types

=====================================

[Link to this type](#t:t/0 "Link to this type")

t()

===

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/batch_get_amp_urls_response.ex#L30 "View Source")

Specs

-----

```

t() :: %GoogleApi.AcceleratedMobilePageUrl.V1.Model.BatchGetAmpUrlsResponse{

  ampUrls: [[GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl.t](GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrl.html#t:t/0)()] | nil,

  urlErrors: [[GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError.t](GoogleApi.AcceleratedMobilePageUrl.V1.Model.AmpUrlError.html#t:t/0)()] | nil

}

```

[Link to this section](#functions)

Functions

=============================================

[Link to this function](#decode/2 "Link to this function")

decode(value, options)

======================

[View Source](https://github.com/googleapis/elixir-google-api/tree/master/clients/accelerated_mobile_page_url/blob/master/lib/google_api/accelerated_mobile_page_url/v1/model/batch_get_amp_urls_response.ex#L18 "View Source")

Specs

-----

```

decode([struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)(), [keyword](https://hexdocs.pm/elixir/typespecs.html#built-in-types)()) :: [struct](https://hexdocs.pm/elixir/typespecs.html#basic-types)()

```

Unwrap a decoded JSON object into its complex fields.

 

