# 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.Mylibrary do @moduledoc """ API calls for all endpoints tagged `Mylibrary`. """ alias GoogleApi.Books.V1.Connection import GoogleApi.Books.V1.RequestBuilder @doc """ Deletes an annotation. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - annotation_id (String): The ID for the annotation to delete. - 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. - :source (String): String to identify the originator of this request. ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec books_mylibrary_annotations_delete(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def books_mylibrary_annotations_delete(connection, annotation_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"source" => :query } %{} |> method(:delete) |> url("/mylibrary/annotations/#{annotation_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Inserts a new annotation. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - 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_id (String): The ID for the annotation to insert. - :country (String): ISO-3166-1 code to override the IP-based location. - :show_only_summary_in_response (Boolean): Requests that only the summary of the specified layer be provided in the response. - :source (String): String to identify the originator of this request. - :body (Annotation): ## Returns {:ok, %GoogleApi.Books.V1.Model.Annotation{}} on success {:error, info} on failure """ @spec books_mylibrary_annotations_insert(Tesla.Env.client, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Annotation.t} | {:error, Tesla.Env.t} def books_mylibrary_annotations_insert(connection, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"annotationId" => :query, :"country" => :query, :"showOnlySummaryInResponse" => :query, :"source" => :query, :"body" => :body } %{} |> method(:post) |> url("/mylibrary/annotations") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Annotation{}) end @doc """ Retrieves a list of annotations, possibly filtered. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - 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. - :layer_id (String): The layer ID to limit annotation by. - :layer_ids (List[String]): The layer ID(s) to limit annotation by. - :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. - :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_id (String): The volume to restrict annotations to. ## Returns {:ok, %GoogleApi.Books.V1.Model.Annotations{}} on success {:error, info} on failure """ @spec books_mylibrary_annotations_list(Tesla.Env.client, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Annotations.t} | {:error, Tesla.Env.t} def books_mylibrary_annotations_list(connection, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"contentVersion" => :query, :"layerId" => :query, :"layerIds" => :query, :"maxResults" => :query, :"pageToken" => :query, :"showDeleted" => :query, :"source" => :query, :"updatedMax" => :query, :"updatedMin" => :query, :"volumeId" => :query } %{} |> method(:get) |> url("/mylibrary/annotations") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Annotations{}) end @doc """ Gets the summary of specified layers. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - layer_ids (List[String]): Array of layer IDs to get the summary for. - volume_id (String): Volume id 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. ## Returns {:ok, %GoogleApi.Books.V1.Model.AnnotationsSummary{}} on success {:error, info} on failure """ @spec books_mylibrary_annotations_summary(Tesla.Env.client, list(String.t), String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.AnnotationsSummary.t} | {:error, Tesla.Env.t} def books_mylibrary_annotations_summary(connection, layer_ids, volume_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query } %{} |> method(:post) |> url("/mylibrary/annotations/summary") |> add_param(:query, :"layerIds", layer_ids) |> add_param(:query, :"volumeId", volume_id) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.AnnotationsSummary{}) end @doc """ Updates an existing annotation. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - annotation_id (String): The ID for the annotation to update. - 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. - :source (String): String to identify the originator of this request. - :body (Annotation): ## Returns {:ok, %GoogleApi.Books.V1.Model.Annotation{}} on success {:error, info} on failure """ @spec books_mylibrary_annotations_update(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Annotation.t} | {:error, Tesla.Env.t} def books_mylibrary_annotations_update(connection, annotation_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"source" => :query, :"body" => :body } %{} |> method(:put) |> url("/mylibrary/annotations/#{annotation_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Annotation{}) end @doc """ Adds a volume to a bookshelf. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - shelf (String): ID of bookshelf to which to add a volume. - volume_id (String): ID of volume to add. - 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. - :reason (String): The reason for which the book is added to the library. - :source (String): String to identify the originator of this request. ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_add_volume(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_add_volume(connection, shelf, volume_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"reason" => :query, :"source" => :query } %{} |> method(:post) |> url("/mylibrary/bookshelves/#{shelf}/addVolume") |> add_param(:query, :"volumeId", volume_id) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Clears all volumes from a bookshelf. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - shelf (String): ID of bookshelf from which to remove a 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. - :source (String): String to identify the originator of this request. ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_clear_volumes(Tesla.Env.client, String.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_clear_volumes(connection, shelf, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"source" => :query } %{} |> method(:post) |> url("/mylibrary/bookshelves/#{shelf}/clearVolumes") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Retrieves metadata for a specific bookshelf belonging to the authenticated user. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - shelf (String): ID of bookshelf 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. - :source (String): String to identify the originator of this request. ## Returns {:ok, %GoogleApi.Books.V1.Model.Bookshelf{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_get(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Bookshelf.t} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_get(connection, shelf, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"source" => :query } %{} |> method(:get) |> url("/mylibrary/bookshelves/#{shelf}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Bookshelf{}) end @doc """ Retrieves a list of bookshelves belonging to the authenticated user. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - 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. - :source (String): String to identify the originator of this request. ## Returns {:ok, %GoogleApi.Books.V1.Model.Bookshelves{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_list(Tesla.Env.client, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Bookshelves.t} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_list(connection, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"source" => :query } %{} |> method(:get) |> url("/mylibrary/bookshelves") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Bookshelves{}) end @doc """ Moves a volume within a bookshelf. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - shelf (String): ID of bookshelf with the volume. - volume_id (String): ID of volume to move. - volume_position (Integer): Position on shelf to move the item (0 puts the item before the current first item, 1 puts it between the first and the second and so on.) - 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. - :source (String): String to identify the originator of this request. ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_move_volume(Tesla.Env.client, String.t, String.t, Integer.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_move_volume(connection, shelf, volume_id, volume_position, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"source" => :query } %{} |> method(:post) |> url("/mylibrary/bookshelves/#{shelf}/moveVolume") |> add_param(:query, :"volumeId", volume_id) |> add_param(:query, :"volumePosition", volume_position) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Removes a volume from a bookshelf. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - shelf (String): ID of bookshelf from which to remove a volume. - volume_id (String): ID of volume to remove. - 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. - :reason (String): The reason for which the book is removed from the library. - :source (String): String to identify the originator of this request. ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_remove_volume(Tesla.Env.client, String.t, String.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_remove_volume(connection, shelf, volume_id, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"reason" => :query, :"source" => :query } %{} |> method(:post) |> url("/mylibrary/bookshelves/#{shelf}/removeVolume") |> add_param(:query, :"volumeId", volume_id) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end @doc """ Gets volume information for volumes on a bookshelf. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - shelf (String): The bookshelf ID or name retrieve volumes 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. - :country (String): ISO-3166-1 code to override the IP-based location. - :max_results (Integer): Maximum number of results to return - :projection (String): Restrict information returned to a set of selected fields. - :q (String): Full-text search query string in this bookshelf. - :show_preorders (Boolean): Set to true to show pre-ordered books. Defaults to false. - :source (String): String to identify the originator of this request. - :start_index (Integer): Index of the first element to return (starts at 0) ## Returns {:ok, %GoogleApi.Books.V1.Model.Volumes{}} on success {:error, info} on failure """ @spec books_mylibrary_bookshelves_volumes_list(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.Volumes.t} | {:error, Tesla.Env.t} def books_mylibrary_bookshelves_volumes_list(connection, shelf, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"country" => :query, :"maxResults" => :query, :"projection" => :query, :"q" => :query, :"showPreorders" => :query, :"source" => :query, :"startIndex" => :query } %{} |> method(:get) |> url("/mylibrary/bookshelves/#{shelf}/volumes") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.Volumes{}) end @doc """ Retrieves my reading position information for a volume. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): ID of volume for which to retrieve a reading position. - 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): Volume content version for which this reading position is requested. - :source (String): String to identify the originator of this request. ## Returns {:ok, %GoogleApi.Books.V1.Model.ReadingPosition{}} on success {:error, info} on failure """ @spec books_mylibrary_readingpositions_get(Tesla.Env.client, String.t, keyword()) :: {:ok, GoogleApi.Books.V1.Model.ReadingPosition.t} | {:error, Tesla.Env.t} def books_mylibrary_readingpositions_get(connection, volume_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("/mylibrary/readingpositions/#{volume_id}") |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(%GoogleApi.Books.V1.Model.ReadingPosition{}) end @doc """ Sets my reading position information for a volume. ## Parameters - connection (GoogleApi.Books.V1.Connection): Connection to server - volume_id (String): ID of volume for which to update the reading position. - timestamp (String): RFC 3339 UTC format timestamp associated with this reading position. - position (String): Position string for the new volume reading position. - 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. - :action (String): Action that caused this reading position to be set. - :content_version (String): Volume content version for which this reading position applies. - :device_cookie (String): Random persistent device cookie optional on set position. - :source (String): String to identify the originator of this request. ## Returns {:ok, %{}} on success {:error, info} on failure """ @spec books_mylibrary_readingpositions_set_position(Tesla.Env.client, String.t, String.t, String.t, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t} def books_mylibrary_readingpositions_set_position(connection, volume_id, timestamp, position, opts \\ []) do optional_params = %{ :"alt" => :query, :"fields" => :query, :"key" => :query, :"oauth_token" => :query, :"prettyPrint" => :query, :"quotaUser" => :query, :"userIp" => :query, :"action" => :query, :"contentVersion" => :query, :"deviceCookie" => :query, :"source" => :query } %{} |> method(:post) |> url("/mylibrary/readingpositions/#{volume_id}/setPosition") |> add_param(:query, :"timestamp", timestamp) |> add_param(:query, :"position", position) |> add_optional_params(optional_params, opts) |> Enum.into([]) |> (&Connection.request(connection, &1)).() |> decode(false) end end