googleapis
Version:
Google APIs Client Library for Node.js
1,491 lines • 246 kB
TypeScript
/// <reference types="node" />
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace books_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: 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.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* 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.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Books API
*
* The Google Books API allows clients to access the Google Books repository.
*
* @example
* ```js
* const {google} = require('googleapis');
* const books = google.books('v1');
* ```
*/
export class Books {
context: APIRequestContext;
bookshelves: Resource$Bookshelves;
cloudloading: Resource$Cloudloading;
dictionary: Resource$Dictionary;
familysharing: Resource$Familysharing;
layers: Resource$Layers;
myconfig: Resource$Myconfig;
mylibrary: Resource$Mylibrary;
notification: Resource$Notification;
onboarding: Resource$Onboarding;
personalizedstream: Resource$Personalizedstream;
promooffer: Resource$Promooffer;
series: Resource$Series;
volumes: Resource$Volumes;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
export interface Schema$Annotation {
/**
* Anchor text after excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty.
*/
afterSelectedText?: string | null;
/**
* Anchor text before excerpt. For requests, if the user bookmarked a screen that has no flowing text on it, then this field should be empty.
*/
beforeSelectedText?: string | null;
/**
* Selection ranges sent from the client.
*/
clientVersionRanges?: {
cfiRange?: Schema$BooksAnnotationsRange;
contentVersion?: string;
gbImageRange?: Schema$BooksAnnotationsRange;
gbTextRange?: Schema$BooksAnnotationsRange;
imageCfiRange?: Schema$BooksAnnotationsRange;
} | null;
/**
* Timestamp for the created time of this annotation.
*/
created?: string | null;
/**
* Selection ranges for the most recent content version.
*/
currentVersionRanges?: {
cfiRange?: Schema$BooksAnnotationsRange;
contentVersion?: string;
gbImageRange?: Schema$BooksAnnotationsRange;
gbTextRange?: Schema$BooksAnnotationsRange;
imageCfiRange?: Schema$BooksAnnotationsRange;
} | null;
/**
* User-created data for this annotation.
*/
data?: string | null;
/**
* Indicates that this annotation is deleted.
*/
deleted?: boolean | null;
/**
* The highlight style for this annotation.
*/
highlightStyle?: string | null;
/**
* Id of this annotation, in the form of a GUID.
*/
id?: string | null;
/**
* Resource type.
*/
kind?: string | null;
/**
* The layer this annotation is for.
*/
layerId?: string | null;
layerSummary?: {
allowedCharacterCount?: number;
limitType?: string;
remainingCharacterCount?: number;
} | null;
/**
* Pages that this annotation spans.
*/
pageIds?: string[] | null;
/**
* Excerpt from the volume.
*/
selectedText?: string | null;
/**
* URL to this resource.
*/
selfLink?: string | null;
/**
* Timestamp for the last time this annotation was modified.
*/
updated?: string | null;
/**
* The volume that this annotation belongs to.
*/
volumeId?: string | null;
}
export interface Schema$Annotations {
/**
* A list of annotations.
*/
items?: Schema$Annotation[];
/**
* Resource type.
*/
kind?: string | null;
/**
* Token to pass in for pagination for the next page. This will not be present if this request does not have more results.
*/
nextPageToken?: string | null;
/**
* Total number of annotations found. This may be greater than the number of notes returned in this response if results have been paginated.
*/
totalItems?: number | null;
}
export interface Schema$Annotationsdata {
/**
* A list of Annotation Data.
*/
items?: Schema$GeoAnnotationdata[];
/**
* Resource type
*/
kind?: string | null;
/**
* Token to pass in for pagination for the next page. This will not be present if this request does not have more results.
*/
nextPageToken?: string | null;
/**
* The total number of volume annotations found.
*/
totalItems?: number | null;
}
export interface Schema$AnnotationsSummary {
kind?: string | null;
layers?: Array<{
allowedCharacterCount?: number;
layerId?: string;
limitType?: string;
remainingCharacterCount?: number;
updated?: string;
}> | null;
}
export interface Schema$BooksAnnotationsRange {
/**
* The offset from the ending position.
*/
endOffset?: string | null;
/**
* The ending position for the range.
*/
endPosition?: string | null;
/**
* The offset from the starting position.
*/
startOffset?: string | null;
/**
* The starting position for the range.
*/
startPosition?: string | null;
}
export interface Schema$BooksCloudloadingResource {
author?: string | null;
processingState?: string | null;
title?: string | null;
volumeId?: string | null;
}
export interface Schema$Bookshelf {
/**
* Whether this bookshelf is PUBLIC or PRIVATE.
*/
access?: string | null;
/**
* Created time for this bookshelf (formatted UTC timestamp with millisecond resolution).
*/
created?: string | null;
/**
* Description of this bookshelf.
*/
description?: string | null;
/**
* Id of this bookshelf, only unique by user.
*/
id?: number | null;
/**
* Resource type for bookshelf metadata.
*/
kind?: string | null;
/**
* URL to this resource.
*/
selfLink?: string | null;
/**
* Title of this bookshelf.
*/
title?: string | null;
/**
* Last modified time of this bookshelf (formatted UTC timestamp with millisecond resolution).
*/
updated?: string | null;
/**
* Number of volumes in this bookshelf.
*/
volumeCount?: number | null;
/**
* Last time a volume was added or removed from this bookshelf (formatted UTC timestamp with millisecond resolution).
*/
volumesLastUpdated?: string | null;
}
export interface Schema$Bookshelves {
/**
* A list of bookshelves.
*/
items?: Schema$Bookshelf[];
/**
* Resource type.
*/
kind?: string | null;
}
export interface Schema$BooksVolumesRecommendedRateResponse {
consistency_token?: string | null;
}
export interface Schema$Category {
/**
* A list of onboarding categories.
*/
items?: Array<{
badgeUrl?: string;
categoryId?: string;
name?: string;
}> | null;
/**
* Resource type.
*/
kind?: string | null;
}
export interface Schema$ConcurrentAccessRestriction {
/**
* Whether access is granted for this (user, device, volume).
*/
deviceAllowed?: boolean | null;
/**
* Resource type.
*/
kind?: string | null;
/**
* The maximum number of concurrent access licenses for this volume.
*/
maxConcurrentDevices?: number | null;
/**
* Error/warning message.
*/
message?: string | null;
/**
* Client nonce for verification. Download access and client-validation only.
*/
nonce?: string | null;
/**
* Error/warning reason code.
*/
reasonCode?: string | null;
/**
* Whether this volume has any concurrent access restrictions.
*/
restricted?: boolean | null;
/**
* Response signature.
*/
signature?: string | null;
/**
* Client app identifier for verification. Download access and client-validation only.
*/
source?: string | null;
/**
* Time in seconds for license auto-expiration.
*/
timeWindowSeconds?: number | null;
/**
* Identifies the volume for which this entry applies.
*/
volumeId?: string | null;
}
export interface Schema$DictionaryAnnotationdata {
/**
* The type of annotation this data is for.
*/
annotationType?: string | null;
/**
* JSON encoded data for this dictionary annotation data. Emitted with name 'data' in JSON output. Either this or geo_data will be populated.
*/
data?: Schema$Dictlayerdata;
/**
* Base64 encoded data for this annotation data.
*/
encodedData?: string | null;
/**
* Unique id for this annotation data.
*/
id?: string | null;
/**
* Resource Type
*/
kind?: string | null;
/**
* The Layer id for this data. *
*/
layerId?: string | null;
/**
* URL for this resource. *
*/
selfLink?: string | null;
/**
* Timestamp for the last time this data was updated. (RFC 3339 UTC date-time format).
*/
updated?: string | null;
/**
* The volume id for this data. *
*/
volumeId?: string | null;
}
export interface Schema$Dictlayerdata {
common?: {
title?: string;
} | null;
dict?: {
source?: {
attribution?: string;
url?: string;
};
words?: Array<{
derivatives?: Array<{
source?: {
attribution?: string;
url?: string;
};
text?: string;
}>;
examples?: Array<{
source?: {
attribution?: string;
url?: string;
};
text?: string;
}>;
senses?: Array<{
conjugations?: Array<{
type?: string;
value?: string;
}>;
definitions?: Array<{
definition?: string;
examples?: Array<{
source?: {
attribution?: string;
url?: string;
};
text?: string;
}>;
}>;
partOfSpeech?: string;
pronunciation?: string;
pronunciationUrl?: string;
source?: {
attribution?: string;
url?: string;
};
syllabification?: string;
synonyms?: Array<{
source?: {
attribution?: string;
url?: string;
};
text?: string;
}>;
}>;
source?: {
attribution?: string;
url?: string;
};
}>;
} | null;
kind?: string | null;
}
export interface Schema$Discoveryclusters {
clusters?: Array<{
banner_with_content_container?: {
fillColorArgb?: string;
imageUrl?: string;
maskColorArgb?: string;
moreButtonText?: string;
moreButtonUrl?: string;
textColorArgb?: string;
};
subTitle?: string;
title?: string;
totalVolumes?: number;
uid?: string;
volumes?: Schema$Volume[];
}> | null;
/**
* Resorce type.
*/
kind?: string | null;
totalClusters?: number | null;
}
export interface Schema$DownloadAccesses {
/**
* A list of download access responses.
*/
downloadAccessList?: Schema$DownloadAccessRestriction[];
/**
* Resource type.
*/
kind?: string | null;
}
export interface Schema$DownloadAccessRestriction {
/**
* If restricted, whether access is granted for this (user, device, volume).
*/
deviceAllowed?: boolean | null;
/**
* If restricted, the number of content download licenses already acquired (including the requesting client, if licensed).
*/
downloadsAcquired?: number | null;
/**
* If deviceAllowed, whether access was just acquired with this request.
*/
justAcquired?: boolean | null;
/**
* Resource type.
*/
kind?: string | null;
/**
* If restricted, the maximum number of content download licenses for this volume.
*/
maxDownloadDevices?: number | null;
/**
* Error/warning message.
*/
message?: string | null;
/**
* Client nonce for verification. Download access and client-validation only.
*/
nonce?: string | null;
/**
* Error/warning reason code. Additional codes may be added in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS
*/
reasonCode?: string | null;
/**
* Whether this volume has any download access restrictions.
*/
restricted?: boolean | null;
/**
* Response signature.
*/
signature?: string | null;
/**
* Client app identifier for verification. Download access and client-validation only.
*/
source?: string | null;
/**
* Identifies the volume for which this entry applies.
*/
volumeId?: string | null;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \} The JSON representation for `Empty` is empty JSON object `{\}`.
*/
export interface Schema$Empty {
}
export interface Schema$FamilyInfo {
/**
* Resource type.
*/
kind?: string | null;
/**
* Family membership info of the user that made the request.
*/
membership?: {
acquirePermission?: string;
ageGroup?: string;
allowedMaturityRating?: string;
isInFamily?: boolean;
role?: string;
} | null;
}
export interface Schema$GeoAnnotationdata {
/**
* The type of annotation this data is for.
*/
annotationType?: string | null;
/**
* JSON encoded data for this geo annotation data. Emitted with name 'data' in JSON output. Either this or dict_data will be populated.
*/
data?: Schema$Geolayerdata;
/**
* Base64 encoded data for this annotation data.
*/
encodedData?: string | null;
/**
* Unique id for this annotation data.
*/
id?: string | null;
/**
* Resource Type
*/
kind?: string | null;
/**
* The Layer id for this data. *
*/
layerId?: string | null;
/**
* URL for this resource. *
*/
selfLink?: string | null;
/**
* Timestamp for the last time this data was updated. (RFC 3339 UTC date-time format).
*/
updated?: string | null;
/**
* The volume id for this data. *
*/
volumeId?: string | null;
}
export interface Schema$Geolayerdata {
common?: {
lang?: string;
previewImageUrl?: string;
snippet?: string;
snippetUrl?: string;
title?: string;
} | null;
geo?: {
boundary?: string[];
cachePolicy?: string;
countryCode?: string;
latitude?: number;
longitude?: number;
mapType?: string;
viewport?: {
hi?: {
latitude?: number;
longitude?: number;
};
lo?: {
latitude?: number;
longitude?: number;
};
};
zoom?: number;
} | null;
kind?: string | null;
}
export interface Schema$Layersummaries {
/**
* A list of layer summary items.
*/
items?: Schema$Layersummary[];
/**
* Resource type.
*/
kind?: string | null;
/**
* The total number of layer summaries found.
*/
totalItems?: number | null;
}
export interface Schema$Layersummary {
/**
* The number of annotations for this layer.
*/
annotationCount?: number | null;
/**
* Link to get data for this annotation.
*/
annotationsDataLink?: string | null;
/**
* The link to get the annotations for this layer.
*/
annotationsLink?: string | null;
/**
* The list of annotation types contained for this layer.
*/
annotationTypes?: string[] | null;
/**
* The content version this resource is for.
*/
contentVersion?: string | null;
/**
* The number of data items for this layer.
*/
dataCount?: number | null;
/**
* Unique id of this layer summary.
*/
id?: string | null;
/**
* Resource Type
*/
kind?: string | null;
/**
* The layer id for this summary.
*/
layerId?: string | null;
/**
* URL to this resource.
*/
selfLink?: string | null;
/**
* Timestamp for the last time an item in this layer was updated. (RFC 3339 UTC date-time format).
*/
updated?: string | null;
/**
* The current version of this layer's volume annotations. Note that this version applies only to the data in the books.layers.volumeAnnotations.* responses. The actual annotation data is versioned separately.
*/
volumeAnnotationsVersion?: string | null;
/**
* The volume id this resource is for.
*/
volumeId?: string | null;
}
export interface Schema$Metadata {
/**
* A list of offline dictionary metadata.
*/
items?: Array<{
download_url?: string;
encrypted_key?: string;
language?: string;
size?: string;
version?: string;
}> | null;
/**
* Resource type.
*/
kind?: string | null;
}
export interface Schema$Notification {
body?: string | null;
/**
* The list of crm experiment ids.
*/
crmExperimentIds?: string[] | null;
doc_id?: string | null;
doc_type?: string | null;
dont_show_notification?: boolean | null;
iconUrl?: string | null;
is_document_mature?: boolean | null;
/**
* Resource type.
*/
kind?: string | null;
notificationGroup?: string | null;
notification_type?: string | null;
pcampaign_id?: string | null;
reason?: string | null;
show_notification_settings_action?: boolean | null;
targetUrl?: string | null;
timeToExpireMs?: string | null;
title?: string | null;
}
export interface Schema$Offers {
/**
* A list of offers.
*/
items?: Array<{
artUrl?: string;
gservicesKey?: string;
id?: string;
items?: Array<{
author?: string;
canonicalVolumeLink?: string;
coverUrl?: string;
description?: string;
title?: string;
volumeId?: string;
}>;
}> | null;
/**
* Resource type.
*/
kind?: string | null;
}
export interface Schema$ReadingPosition {
/**
* Position in an EPUB as a CFI.
*/
epubCfiPosition?: string | null;
/**
* Position in a volume for image-based content.
*/
gbImagePosition?: string | null;
/**
* Position in a volume for text-based content.
*/
gbTextPosition?: string | null;
/**
* Resource type for a reading position.
*/
kind?: string | null;
/**
* Position in a PDF file.
*/
pdfPosition?: string | null;
/**
* Timestamp when this reading position was last updated (formatted UTC timestamp with millisecond resolution).
*/
updated?: string | null;
/**
* Volume id associated with this reading position.
*/
volumeId?: string | null;
}
export interface Schema$RequestAccessData {
/**
* A concurrent access response.
*/
concurrentAccess?: Schema$ConcurrentAccessRestriction;
/**
* A download access response.
*/
downloadAccess?: Schema$DownloadAccessRestriction;
/**
* Resource type.
*/
kind?: string | null;
}
export interface Schema$Review {
/**
* Author of this review.
*/
author?: {
displayName?: string;
} | null;
/**
* Review text.
*/
content?: string | null;
/**
* Date of this review.
*/
date?: string | null;
/**
* URL for the full review text, for reviews gathered from the web.
*/
fullTextUrl?: string | null;
/**
* Resource type for a review.
*/
kind?: string | null;
/**
* Star rating for this review. Possible values are ONE, TWO, THREE, FOUR, FIVE or NOT_RATED.
*/
rating?: string | null;
/**
* Information regarding the source of this review, when the review is not from a Google Books user.
*/
source?: {
description?: string;
extraDescription?: string;
url?: string;
} | null;
/**
* Title for this review.
*/
title?: string | null;
/**
* Source type for this review. Possible values are EDITORIAL, WEB_USER or GOOGLE_USER.
*/
type?: string | null;
/**
* Volume that this review is for.
*/
volumeId?: string | null;
}
export interface Schema$Series {
/**
* Resource type.
*/
kind?: string | null;
series?: Array<{
bannerImageUrl?: string;
eligibleForSubscription?: boolean;
imageUrl?: string;
isComplete?: boolean;
seriesFormatType?: string;
seriesId?: string;
seriesSubscriptionReleaseInfo?: {
cancelTime?: string;
currentReleaseInfo?: {
amountInMicros?: number;
currencyCode?: string;
releaseNumber?: string;
releaseTime?: string;
};
nextReleaseInfo?: {
amountInMicros?: number;
currencyCode?: string;
releaseNumber?: string;
releaseTime?: string;
};
seriesSubscriptionType?: string;
};
seriesType?: string;
subscriptionId?: string;
title?: string;
}> | null;
}
export interface Schema$Seriesmembership {
/**
* Resorce type.
*/
kind?: string | null;
member?: Schema$Volume[];
nextPageToken?: string | null;
}
export interface Schema$Usersettings {
/**
* Resource type.
*/
kind?: string | null;
/**
* User settings in sub-objects, each for different purposes.
*/
notesExport?: {
folderName?: string;
isEnabled?: boolean;
} | null;
notification?: {
matchMyInterests?: {
opted_state?: string;
};
moreFromAuthors?: {
opted_state?: string;
};
moreFromSeries?: {
opted_state?: string;
};
priceDrop?: {
opted_state?: string;
};
rewardExpirations?: {
opted_state?: string;
};
} | null;
}
export interface Schema$Volume {
/**
* Any information about a volume related to reading or obtaining that volume text. This information can depend on country (books may be public domain in one country but not in another, e.g.).
*/
accessInfo?: {
accessViewStatus?: string;
country?: string;
downloadAccess?: Schema$DownloadAccessRestriction;
driveImportedContentLink?: string;
embeddable?: boolean;
epub?: {
acsTokenLink?: string;
downloadLink?: string;
isAvailable?: boolean;
};
explicitOfflineLicenseManagement?: boolean;
pdf?: {
acsTokenLink?: string;
downloadLink?: string;
isAvailable?: boolean;
};
publicDomain?: boolean;
quoteSharingAllowed?: boolean;
textToSpeechPermission?: string;
viewOrderUrl?: string;
viewability?: string;
webReaderLink?: string;
} | null;
/**
* Opaque identifier for a specific version of a volume resource. (In LITE projection)
*/
etag?: string | null;
/**
* Unique identifier for a volume. (In LITE projection.)
*/
id?: string | null;
/**
* Resource type for a volume. (In LITE projection.)
*/
kind?: string | null;
/**
* What layers exist in this volume and high level information about them.
*/
layerInfo?: {
layers?: Array<{
layerId?: string;
volumeAnnotationsVersion?: string;
}>;
} | null;
/**
* Recommendation related information for this volume.
*/
recommendedInfo?: {
explanation?: string;
} | null;
/**
* Any information about a volume related to the eBookstore and/or purchaseability. This information can depend on the country where the request originates from (i.e. books may not be for sale in certain countries).
*/
saleInfo?: {
buyLink?: string;
country?: string;
isEbook?: boolean;
listPrice?: {
amount?: number;
currencyCode?: string;
};
offers?: Array<{
finskyOfferType?: number;
giftable?: boolean;
listPrice?: {
amountInMicros?: number;
currencyCode?: string;
};
rentalDuration?: {
count?: number;
unit?: string;
};
retailPrice?: {
amountInMicros?: number;
currencyCode?: string;
};
}>;
onSaleDate?: string;
retailPrice?: {
amount?: number;
currencyCode?: string;
};
saleability?: string;
} | null;
/**
* Search result information related to this volume.
*/
searchInfo?: {
textSnippet?: string;
} | null;
/**
* URL to this resource. (In LITE projection.)
*/
selfLink?: string | null;
/**
* User specific information related to this volume. (e.g. page this user last read or whether they purchased this book)
*/
userInfo?: {
acquiredTime?: string;
acquisitionType?: number;
copy?: {
allowedCharacterCount?: number;
limitType?: string;
remainingCharacterCount?: number;
updated?: string;
};
entitlementType?: number;
familySharing?: {
familyRole?: string;
isSharingAllowed?: boolean;
isSharingDisabledByFop?: boolean;
};
isFamilySharedFromUser?: boolean;
isFamilySharedToUser?: boolean;
isFamilySharingAllowed?: boolean;
isFamilySharingDisabledByFop?: boolean;
isInMyBooks?: boolean;
isPreordered?: boolean;
isPurchased?: boolean;
isUploaded?: boolean;
readingPosition?: Schema$ReadingPosition;
rentalPeriod?: {
endUtcSec?: string;
startUtcSec?: string;
};
rentalState?: string;
review?: Schema$Review;
updated?: string;
userUploadedVolumeInfo?: {
processingState?: string;
};
} | null;
/**
* General volume information.
*/
volumeInfo?: {
allowAnonLogging?: boolean;
authors?: string[];
averageRating?: number;
canonicalVolumeLink?: string;
categories?: string[];
comicsContent?: boolean;
contentVersion?: string;
description?: string;
dimensions?: {
height?: string;
thickness?: string;
width?: string;
};
imageLinks?: {
extraLarge?: string;
large?: string;
medium?: string;
small?: string;
smallThumbnail?: string;
thumbnail?: string;
};
industryIdentifiers?: Array<{
identifier?: string;
type?: string;
}>;
infoLink?: string;
language?: string;
mainCategory?: string;
maturityRating?: string;
pageCount?: number;
panelizationSummary?: {
containsEpubBubbles?: boolean;
containsImageBubbles?: boolean;
epubBubbleVersion?: string;
imageBubbleVersion?: string;
};
previewLink?: string;
printType?: string;
printedPageCount?: number;
publishedDate?: string;
publisher?: string;
ratingsCount?: number;
readingModes?: {
image?: boolean;
text?: boolean;
};
samplePageCount?: number;
seriesInfo?: Schema$Volumeseriesinfo;
subtitle?: string;
title?: string;
} | null;
}
export interface Schema$Volume2 {
/**
* A list of volumes.
*/
items?: Schema$Volume[];
/**
* Resource type.
*/
kind?: string | null;
nextPageToken?: string | null;
}
export interface Schema$Volumeannotation {
/**
* The annotation data id for this volume annotation.
*/
annotationDataId?: string | null;
/**
* Link to get data for this annotation.
*/
annotationDataLink?: string | null;
/**
* The type of annotation this is.
*/
annotationType?: string | null;
/**
* The content ranges to identify the selected text.
*/
contentRanges?: {
cfiRange?: Schema$BooksAnnotationsRange;
contentVersion?: string;
gbImageRange?: Schema$BooksAnnotationsRange;
gbTextRange?: Schema$BooksAnnotationsRange;
} | null;
/**
* Data for this annotation.
*/
data?: string | null;
/**
* Indicates that this annotation is deleted.
*/
deleted?: boolean | null;
/**
* Unique id of this volume annotation.
*/
id?: string | null;
/**
* Resource Type
*/
kind?: string | null;
/**
* The Layer this annotation is for.
*/
layerId?: string | null;
/**
* Pages the annotation spans.
*/
pageIds?: string[] | null;
/**
* Excerpt from the volume.
*/
selectedText?: string | null;
/**
* URL to this resource.
*/
selfLink?: string | null;
/**
* Timestamp for the last time this anntoation was updated. (RFC 3339 UTC date-time format).
*/
updated?: string | null;
/**
* The Volume this annotation is for.
*/
volumeId?: string | null;
}
export interface Schema$Volumeannotations {
/**
* A list of volume annotations.
*/
items?: Schema$Volumeannotation[];
/**
* Resource type
*/
kind?: string | null;
/**
* Token to pass in for pagination for the next page. This will not be present if this request does not have more results.
*/
nextPageToken?: string | null;
/**
* The total number of volume annotations found.
*/
totalItems?: number | null;
/**
* The version string for all of the volume annotations in this layer (not just the ones in this response). Note: the version string doesn't apply to the annotation data, just the information in this response (e.g. the location of annotations in the book).
*/
version?: string | null;
}
export interface Schema$Volumes {
/**
* A list of volumes.
*/
items?: Schema$Volume[];
/**
* Resource type.
*/
kind?: string | null;
/**
* Total number of volumes found. This might be greater than the number of volumes returned in this response if results have been paginated.
*/
totalItems?: number | null;
}
export interface Schema$Volumeseriesinfo {
/**
* The display number string. This should be used only for display purposes and the actual sequence should be inferred from the below orderNumber.
*/
bookDisplayNumber?: string | null;
/**
* Resource type.
*/
kind?: string | null;
/**
* Short book title in the context of the series.
*/
shortSeriesBookTitle?: string | null;
volumeSeries?: Array<{
issue?: Array<{
issueDisplayNumber?: string;
issueOrderNumber?: number;
}>;
orderNumber?: number;
seriesBookType?: string;
seriesId?: string;
}> | null;
}
export class Resource$Bookshelves {
context: APIRequestContext;
volumes: Resource$Bookshelves$Volumes;
constructor(context: APIRequestContext);
/**
* Retrieves metadata for a specific bookshelf for the specified user.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/books.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const books = google.books('v1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/books'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await books.bookshelves.get({
* // ID of bookshelf to retrieve.
* shelf: 'placeholder-value',
* // String to identify the originator of this request.
* source: 'placeholder-value',
* // ID of user for whom to retrieve bookshelves.
* userId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "access": "my_access",
* // "created": "my_created",
* // "description": "my_description",
* // "id": 0,
* // "kind": "my_kind",
* // "selfLink": "my_selfLink",
* // "title": "my_title",
* // "updated": "my_updated",
* // "volumeCount": 0,
* // "volumesLastUpdated": "my_volumesLastUpdated"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
get(params: Params$Resource$Bookshelves$Get, options: StreamMethodOptions): GaxiosPromise<Readable>;
get(params?: Params$Resource$Bookshelves$Get, options?: MethodOptions): GaxiosPromise<Schema$Bookshelf>;
get(params: Params$Resource$Bookshelves$Get, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
get(params: Params$Resource$Bookshelves$Get, options: MethodOptions | BodyResponseCallback<Schema$Bookshelf>, callback: BodyResponseCallback<Schema$Bookshelf>): void;
get(params: Params$Resource$Bookshelves$Get, callback: BodyResponseCallback<Schema$Bookshelf>): void;
get(callback: BodyResponseCallback<Schema$Bookshelf>): void;
/**
* Retrieves a list of public bookshelves for the specified user.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/books.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const books = google.books('v1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/books'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await books.bookshelves.list({
* // String to identify the originator of this request.
* source: 'placeholder-value',
* // ID of user for whom to retrieve bookshelves.
* userId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "items": [],
* // "kind": "my_kind"
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
list(params: Params$Resource$Bookshelves$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
list(params?: Params$Resource$Bookshelves$List, options?: MethodOptions): GaxiosPromise<Schema$Bookshelves>;
list(params: Params$Resource$Bookshelves$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Bookshelves$List, options: MethodOptions | BodyResponseCallback<Schema$Bookshelves>, callback: BodyResponseCallback<Schema$Bookshelves>): void;
list(params: Params$Resource$Bookshelves$List, callback: BodyResponseCallback<Schema$Bookshelves>): void;
list(callback: BodyResponseCallback<Schema$Bookshelves>): void;
}
export interface Params$Resource$Bookshelves$Get extends StandardParameters {
/**
* ID of bookshelf to retrieve.
*/
shelf?: string;
/**
* String to identify the originator of this request.
*/
source?: string;
/**
* ID of user for whom to retrieve bookshelves.
*/
userId?: string;
}
export interface Params$Resource$Bookshelves$List extends StandardParameters {
/**
* String to identify the originator of this request.
*/
source?: string;
/**
* ID of user for whom to retrieve bookshelves.
*/
userId?: string;
}
export class Resource$Bookshelves$Volumes {
context: APIRequestContext;
constructor(context: APIRequestContext);
/**
* Retrieves volumes in a specific bookshelf for the specified user.
* @example
* ```js
* // Before running the sample:
* // - Enable the API at:
* // https://console.developers.google.com/apis/api/books.googleapis.com
* // - Login into gcloud by running:
* // `$ gcloud auth application-default login`
* // - Install the npm module by running:
* // `$ npm install googleapis`
*
* const {google} = require('googleapis');
* const books = google.books('v1');
*
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/books'],
* });
*
* // Acquire an auth client, and bind it to all future calls
* const authClient = await auth.getClient();
* google.options({auth: authClient});
*
* // Do the magic
* const res = await books.bookshelves.volumes.list({
* // Maximum number of results to return
* maxResults: 'placeholder-value',
* // ID of bookshelf to retrieve volumes.
* shelf: 'placeholder-value',
* // Set to true to show pre-ordered books. Defaults to false.
* showPreorders: 'placeholder-value',
* // String to identify the originator of this request.
* source: 'placeholder-value',
* // Index of the first element to return (starts at 0)
* startIndex: 'placeholder-value',
* // ID of user for whom to retrieve bookshelf volumes.
* userId: 'placeholder-value',
* });
* console.log(res.data);
*
* // Example response
* // {
* // "items": [],
* // "kind": "my_kind",
* // "totalItems": 0
* // }
* }
*
* main().catch(e => {
* console.error(e);
* throw e;
* });
*
* ```
*
* @param params - Parameters for request
* @param options - Optionally override request options, such as `url`, `method`, and `encoding`.
* @param callback - Optional callback that handles the response.
* @returns A promise if used with async/await, or void if used with a callback.
*/
list(params: Params$Resource$Bookshelves$Volumes$List, options: StreamMethodOptions): GaxiosPromise<Readable>;
list(params?: Params$Resource$Bookshelves$Volumes$List, options?: MethodOptions): GaxiosPromise<Schema$Volumes>;
list(params: Params$Resource$Bookshelves$Volumes$List, options: StreamMethodOptions | BodyResponseCallback<Readable>, callback: BodyResponseCallback<Readable>): void;
list(params: Params$Resource$Bookshelves$Volumes$List, options: MethodOptions | BodyResponseCallback<Schema$Volumes>, callback: BodyResponseCallback<Schema$Volumes>): void;
list(params: Params$Resource$Bookshelves$Volumes$List, callback: BodyResponseCallback<Schema$Volumes>): void;
list(callback: BodyResponseCallback<Schema$Volumes>): void;
}
export interface Params$Resource$Bookshelves$Volumes$List extends StandardParameters {
/**
* Maximum number of results to return
*/
maxResults?: number;
/**
* ID of bookshelf to retrieve volumes.
*/
shelf?: string;
/**
* Set to true to show pre-ordered books. Defaults to false.
*/
showPreorders?: boolean;
/**
* String to identify the originator of this request.
*/
source?: string;
/**
* Index of the first element to return (starts at