Current section
16 Versions
Jump to
Current section
16 Versions
Compare versions
11
files changed
+243
additions
-10
deletions
| @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding | |
| 11 11 | |
| 12 12 | ```elixir |
| 13 13 | def deps do |
| 14 | - [{:google_api_digital_asset_links, "~> 0.13"}] |
| 14 | + [{:google_api_digital_asset_links, "~> 0.14"}] |
| 15 15 | end |
| 16 16 | ``` |
| @@ -3,7 +3,7 @@ | |
| 3 3 | <<"https://github.com/googleapis/elixir-google-api/tree/master/clients/digital_asset_links">>}, |
| 4 4 | {<<"Homepage">>,<<"https://developers.google.com/digital-asset-links/">>}]}. |
| 5 5 | {<<"name">>,<<"google_api_digital_asset_links">>}. |
| 6 | - {<<"version">>,<<"0.13.0">>}. |
| 6 | + {<<"version">>,<<"0.14.0">>}. |
| 7 7 | {<<"description">>, |
| 8 8 | <<"Digital Asset Links API client library. Discovers relationships between online assets such as websites or mobile apps.">>}. |
| 9 9 | {<<"elixir">>,<<"~> 1.6">>}. |
| @@ -12,17 +12,20 @@ | |
| 12 12 | [<<"lib">>,<<"lib/google_api">>,<<"lib/google_api/digital_asset_links">>, |
| 13 13 | <<"lib/google_api/digital_asset_links/v1">>, |
| 14 14 | <<"lib/google_api/digital_asset_links/v1/model">>, |
| 15 | - <<"lib/google_api/digital_asset_links/v1/model/certificate_info.ex">>, |
| 16 | - <<"lib/google_api/digital_asset_links/v1/model/statement.ex">>, |
| 17 | - <<"lib/google_api/digital_asset_links/v1/model/asset.ex">>, |
| 15 | + <<"lib/google_api/digital_asset_links/v1/model/check_response.ex">>, |
| 16 | + <<"lib/google_api/digital_asset_links/v1/model/bulk_check_response.ex">>, |
| 17 | + <<"lib/google_api/digital_asset_links/v1/model/statement_template.ex">>, |
| 18 | + <<"lib/google_api/digital_asset_links/v1/model/bulk_check_request.ex">>, |
| 18 19 | <<"lib/google_api/digital_asset_links/v1/model/list_response.ex">>, |
| 19 20 | <<"lib/google_api/digital_asset_links/v1/model/android_app_asset.ex">>, |
| 21 | + <<"lib/google_api/digital_asset_links/v1/model/statement.ex">>, |
| 22 | + <<"lib/google_api/digital_asset_links/v1/model/certificate_info.ex">>, |
| 23 | + <<"lib/google_api/digital_asset_links/v1/model/asset.ex">>, |
| 20 24 | <<"lib/google_api/digital_asset_links/v1/model/web_asset.ex">>, |
| 21 | - <<"lib/google_api/digital_asset_links/v1/model/check_response.ex">>, |
| 25 | + <<"lib/google_api/digital_asset_links/v1/connection.ex">>, |
| 22 26 | <<"lib/google_api/digital_asset_links/v1/api">>, |
| 23 27 | <<"lib/google_api/digital_asset_links/v1/api/statements.ex">>, |
| 24 28 | <<"lib/google_api/digital_asset_links/v1/api/assetlinks.ex">>, |
| 25 | - <<"lib/google_api/digital_asset_links/v1/connection.ex">>, |
| 26 29 | <<"lib/google_api/digital_asset_links/v1/metadata.ex">>,<<"mix.exs">>, |
| 27 30 | <<"README.md">>,<<"LICENSE">>]}. |
| 28 31 | {<<"licenses">>,[<<"Apache-2.0">>]}. |
| @@ -25,6 +25,67 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Assetlinks do | |
| 25 25 | |
| 26 26 | @library_version Mix.Project.config() |> Keyword.get(:version, "") |
| 27 27 | |
| 28 | + @doc """ |
| 29 | + Send a bundle of statement checks in a single RPC to minimize latency and service load. Statements need not be all for the same source and/or target. We recommend using this method when you need to check more than one statement in a short period of time. |
| 30 | + |
| 31 | + ## Parameters |
| 32 | + |
| 33 | + * `connection` (*type:* `GoogleApi.DigitalAssetLinks.V1.Connection.t`) - Connection to server |
| 34 | + * `optional_params` (*type:* `keyword()`) - Optional parameters |
| 35 | + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. |
| 36 | + * `:access_token` (*type:* `String.t`) - OAuth access token. |
| 37 | + * `:alt` (*type:* `String.t`) - Data format for response. |
| 38 | + * `:callback` (*type:* `String.t`) - JSONP |
| 39 | + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. |
| 40 | + * `: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. |
| 41 | + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. |
| 42 | + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. |
| 43 | + * `: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. |
| 44 | + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). |
| 45 | + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). |
| 46 | + * `:body` (*type:* `GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckRequest.t`) - |
| 47 | + * `opts` (*type:* `keyword()`) - Call options |
| 48 | + |
| 49 | + ## Returns |
| 50 | + |
| 51 | + * `{:ok, %GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckResponse{}}` on success |
| 52 | + * `{:error, info}` on failure |
| 53 | + """ |
| 54 | + @spec digitalassetlinks_assetlinks_bulk_check(Tesla.Env.client(), keyword(), keyword()) :: |
| 55 | + {:ok, GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckResponse.t()} |
| 56 | + | {:ok, Tesla.Env.t()} |
| 57 | + | {:ok, list()} |
| 58 | + | {:error, any()} |
| 59 | + def digitalassetlinks_assetlinks_bulk_check(connection, optional_params \\ [], opts \\ []) do |
| 60 | + optional_params_config = %{ |
| 61 | + :"$.xgafv" => :query, |
| 62 | + :access_token => :query, |
| 63 | + :alt => :query, |
| 64 | + :callback => :query, |
| 65 | + :fields => :query, |
| 66 | + :key => :query, |
| 67 | + :oauth_token => :query, |
| 68 | + :prettyPrint => :query, |
| 69 | + :quotaUser => :query, |
| 70 | + :uploadType => :query, |
| 71 | + :upload_protocol => :query, |
| 72 | + :body => :body |
| 73 | + } |
| 74 | + |
| 75 | + request = |
| 76 | + Request.new() |
| 77 | + |> Request.method(:post) |
| 78 | + |> Request.url("/v1/assetlinks:bulkCheck", %{}) |
| 79 | + |> Request.add_optional_params(optional_params_config, optional_params) |
| 80 | + |> Request.library_version(@library_version) |
| 81 | + |
| 82 | + connection |
| 83 | + |> Connection.execute(request) |
| 84 | + |> Response.decode( |
| 85 | + opts ++ [struct: %GoogleApi.DigitalAssetLinks.V1.Model.BulkCheckResponse{}] |
| 86 | + ) |
| 87 | + end |
| 88 | + |
| 28 89 | @doc """ |
| 29 90 | Determines whether the specified (directional) relationship exists between the specified source and target assets. The relation describes the intent of the link between the two assets as claimed by the source asset. An example for such relationships is the delegation of privileges or permissions. This command is most often used by infrastructure systems to check preconditions for an action. For example, a client may want to know if it is OK to send a web URL to a particular mobile app instead. The client can check for the relevant asset link from the website to the mobile app to decide if the operation should be allowed. A note about security: if you specify a secure asset as the source, such as an HTTPS website or an Android app, the API will ensure that any statements used to generate the response have been made in a secure way by the owner of that asset. Conversely, if the source asset is an insecure HTTP website (that is, the URL starts with `http://` instead of `https://`), the API cannot verify its statements securely, and it is not possible to ensure that the website's statements have not been altered by a third party. For more information, see the [Digital Asset Links technical design specification](https://github.com/google/digitalassetlinks/blob/master/well-known/details.md). |
| 30 91 | |
| @@ -44,6 +105,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Assetlinks do | |
| 44 105 | * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). |
| 45 106 | * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). |
| 46 107 | * `:relation` (*type:* `String.t`) - Query string for the relation. We identify relations with strings of the format `/`, where `` must be one of a set of pre-defined purpose categories, and `` is a free-form lowercase alphanumeric string that describes the specific use case of the statement. Refer to [our API documentation](/digital-asset-links/v1/relation-strings) for the current list of supported relations. For a query to match an asset link, both the query's and the asset link's relation strings must match exactly. Example: A query with relation `delegate_permission/common.handle_all_urls` matches an asset link with relation `delegate_permission/common.handle_all_urls`. |
| 108 | + * `:returnRelationExtensions` (*type:* `boolean()`) - Whether to return relation_extensions payloads specified in the source Digital Asset Links statements linking the requested source and target assets by the requested relation type. If this is set to `false` (default), relation_extensions specified will not be returned, even if they are specified in the DAL statement file. If set to `true`, the API will propagate any and all relation_extensions, across statements, linking the source and target assets by the requested relation type, if specified in the DAL statement file. |
| 47 109 | * `:"source.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM certificate, it can be acquired like this: $ keytool -printcert -file $CERTFILE | grep SHA256: SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 or like this: $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 In this example, the contents of this field would be `14:6D:E9:83:C5:73: 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: 44:E5`. If these tools are not available to you, you can convert the PEM certificate into the DER format, compute the SHA-256 hash of that string and represent the result as a hexstring (that is, uppercase hexadecimal representations of each octet, separated by colons). |
| 48 110 | * `:"source.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. For example, the Google Maps app uses the package name `com.google.android.apps.maps`. REQUIRED |
| 49 111 | * `:"source.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname and port parts. The format is http[s]://[:] Hostnames must be fully qualified: they must end in a single period ("`.`"). Only the schemes "http" and "https" are currently allowed. Port numbers are given as a decimal number, and they must be omitted if the standard port numbers are used: 80 for http and 443 for https. We call this limited URL the "site". All URLs that share the same scheme, hostname and port are considered to be a part of the site and thus belong to the web asset. Example: the asset with the site `https://www.google.com` contains all these URLs: * `https://www.google.com/` * `https://www.google.com:443/` * `https://www.google.com/foo` * `https://www.google.com/foo?bar` * `https://www.google.com/foo#bar` * `https://user@password:www.google.com/` But it does not contain these URLs: * `http://www.google.com/` (wrong scheme) * `https://google.com/` (hostname does not match) * `https://www.google.com:444/` (port does not match) REQUIRED |
| @@ -76,6 +138,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Assetlinks do | |
| 76 138 | :uploadType => :query, |
| 77 139 | :upload_protocol => :query, |
| 78 140 | :relation => :query, |
| 141 | + :returnRelationExtensions => :query, |
| 79 142 | :"source.androidApp.certificate.sha256Fingerprint" => :query, |
| 80 143 | :"source.androidApp.packageName" => :query, |
| 81 144 | :"source.web.site" => :query, |
| @@ -44,6 +44,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Statements do | |
| 44 44 | * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). |
| 45 45 | * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). |
| 46 46 | * `:relation` (*type:* `String.t`) - Use only associations that match the specified relation. See the [`Statement`](#Statement) message for a detailed definition of relation strings. For a query to match a statement, one of the following must be true: * both the query's and the statement's relation strings match exactly, or * the query's relation string is empty or missing. Example: A query with relation `delegate_permission/common.handle_all_urls` matches an asset link with relation `delegate_permission/common.handle_all_urls`. |
| 47 | + * `:returnRelationExtensions` (*type:* `boolean()`) - Whether to return any relation_extensions payloads specified in the source digital asset links statements. If this is set to `false` (default), relation_extensions specified will not be returned, even if they are specified in the DAL statement file. If set to `true`, the API will propagate relation_extensions associated with each statement's relation type, if specified in the DAL statement file. |
| 47 48 | * `:"source.androidApp.certificate.sha256Fingerprint"` (*type:* `String.t`) - The uppercase SHA-265 fingerprint of the certificate. From the PEM certificate, it can be acquired like this: $ keytool -printcert -file $CERTFILE | grep SHA256: SHA256: 14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83: \\ 42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 or like this: $ openssl x509 -in $CERTFILE -noout -fingerprint -sha256 SHA256 Fingerprint=14:6D:E9:83:C5:73:06:50:D8:EE:B9:95:2F:34:FC:64: \\ 16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF:44:E5 In this example, the contents of this field would be `14:6D:E9:83:C5:73: 06:50:D8:EE:B9:95:2F:34:FC:64:16:A0:83:42:E6:1D:BE:A8:8A:04:96:B2:3F:CF: 44:E5`. If these tools are not available to you, you can convert the PEM certificate into the DER format, compute the SHA-256 hash of that string and represent the result as a hexstring (that is, uppercase hexadecimal representations of each octet, separated by colons). |
| 48 49 | * `:"source.androidApp.packageName"` (*type:* `String.t`) - Android App assets are naturally identified by their Java package name. For example, the Google Maps app uses the package name `com.google.android.apps.maps`. REQUIRED |
| 49 50 | * `:"source.web.site"` (*type:* `String.t`) - Web assets are identified by a URL that contains only the scheme, hostname and port parts. The format is http[s]://[:] Hostnames must be fully qualified: they must end in a single period ("`.`"). Only the schemes "http" and "https" are currently allowed. Port numbers are given as a decimal number, and they must be omitted if the standard port numbers are used: 80 for http and 443 for https. We call this limited URL the "site". All URLs that share the same scheme, hostname and port are considered to be a part of the site and thus belong to the web asset. Example: the asset with the site `https://www.google.com` contains all these URLs: * `https://www.google.com/` * `https://www.google.com:443/` * `https://www.google.com/foo` * `https://www.google.com/foo?bar` * `https://www.google.com/foo#bar` * `https://user@password:www.google.com/` But it does not contain these URLs: * `http://www.google.com/` (wrong scheme) * `https://google.com/` (hostname does not match) * `https://www.google.com:444/` (port does not match) REQUIRED |
| @@ -73,6 +74,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1.Api.Statements do | |
| 73 74 | :uploadType => :query, |
| 74 75 | :upload_protocol => :query, |
| 75 76 | :relation => :query, |
| 77 | + :returnRelationExtensions => :query, |
| 76 78 | :"source.androidApp.certificate.sha256Fingerprint" => :query, |
| 77 79 | :"source.androidApp.packageName" => :query, |
| 78 80 | :"source.web.site" => :query |
| @@ -20,7 +20,7 @@ defmodule GoogleApi.DigitalAssetLinks.V1 do | |
| 20 20 | API client metadata for GoogleApi.DigitalAssetLinks.V1. |
| 21 21 | """ |
| 22 22 | |
| 23 | - @discovery_revision "20241109" |
| 23 | + @discovery_revision "20250405" |
| 24 24 | |
| 25 25 | def discovery_revision(), do: @discovery_revision |
| 26 26 | end |
Loading more files…