# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # NOTE: This class is auto generated by the swagger code generator program. # https://github.com/swagger-api/swagger-codegen.git # Do not edit the class manually. defmodule GoogleApi.Books.V1.Api.Layers do @moduledoc """ API calls for all endpoints tagged `Layers`. """ alias GoogleApi.Books.V1.Connection import GoogleApi.Books.V1.RequestBuilder @doc """ Gets the annotation data. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): The volume to retrieve annotations for. - layer_id (String): The ID for the layer to get the annotations. - annotation_data_id (String): The ID of the annotation data to retrieve. - content_version (String): The content version for the volume you are trying to retrieve. - opts (KeywordList): [optional] Optional parameters - :alt (String): Data format for the response. - :fields (String): Selector specifying which fields to include in a partial response. - :key (String): 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 (String): OAuth 2.0 token for the current user. - :pretty_print (Boolean): Returns response with indentations and line breaks. - :quota_user (String): 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. Overrides userIp if both are provided. - :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits. - :allow_web_definitions (Boolean): For the dictionary layer. Whether or not to allow web definitions. - :h (Integer): The requested pixel height for any images. If height is provided width must also be provided. - :locale (String): The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. - :scale (Integer): The requested scale for the image. - :source (String): String to identify the originator of this request. - :w (Integer): The requested pixel width for any images. If width is provided height must also be provided. ## Returns {:ok, %GoogleApi.Books.V1.Model.Annotationdata{}} on success {:error, info} on failure """ @spec books_layers_annotation_data_get(Tesla.Env.client, String.t, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Annotationdata.t} | {:error, Tesla.Env.t} def books_layers_annotation_data_get(connection, volume_id, layer_id, annotation_data_id, content_version, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"allowWebDefinitions" => :query, :"h" => :query, :"locale" => :query, :"scale" => :query, :"source" => :query, :"w" => :query } %{} |> method(:get) |> url("/volumes/#{volume_id}/layers/#{layer_id}/data/#{annotation_data_id}") |> add_param(:query, :"contentVersion", content_version) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Annotationdata{}) end @doc """ Gets the annotation data for a volume and layer. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): The volume to retrieve annotation data for. - layer_id (String): The ID for the layer to get the annotation data. - content_version (String): The content version for the requested volume. - opts (KeywordList): [optional] Optional parameters - :alt (String): Data format for the response. - :fields (String): Selector specifying which fields to include in a partial response. - :key (String): 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 (String): OAuth 2.0 token for the current user. - :pretty_print (Boolean): Returns response with indentations and line breaks. - :quota_user (String): 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. Overrides userIp if both are provided. - :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits. - :annotation_data_id (List[String]): The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set. - :h (Integer): The requested pixel height for any images. If height is provided width must also be provided. - :locale (String): The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. - :max_results (Integer): Maximum number of results to return - :page_token (String): The value of the nextToken from the previous page. - :scale (Integer): The requested scale for the image. - :source (String): String to identify the originator of this request. - :updated_max (String): RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). - :updated_min (String): RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). - :w (Integer): The requested pixel width for any images. If width is provided height must also be provided. ## Returns {:ok, %GoogleApi.Books.V1.Model.Annotationsdata{}} on success {:error, info} on failure """ @spec books_layers_annotation_data_list(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Annotationsdata.t} | {:error, Tesla.Env.t} def books_layers_annotation_data_list(connection, volume_id, layer_id, content_version, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"annotationDataId" => :query, :"h" => :query, :"locale" => :query, :"maxResults" => :query, :"pageToken" => :query, :"scale" => :query, :"source" => :query, :"updatedMax" => :query, :"updatedMin" => :query, :"w" => :query } %{} |> method(:get) |> url("/volumes/#{volume_id}/layers/#{layer_id}/data") |> add_param(:query, :"contentVersion", content_version) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Annotationsdata{}) end @doc """ Gets the layer summary for a volume. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): The volume to retrieve layers for. - summary_id (String): The ID for the layer to get the summary for. - opts (KeywordList): [optional] Optional parameters - :alt (String): Data format for the response. - :fields (String): Selector specifying which fields to include in a partial response. - :key (String): 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 (String): OAuth 2.0 token for the current user. - :pretty_print (Boolean): Returns response with indentations and line breaks. - :quota_user (String): 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. Overrides userIp if both are provided. - :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits. - :content_version (String): The content version for the requested volume. - :source (String): String to identify the originator of this request. ## Returns {:ok, %GoogleApi.Books.V1.Model.Layersummary{}} on success {:error, info} on failure """ @spec books_layers_get(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Layersummary.t} | {:error, Tesla.Env.t} def books_layers_get(connection, volume_id, summary_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"contentVersion" => :query, :"source" => :query } %{} |> method(:get) |> url("/volumes/#{volume_id}/layersummary/#{summary_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Layersummary{}) end @doc """ List the layer summaries for a volume. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): The volume to retrieve layers for. - opts (KeywordList): [optional] Optional parameters - :alt (String): Data format for the response. - :fields (String): Selector specifying which fields to include in a partial response. - :key (String): 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 (String): OAuth 2.0 token for the current user. - :pretty_print (Boolean): Returns response with indentations and line breaks. - :quota_user (String): 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. Overrides userIp if both are provided. - :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits. - :content_version (String): The content version for the requested volume. - :max_results (Integer): Maximum number of results to return - :page_token (String): The value of the nextToken from the previous page. - :source (String): String to identify the originator of this request. ## Returns {:ok, %GoogleApi.Books.V1.Model.Layersummaries{}} on success {:error, info} on failure """ @spec books_layers_list(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Layersummaries.t} | {:error, Tesla.Env.t} def books_layers_list(connection, volume_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"contentVersion" => :query, :"maxResults" => :query, :"pageToken" => :query, :"source" => :query } %{} |> method(:get) |> url("/volumes/#{volume_id}/layersummary") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Layersummaries{}) end @doc """ Gets the volume annotation. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): The volume to retrieve annotations for. - layer_id (String): The ID for the layer to get the annotations. - annotation_id (String): The ID of the volume annotation to retrieve. - opts (KeywordList): [optional] Optional parameters - :alt (String): Data format for the response. - :fields (String): Selector specifying which fields to include in a partial response. - :key (String): 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 (String): OAuth 2.0 token for the current user. - :pretty_print (Boolean): Returns response with indentations and line breaks. - :quota_user (String): 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. Overrides userIp if both are provided. - :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits. - :locale (String): The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. - :source (String): String to identify the originator of this request. ## Returns {:ok, %GoogleApi.Books.V1.Model.Volumeannotation{}} on success {:error, info} on failure """ @spec books_layers_volume_annotations_get(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Volumeannotation.t} | {:error, Tesla.Env.t} def books_layers_volume_annotations_get(connection, volume_id, layer_id, annotation_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"locale" => :query, :"source" => :query } %{} |> method(:get) |> url("/volumes/#{volume_id}/layers/#{layer_id}/annotations/#{annotation_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Volumeannotation{}) end @doc """ Gets the volume annotations for a volume and layer. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): The volume to retrieve annotations for. - layer_id (String): The ID for the layer to get the annotations. - content_version (String): The content version for the requested volume. - opts (KeywordList): [optional] Optional parameters - :alt (String): Data format for the response. - :fields (String): Selector specifying which fields to include in a partial response. - :key (String): 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 (String): OAuth 2.0 token for the current user. - :pretty_print (Boolean): Returns response with indentations and line breaks. - :quota_user (String): 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. Overrides userIp if both are provided. - :user_ip (String): IP address of the site where the request originates. Use this if you want to enforce per-user limits. - :end_offset (String): The end offset to end retrieving data from. - :end_position (String): The end position to end retrieving data from. - :locale (String): The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. - :max_results (Integer): Maximum number of results to return - :page_token (String): The value of the nextToken from the previous page. - :show_deleted (Boolean): Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false. - :source (String): String to identify the originator of this request. - :start_offset (String): The start offset to start retrieving data from. - :start_position (String): The start position to start retrieving data from. - :updated_max (String): RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive). - :updated_min (String): RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive). - :volume_annotations_version (String): The version of the volume annotations that you are requesting. ## Returns {:ok, %GoogleApi.Books.V1.Model.Volumeannotations{}} on success {:error, info} on failure """ @spec books_layers_volume_annotations_list(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Volumeannotations.t} | {:error, Tesla.Env.t} def books_layers_volume_annotations_list(connection, volume_id, layer_id, content_version, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"endOffset" => :query, :"endPosition" => :query, :"locale" => :query, :"maxResults" => :query, :"pageToken" => :query, :"showDeleted" => :query, :"source" => :query, :"startOffset" => :query, :"startPosition" => :query, :"updatedMax" => :query, :"updatedMin" => :query, :"volumeAnnotationsVersion" => :query } %{} |> method(:get) |> url("/volumes/#{volume_id}/layers/#{layer_id}") |> add_param(:query, :"contentVersion", content_version) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Volumeannotations{}) end end