1
// Package books provides access to the Books API.
3
// See https://developers.google.com/books/docs/v1/getting_started
7
// import "google.golang.org/api/books/v1"
9
// booksService, err := books.New(oauthHttpClient)
17
"google.golang.org/api/googleapi"
25
// Always reference these packages, just in case the auto-generated code
27
var _ = bytes.NewBuffer
30
var _ = json.NewDecoder
33
var _ = googleapi.Version
35
var _ = strings.Replace
37
const apiId = "books:v1"
38
const apiName = "books"
39
const apiVersion = "v1"
40
const basePath = "https://www.googleapis.com/books/v1/"
42
// OAuth2 scopes used by this API.
45
BooksScope = "https://www.googleapis.com/auth/books"
48
func New(client *http.Client) (*Service, error) {
50
return nil, errors.New("client is nil")
52
s := &Service{client: client, BasePath: basePath}
53
s.Bookshelves = NewBookshelvesService(s)
54
s.Cloudloading = NewCloudloadingService(s)
55
s.Layers = NewLayersService(s)
56
s.Myconfig = NewMyconfigService(s)
57
s.Mylibrary = NewMylibraryService(s)
58
s.Promooffer = NewPromoofferService(s)
59
s.Volumes = NewVolumesService(s)
65
BasePath string // API endpoint base URL
67
Bookshelves *BookshelvesService
69
Cloudloading *CloudloadingService
73
Myconfig *MyconfigService
75
Mylibrary *MylibraryService
77
Promooffer *PromoofferService
79
Volumes *VolumesService
82
func NewBookshelvesService(s *Service) *BookshelvesService {
83
rs := &BookshelvesService{s: s}
84
rs.Volumes = NewBookshelvesVolumesService(s)
88
type BookshelvesService struct {
91
Volumes *BookshelvesVolumesService
94
func NewBookshelvesVolumesService(s *Service) *BookshelvesVolumesService {
95
rs := &BookshelvesVolumesService{s: s}
99
type BookshelvesVolumesService struct {
103
func NewCloudloadingService(s *Service) *CloudloadingService {
104
rs := &CloudloadingService{s: s}
108
type CloudloadingService struct {
112
func NewLayersService(s *Service) *LayersService {
113
rs := &LayersService{s: s}
114
rs.AnnotationData = NewLayersAnnotationDataService(s)
115
rs.VolumeAnnotations = NewLayersVolumeAnnotationsService(s)
119
type LayersService struct {
122
AnnotationData *LayersAnnotationDataService
124
VolumeAnnotations *LayersVolumeAnnotationsService
127
func NewLayersAnnotationDataService(s *Service) *LayersAnnotationDataService {
128
rs := &LayersAnnotationDataService{s: s}
132
type LayersAnnotationDataService struct {
136
func NewLayersVolumeAnnotationsService(s *Service) *LayersVolumeAnnotationsService {
137
rs := &LayersVolumeAnnotationsService{s: s}
141
type LayersVolumeAnnotationsService struct {
145
func NewMyconfigService(s *Service) *MyconfigService {
146
rs := &MyconfigService{s: s}
150
type MyconfigService struct {
154
func NewMylibraryService(s *Service) *MylibraryService {
155
rs := &MylibraryService{s: s}
156
rs.Annotations = NewMylibraryAnnotationsService(s)
157
rs.Bookshelves = NewMylibraryBookshelvesService(s)
158
rs.Readingpositions = NewMylibraryReadingpositionsService(s)
162
type MylibraryService struct {
165
Annotations *MylibraryAnnotationsService
167
Bookshelves *MylibraryBookshelvesService
169
Readingpositions *MylibraryReadingpositionsService
172
func NewMylibraryAnnotationsService(s *Service) *MylibraryAnnotationsService {
173
rs := &MylibraryAnnotationsService{s: s}
177
type MylibraryAnnotationsService struct {
181
func NewMylibraryBookshelvesService(s *Service) *MylibraryBookshelvesService {
182
rs := &MylibraryBookshelvesService{s: s}
183
rs.Volumes = NewMylibraryBookshelvesVolumesService(s)
187
type MylibraryBookshelvesService struct {
190
Volumes *MylibraryBookshelvesVolumesService
193
func NewMylibraryBookshelvesVolumesService(s *Service) *MylibraryBookshelvesVolumesService {
194
rs := &MylibraryBookshelvesVolumesService{s: s}
198
type MylibraryBookshelvesVolumesService struct {
202
func NewMylibraryReadingpositionsService(s *Service) *MylibraryReadingpositionsService {
203
rs := &MylibraryReadingpositionsService{s: s}
207
type MylibraryReadingpositionsService struct {
211
func NewPromoofferService(s *Service) *PromoofferService {
212
rs := &PromoofferService{s: s}
216
type PromoofferService struct {
220
func NewVolumesService(s *Service) *VolumesService {
221
rs := &VolumesService{s: s}
222
rs.Associated = NewVolumesAssociatedService(s)
223
rs.Mybooks = NewVolumesMybooksService(s)
224
rs.Recommended = NewVolumesRecommendedService(s)
225
rs.Useruploaded = NewVolumesUseruploadedService(s)
229
type VolumesService struct {
232
Associated *VolumesAssociatedService
234
Mybooks *VolumesMybooksService
236
Recommended *VolumesRecommendedService
238
Useruploaded *VolumesUseruploadedService
241
func NewVolumesAssociatedService(s *Service) *VolumesAssociatedService {
242
rs := &VolumesAssociatedService{s: s}
246
type VolumesAssociatedService struct {
250
func NewVolumesMybooksService(s *Service) *VolumesMybooksService {
251
rs := &VolumesMybooksService{s: s}
255
type VolumesMybooksService struct {
259
func NewVolumesRecommendedService(s *Service) *VolumesRecommendedService {
260
rs := &VolumesRecommendedService{s: s}
264
type VolumesRecommendedService struct {
268
func NewVolumesUseruploadedService(s *Service) *VolumesUseruploadedService {
269
rs := &VolumesUseruploadedService{s: s}
273
type VolumesUseruploadedService struct {
277
type Annotation struct {
278
// AfterSelectedText: Anchor text after excerpt. For requests, if the
279
// user bookmarked a screen that has no flowing text on it, then this
280
// field should be empty.
281
AfterSelectedText string `json:"afterSelectedText,omitempty"`
283
// BeforeSelectedText: Anchor text before excerpt. For requests, if the
284
// user bookmarked a screen that has no flowing text on it, then this
285
// field should be empty.
286
BeforeSelectedText string `json:"beforeSelectedText,omitempty"`
288
// ClientVersionRanges: Selection ranges sent from the client.
289
ClientVersionRanges *AnnotationClientVersionRanges `json:"clientVersionRanges,omitempty"`
291
// Created: Timestamp for the created time of this annotation.
292
Created string `json:"created,omitempty"`
294
// CurrentVersionRanges: Selection ranges for the most recent content
296
CurrentVersionRanges *AnnotationCurrentVersionRanges `json:"currentVersionRanges,omitempty"`
298
// Data: User-created data for this annotation.
299
Data string `json:"data,omitempty"`
301
// Deleted: Indicates that this annotation is deleted.
302
Deleted bool `json:"deleted,omitempty"`
304
// HighlightStyle: The highlight style for this annotation.
305
HighlightStyle string `json:"highlightStyle,omitempty"`
307
// Id: Id of this annotation, in the form of a GUID.
308
Id string `json:"id,omitempty"`
310
// Kind: Resource type.
311
Kind string `json:"kind,omitempty"`
313
// LayerId: The layer this annotation is for.
314
LayerId string `json:"layerId,omitempty"`
316
LayerSummary *AnnotationLayerSummary `json:"layerSummary,omitempty"`
318
// PageIds: Pages that this annotation spans.
319
PageIds []string `json:"pageIds,omitempty"`
321
// SelectedText: Excerpt from the volume.
322
SelectedText string `json:"selectedText,omitempty"`
324
// SelfLink: URL to this resource.
325
SelfLink string `json:"selfLink,omitempty"`
327
// Updated: Timestamp for the last time this annotation was modified.
328
Updated string `json:"updated,omitempty"`
330
// VolumeId: The volume that this annotation belongs to.
331
VolumeId string `json:"volumeId,omitempty"`
334
type AnnotationClientVersionRanges struct {
335
// CfiRange: Range in CFI format for this annotation sent by client.
336
CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
338
// ContentVersion: Content version the client sent in.
339
ContentVersion string `json:"contentVersion,omitempty"`
341
// GbImageRange: Range in GB image format for this annotation sent by
343
GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
345
// GbTextRange: Range in GB text format for this annotation sent by
347
GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
349
// ImageCfiRange: Range in image CFI format for this annotation sent by
351
ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
354
type AnnotationCurrentVersionRanges struct {
355
// CfiRange: Range in CFI format for this annotation for version above.
356
CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
358
// ContentVersion: Content version applicable to ranges below.
359
ContentVersion string `json:"contentVersion,omitempty"`
361
// GbImageRange: Range in GB image format for this annotation for
363
GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
365
// GbTextRange: Range in GB text format for this annotation for version
367
GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
369
// ImageCfiRange: Range in image CFI format for this annotation for
371
ImageCfiRange *BooksAnnotationsRange `json:"imageCfiRange,omitempty"`
374
type AnnotationLayerSummary struct {
375
// AllowedCharacterCount: Maximum allowed characters on this layer,
376
// especially for the "copy" layer.
377
AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
379
// LimitType: Type of limitation on this layer. "limited" or "unlimited"
380
// for the "copy" layer.
381
LimitType string `json:"limitType,omitempty"`
383
// RemainingCharacterCount: Remaining allowed characters on this layer,
384
// especially for the "copy" layer.
385
RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
388
type Annotationdata struct {
389
// AnnotationType: The type of annotation this data is for.
390
AnnotationType string `json:"annotationType,omitempty"`
392
Data interface{} `json:"data,omitempty"`
394
// Encoded_data: Base64 encoded data for this annotation data.
395
Encoded_data string `json:"encoded_data,omitempty"`
397
// Id: Unique id for this annotation data.
398
Id string `json:"id,omitempty"`
400
// Kind: Resource Type
401
Kind string `json:"kind,omitempty"`
403
// LayerId: The Layer id for this data. *
404
LayerId string `json:"layerId,omitempty"`
406
// SelfLink: URL for this resource. *
407
SelfLink string `json:"selfLink,omitempty"`
409
// Updated: Timestamp for the last time this data was updated. (RFC 3339
410
// UTC date-time format).
411
Updated string `json:"updated,omitempty"`
413
// VolumeId: The volume id for this data. *
414
VolumeId string `json:"volumeId,omitempty"`
417
type Annotations struct {
418
// Items: A list of annotations.
419
Items []*Annotation `json:"items,omitempty"`
421
// Kind: Resource type.
422
Kind string `json:"kind,omitempty"`
424
// NextPageToken: Token to pass in for pagination for the next page.
425
// This will not be present if this request does not have more results.
426
NextPageToken string `json:"nextPageToken,omitempty"`
428
// TotalItems: Total number of annotations found. This may be greater
429
// than the number of notes returned in this response if results have
431
TotalItems int64 `json:"totalItems,omitempty"`
434
type AnnotationsSummary struct {
435
Kind string `json:"kind,omitempty"`
437
Layers []*AnnotationsSummaryLayers `json:"layers,omitempty"`
440
type AnnotationsSummaryLayers struct {
441
AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
443
LayerId string `json:"layerId,omitempty"`
445
LimitType string `json:"limitType,omitempty"`
447
RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
449
Updated string `json:"updated,omitempty"`
452
type Annotationsdata struct {
453
// Items: A list of Annotation Data.
454
Items []*Annotationdata `json:"items,omitempty"`
456
// Kind: Resource type
457
Kind string `json:"kind,omitempty"`
459
// NextPageToken: Token to pass in for pagination for the next page.
460
// This will not be present if this request does not have more results.
461
NextPageToken string `json:"nextPageToken,omitempty"`
463
// TotalItems: The total number of volume annotations found.
464
TotalItems int64 `json:"totalItems,omitempty"`
467
type BooksAnnotationsRange struct {
468
// EndOffset: The offset from the ending position.
469
EndOffset string `json:"endOffset,omitempty"`
471
// EndPosition: The ending position for the range.
472
EndPosition string `json:"endPosition,omitempty"`
474
// StartOffset: The offset from the starting position.
475
StartOffset string `json:"startOffset,omitempty"`
477
// StartPosition: The starting position for the range.
478
StartPosition string `json:"startPosition,omitempty"`
481
type BooksCloudloadingResource struct {
482
Author string `json:"author,omitempty"`
484
ProcessingState string `json:"processingState,omitempty"`
486
Title string `json:"title,omitempty"`
488
VolumeId string `json:"volumeId,omitempty"`
491
type BooksVolumesRecommendedRateResponse struct {
492
Consistency_token string `json:"consistency_token,omitempty"`
495
type Bookshelf struct {
496
// Access: Whether this bookshelf is PUBLIC or PRIVATE.
497
Access string `json:"access,omitempty"`
499
// Created: Created time for this bookshelf (formatted UTC timestamp
500
// with millisecond resolution).
501
Created string `json:"created,omitempty"`
503
// Description: Description of this bookshelf.
504
Description string `json:"description,omitempty"`
506
// Id: Id of this bookshelf, only unique by user.
507
Id int64 `json:"id,omitempty"`
509
// Kind: Resource type for bookshelf metadata.
510
Kind string `json:"kind,omitempty"`
512
// SelfLink: URL to this resource.
513
SelfLink string `json:"selfLink,omitempty"`
515
// Title: Title of this bookshelf.
516
Title string `json:"title,omitempty"`
518
// Updated: Last modified time of this bookshelf (formatted UTC
519
// timestamp with millisecond resolution).
520
Updated string `json:"updated,omitempty"`
522
// VolumeCount: Number of volumes in this bookshelf.
523
VolumeCount int64 `json:"volumeCount,omitempty"`
525
// VolumesLastUpdated: Last time a volume was added or removed from this
526
// bookshelf (formatted UTC timestamp with millisecond resolution).
527
VolumesLastUpdated string `json:"volumesLastUpdated,omitempty"`
530
type Bookshelves struct {
531
// Items: A list of bookshelves.
532
Items []*Bookshelf `json:"items,omitempty"`
534
// Kind: Resource type.
535
Kind string `json:"kind,omitempty"`
538
type ConcurrentAccessRestriction struct {
539
// DeviceAllowed: Whether access is granted for this (user, device,
541
DeviceAllowed bool `json:"deviceAllowed,omitempty"`
543
// Kind: Resource type.
544
Kind string `json:"kind,omitempty"`
546
// MaxConcurrentDevices: The maximum number of concurrent access
547
// licenses for this volume.
548
MaxConcurrentDevices int64 `json:"maxConcurrentDevices,omitempty"`
550
// Message: Error/warning message.
551
Message string `json:"message,omitempty"`
553
// Nonce: Client nonce for verification. Download access and
554
// client-validation only.
555
Nonce string `json:"nonce,omitempty"`
557
// ReasonCode: Error/warning reason code.
558
ReasonCode string `json:"reasonCode,omitempty"`
560
// Restricted: Whether this volume has any concurrent access
562
Restricted bool `json:"restricted,omitempty"`
564
// Signature: Response signature.
565
Signature string `json:"signature,omitempty"`
567
// Source: Client app identifier for verification. Download access and
568
// client-validation only.
569
Source string `json:"source,omitempty"`
571
// TimeWindowSeconds: Time in seconds for license auto-expiration.
572
TimeWindowSeconds int64 `json:"timeWindowSeconds,omitempty"`
574
// VolumeId: Identifies the volume for which this entry applies.
575
VolumeId string `json:"volumeId,omitempty"`
578
type Dictlayerdata struct {
579
Common *DictlayerdataCommon `json:"common,omitempty"`
581
Dict *DictlayerdataDict `json:"dict,omitempty"`
583
Kind string `json:"kind,omitempty"`
586
type DictlayerdataCommon struct {
587
// Title: The display title and localized canonical name to use when
588
// searching for this entity on Google search.
589
Title string `json:"title,omitempty"`
592
type DictlayerdataDict struct {
593
// Source: The source, url and attribution for this dictionary data.
594
Source *DictlayerdataDictSource `json:"source,omitempty"`
596
Words []*DictlayerdataDictWords `json:"words,omitempty"`
599
type DictlayerdataDictSource struct {
600
Attribution string `json:"attribution,omitempty"`
602
Url string `json:"url,omitempty"`
605
type DictlayerdataDictWords struct {
606
Derivatives []*DictlayerdataDictWordsDerivatives `json:"derivatives,omitempty"`
608
Examples []*DictlayerdataDictWordsExamples `json:"examples,omitempty"`
610
Senses []*DictlayerdataDictWordsSenses `json:"senses,omitempty"`
612
// Source: The words with different meanings but not related words, e.g.
613
// "go" (game) and "go" (verb).
614
Source *DictlayerdataDictWordsSource `json:"source,omitempty"`
617
type DictlayerdataDictWordsDerivatives struct {
618
Source *DictlayerdataDictWordsDerivativesSource `json:"source,omitempty"`
620
Text string `json:"text,omitempty"`
623
type DictlayerdataDictWordsDerivativesSource struct {
624
Attribution string `json:"attribution,omitempty"`
626
Url string `json:"url,omitempty"`
629
type DictlayerdataDictWordsExamples struct {
630
Source *DictlayerdataDictWordsExamplesSource `json:"source,omitempty"`
632
Text string `json:"text,omitempty"`
635
type DictlayerdataDictWordsExamplesSource struct {
636
Attribution string `json:"attribution,omitempty"`
638
Url string `json:"url,omitempty"`
641
type DictlayerdataDictWordsSenses struct {
642
Conjugations []*DictlayerdataDictWordsSensesConjugations `json:"conjugations,omitempty"`
644
Definitions []*DictlayerdataDictWordsSensesDefinitions `json:"definitions,omitempty"`
646
PartOfSpeech string `json:"partOfSpeech,omitempty"`
648
Pronunciation string `json:"pronunciation,omitempty"`
650
PronunciationUrl string `json:"pronunciationUrl,omitempty"`
652
Source *DictlayerdataDictWordsSensesSource `json:"source,omitempty"`
654
Syllabification string `json:"syllabification,omitempty"`
656
Synonyms []*DictlayerdataDictWordsSensesSynonyms `json:"synonyms,omitempty"`
659
type DictlayerdataDictWordsSensesConjugations struct {
660
Type string `json:"type,omitempty"`
662
Value string `json:"value,omitempty"`
665
type DictlayerdataDictWordsSensesDefinitions struct {
666
Definition string `json:"definition,omitempty"`
668
Examples []*DictlayerdataDictWordsSensesDefinitionsExamples `json:"examples,omitempty"`
671
type DictlayerdataDictWordsSensesDefinitionsExamples struct {
672
Source *DictlayerdataDictWordsSensesDefinitionsExamplesSource `json:"source,omitempty"`
674
Text string `json:"text,omitempty"`
677
type DictlayerdataDictWordsSensesDefinitionsExamplesSource struct {
678
Attribution string `json:"attribution,omitempty"`
680
Url string `json:"url,omitempty"`
683
type DictlayerdataDictWordsSensesSource struct {
684
Attribution string `json:"attribution,omitempty"`
686
Url string `json:"url,omitempty"`
689
type DictlayerdataDictWordsSensesSynonyms struct {
690
Source *DictlayerdataDictWordsSensesSynonymsSource `json:"source,omitempty"`
692
Text string `json:"text,omitempty"`
695
type DictlayerdataDictWordsSensesSynonymsSource struct {
696
Attribution string `json:"attribution,omitempty"`
698
Url string `json:"url,omitempty"`
701
type DictlayerdataDictWordsSource struct {
702
Attribution string `json:"attribution,omitempty"`
704
Url string `json:"url,omitempty"`
707
type DownloadAccessRestriction struct {
708
// DeviceAllowed: If restricted, whether access is granted for this
709
// (user, device, volume).
710
DeviceAllowed bool `json:"deviceAllowed,omitempty"`
712
// DownloadsAcquired: If restricted, the number of content download
713
// licenses already acquired (including the requesting client, if
715
DownloadsAcquired int64 `json:"downloadsAcquired,omitempty"`
717
// JustAcquired: If deviceAllowed, whether access was just acquired with
719
JustAcquired bool `json:"justAcquired,omitempty"`
721
// Kind: Resource type.
722
Kind string `json:"kind,omitempty"`
724
// MaxDownloadDevices: If restricted, the maximum number of content
725
// download licenses for this volume.
726
MaxDownloadDevices int64 `json:"maxDownloadDevices,omitempty"`
728
// Message: Error/warning message.
729
Message string `json:"message,omitempty"`
731
// Nonce: Client nonce for verification. Download access and
732
// client-validation only.
733
Nonce string `json:"nonce,omitempty"`
735
// ReasonCode: Error/warning reason code. Additional codes may be added
736
// in the future. 0 OK 100 ACCESS_DENIED_PUBLISHER_LIMIT 101
737
// ACCESS_DENIED_LIMIT 200 WARNING_USED_LAST_ACCESS
738
ReasonCode string `json:"reasonCode,omitempty"`
740
// Restricted: Whether this volume has any download access restrictions.
741
Restricted bool `json:"restricted,omitempty"`
743
// Signature: Response signature.
744
Signature string `json:"signature,omitempty"`
746
// Source: Client app identifier for verification. Download access and
747
// client-validation only.
748
Source string `json:"source,omitempty"`
750
// VolumeId: Identifies the volume for which this entry applies.
751
VolumeId string `json:"volumeId,omitempty"`
754
type DownloadAccesses struct {
755
// DownloadAccessList: A list of download access responses.
756
DownloadAccessList []*DownloadAccessRestriction `json:"downloadAccessList,omitempty"`
758
// Kind: Resource type.
759
Kind string `json:"kind,omitempty"`
762
type Geolayerdata struct {
763
Common *GeolayerdataCommon `json:"common,omitempty"`
765
Geo *GeolayerdataGeo `json:"geo,omitempty"`
767
Kind string `json:"kind,omitempty"`
770
type GeolayerdataCommon struct {
771
// Lang: The language of the information url and description.
772
Lang string `json:"lang,omitempty"`
774
// PreviewImageUrl: The URL for the preview image information.
775
PreviewImageUrl string `json:"previewImageUrl,omitempty"`
777
// Snippet: The description for this location.
778
Snippet string `json:"snippet,omitempty"`
780
// SnippetUrl: The URL for information for this location. Ex: wikipedia
782
SnippetUrl string `json:"snippetUrl,omitempty"`
784
// Title: The display title and localized canonical name to use when
785
// searching for this entity on Google search.
786
Title string `json:"title,omitempty"`
789
type GeolayerdataGeo struct {
790
// Boundary: The boundary of the location as a set of loops containing
791
// pairs of latitude, longitude coordinates.
792
Boundary [][]*GeolayerdataGeoBoundaryItem `json:"boundary,omitempty"`
794
// CachePolicy: The cache policy active for this data. EX: UNRESTRICTED,
796
CachePolicy string `json:"cachePolicy,omitempty"`
798
// CountryCode: The country code of the location.
799
CountryCode string `json:"countryCode,omitempty"`
801
// Latitude: The latitude of the location.
802
Latitude float64 `json:"latitude,omitempty"`
804
// Longitude: The longitude of the location.
805
Longitude float64 `json:"longitude,omitempty"`
807
// MapType: The type of map that should be used for this location. EX:
808
// HYBRID, ROADMAP, SATELLITE, TERRAIN
809
MapType string `json:"mapType,omitempty"`
811
// Viewport: The viewport for showing this location. This is a latitude,
812
// longitude rectangle.
813
Viewport *GeolayerdataGeoViewport `json:"viewport,omitempty"`
815
// Zoom: The Zoom level to use for the map. Zoom levels between 0 (the
816
// lowest zoom level, in which the entire world can be seen on one map)
817
// to 21+ (down to individual buildings). See:
818
// https://developers.google.com/maps/documentation/staticmaps/#Zoomlevel
820
Zoom int64 `json:"zoom,omitempty"`
823
type GeolayerdataGeoBoundaryItem struct {
824
Latitude int64 `json:"latitude,omitempty"`
826
Longitude int64 `json:"longitude,omitempty"`
829
type GeolayerdataGeoViewport struct {
830
Hi *GeolayerdataGeoViewportHi `json:"hi,omitempty"`
832
Lo *GeolayerdataGeoViewportLo `json:"lo,omitempty"`
835
type GeolayerdataGeoViewportHi struct {
836
Latitude float64 `json:"latitude,omitempty"`
838
Longitude float64 `json:"longitude,omitempty"`
841
type GeolayerdataGeoViewportLo struct {
842
Latitude float64 `json:"latitude,omitempty"`
844
Longitude float64 `json:"longitude,omitempty"`
847
type Layersummaries struct {
848
// Items: A list of layer summary items.
849
Items []*Layersummary `json:"items,omitempty"`
851
// Kind: Resource type.
852
Kind string `json:"kind,omitempty"`
854
// TotalItems: The total number of layer summaries found.
855
TotalItems int64 `json:"totalItems,omitempty"`
858
type Layersummary struct {
859
// AnnotationCount: The number of annotations for this layer.
860
AnnotationCount int64 `json:"annotationCount,omitempty"`
862
// AnnotationTypes: The list of annotation types contained for this
864
AnnotationTypes []string `json:"annotationTypes,omitempty"`
866
// AnnotationsDataLink: Link to get data for this annotation.
867
AnnotationsDataLink string `json:"annotationsDataLink,omitempty"`
869
// AnnotationsLink: The link to get the annotations for this layer.
870
AnnotationsLink string `json:"annotationsLink,omitempty"`
872
// ContentVersion: The content version this resource is for.
873
ContentVersion string `json:"contentVersion,omitempty"`
875
// DataCount: The number of data items for this layer.
876
DataCount int64 `json:"dataCount,omitempty"`
878
// Id: Unique id of this layer summary.
879
Id string `json:"id,omitempty"`
881
// Kind: Resource Type
882
Kind string `json:"kind,omitempty"`
884
// LayerId: The layer id for this summary.
885
LayerId string `json:"layerId,omitempty"`
887
// SelfLink: URL to this resource.
888
SelfLink string `json:"selfLink,omitempty"`
890
// Updated: Timestamp for the last time an item in this layer was
891
// updated. (RFC 3339 UTC date-time format).
892
Updated string `json:"updated,omitempty"`
894
// VolumeAnnotationsVersion: The current version of this layer's volume
895
// annotations. Note that this version applies only to the data in the
896
// books.layers.volumeAnnotations.* responses. The actual annotation
897
// data is versioned separately.
898
VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
900
// VolumeId: The volume id this resource is for.
901
VolumeId string `json:"volumeId,omitempty"`
905
// Items: A list of offers.
906
Items []*OffersItems `json:"items,omitempty"`
908
// Kind: Resource type.
909
Kind string `json:"kind,omitempty"`
912
type OffersItems struct {
913
ArtUrl string `json:"artUrl,omitempty"`
915
Id string `json:"id,omitempty"`
917
Items []*OffersItemsItems `json:"items,omitempty"`
920
type OffersItemsItems struct {
921
Author string `json:"author,omitempty"`
923
CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
925
CoverUrl string `json:"coverUrl,omitempty"`
927
Description string `json:"description,omitempty"`
929
Title string `json:"title,omitempty"`
931
VolumeId string `json:"volumeId,omitempty"`
934
type ReadingPosition struct {
935
// EpubCfiPosition: Position in an EPUB as a CFI.
936
EpubCfiPosition string `json:"epubCfiPosition,omitempty"`
938
// GbImagePosition: Position in a volume for image-based content.
939
GbImagePosition string `json:"gbImagePosition,omitempty"`
941
// GbTextPosition: Position in a volume for text-based content.
942
GbTextPosition string `json:"gbTextPosition,omitempty"`
944
// Kind: Resource type for a reading position.
945
Kind string `json:"kind,omitempty"`
947
// PdfPosition: Position in a PDF file.
948
PdfPosition string `json:"pdfPosition,omitempty"`
950
// Updated: Timestamp when this reading position was last updated
951
// (formatted UTC timestamp with millisecond resolution).
952
Updated string `json:"updated,omitempty"`
954
// VolumeId: Volume id associated with this reading position.
955
VolumeId string `json:"volumeId,omitempty"`
958
type RequestAccess struct {
959
// ConcurrentAccess: A concurrent access response.
960
ConcurrentAccess *ConcurrentAccessRestriction `json:"concurrentAccess,omitempty"`
962
// DownloadAccess: A download access response.
963
DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
965
// Kind: Resource type.
966
Kind string `json:"kind,omitempty"`
970
// Author: Author of this review.
971
Author *ReviewAuthor `json:"author,omitempty"`
973
// Content: Review text.
974
Content string `json:"content,omitempty"`
976
// Date: Date of this review.
977
Date string `json:"date,omitempty"`
979
// FullTextUrl: URL for the full review text, for reviews gathered from
981
FullTextUrl string `json:"fullTextUrl,omitempty"`
983
// Kind: Resource type for a review.
984
Kind string `json:"kind,omitempty"`
986
// Rating: Star rating for this review. Possible values are ONE, TWO,
987
// THREE, FOUR, FIVE or NOT_RATED.
988
Rating string `json:"rating,omitempty"`
990
// Source: Information regarding the source of this review, when the
991
// review is not from a Google Books user.
992
Source *ReviewSource `json:"source,omitempty"`
994
// Title: Title for this review.
995
Title string `json:"title,omitempty"`
997
// Type: Source type for this review. Possible values are EDITORIAL,
998
// WEB_USER or GOOGLE_USER.
999
Type string `json:"type,omitempty"`
1001
// VolumeId: Volume that this review is for.
1002
VolumeId string `json:"volumeId,omitempty"`
1005
type ReviewAuthor struct {
1006
// DisplayName: Name of this person.
1007
DisplayName string `json:"displayName,omitempty"`
1010
type ReviewSource struct {
1011
// Description: Name of the source.
1012
Description string `json:"description,omitempty"`
1014
// ExtraDescription: Extra text about the source of the review.
1015
ExtraDescription string `json:"extraDescription,omitempty"`
1017
// Url: URL of the source of the review.
1018
Url string `json:"url,omitempty"`
1021
type Volume struct {
1022
// AccessInfo: Any information about a volume related to reading or
1023
// obtaining that volume text. This information can depend on country
1024
// (books may be public domain in one country but not in another, e.g.).
1025
AccessInfo *VolumeAccessInfo `json:"accessInfo,omitempty"`
1027
// Etag: Opaque identifier for a specific version of a volume resource.
1028
// (In LITE projection)
1029
Etag string `json:"etag,omitempty"`
1031
// Id: Unique identifier for a volume. (In LITE projection.)
1032
Id string `json:"id,omitempty"`
1034
// Kind: Resource type for a volume. (In LITE projection.)
1035
Kind string `json:"kind,omitempty"`
1037
// LayerInfo: What layers exist in this volume and high level
1038
// information about them.
1039
LayerInfo *VolumeLayerInfo `json:"layerInfo,omitempty"`
1041
// RecommendedInfo: Recommendation related information for this volume.
1042
RecommendedInfo *VolumeRecommendedInfo `json:"recommendedInfo,omitempty"`
1044
// SaleInfo: Any information about a volume related to the eBookstore
1045
// and/or purchaseability. This information can depend on the country
1046
// where the request originates from (i.e. books may not be for sale in
1047
// certain countries).
1048
SaleInfo *VolumeSaleInfo `json:"saleInfo,omitempty"`
1050
// SearchInfo: Search result information related to this volume.
1051
SearchInfo *VolumeSearchInfo `json:"searchInfo,omitempty"`
1053
// SelfLink: URL to this resource. (In LITE projection.)
1054
SelfLink string `json:"selfLink,omitempty"`
1056
// UserInfo: User specific information related to this volume. (e.g.
1057
// page this user last read or whether they purchased this book)
1058
UserInfo *VolumeUserInfo `json:"userInfo,omitempty"`
1060
// VolumeInfo: General volume information.
1061
VolumeInfo *VolumeVolumeInfo `json:"volumeInfo,omitempty"`
1064
type VolumeAccessInfo struct {
1065
// AccessViewStatus: Combines the access and viewability of this volume
1066
// into a single status field for this user. Values can be
1067
// FULL_PURCHASED, FULL_PUBLIC_DOMAIN, SAMPLE or NONE. (In LITE
1069
AccessViewStatus string `json:"accessViewStatus,omitempty"`
1071
// Country: The two-letter ISO_3166-1 country code for which this access
1072
// information is valid. (In LITE projection.)
1073
Country string `json:"country,omitempty"`
1075
// DownloadAccess: Information about a volume's download license access
1077
DownloadAccess *DownloadAccessRestriction `json:"downloadAccess,omitempty"`
1079
// DriveImportedContentLink: URL to the Google Drive viewer if this
1080
// volume is uploaded by the user by selecting the file from Google
1082
DriveImportedContentLink string `json:"driveImportedContentLink,omitempty"`
1084
// Embeddable: Whether this volume can be embedded in a viewport using
1085
// the Embedded Viewer API.
1086
Embeddable bool `json:"embeddable,omitempty"`
1088
// Epub: Information about epub content. (In LITE projection.)
1089
Epub *VolumeAccessInfoEpub `json:"epub,omitempty"`
1091
// ExplicitOfflineLicenseManagement: Whether this volume requires that
1092
// the client explicitly request offline download license rather than
1093
// have it done automatically when loading the content, if the client
1095
ExplicitOfflineLicenseManagement bool `json:"explicitOfflineLicenseManagement,omitempty"`
1097
// Pdf: Information about pdf content. (In LITE projection.)
1098
Pdf *VolumeAccessInfoPdf `json:"pdf,omitempty"`
1100
// PublicDomain: Whether or not this book is public domain in the
1101
// country listed above.
1102
PublicDomain bool `json:"publicDomain,omitempty"`
1104
// QuoteSharingAllowed: Whether quote sharing is allowed for this
1106
QuoteSharingAllowed bool `json:"quoteSharingAllowed,omitempty"`
1108
// TextToSpeechPermission: Whether text-to-speech is permitted for this
1109
// volume. Values can be ALLOWED, ALLOWED_FOR_ACCESSIBILITY, or
1111
TextToSpeechPermission string `json:"textToSpeechPermission,omitempty"`
1113
// ViewOrderUrl: For ordered but not yet processed orders, we give a URL
1114
// that can be used to go to the appropriate Google Wallet page.
1115
ViewOrderUrl string `json:"viewOrderUrl,omitempty"`
1117
// Viewability: The read access of a volume. Possible values are
1118
// PARTIAL, ALL_PAGES, NO_PAGES or UNKNOWN. This value depends on the
1119
// country listed above. A value of PARTIAL means that the publisher has
1120
// allowed some portion of the volume to be viewed publicly, without
1121
// purchase. This can apply to eBooks as well as non-eBooks. Public
1122
// domain books will always have a value of ALL_PAGES.
1123
Viewability string `json:"viewability,omitempty"`
1125
// WebReaderLink: URL to read this volume on the Google Books site. Link
1126
// will not allow users to read non-viewable volumes.
1127
WebReaderLink string `json:"webReaderLink,omitempty"`
1130
type VolumeAccessInfoEpub struct {
1131
// AcsTokenLink: URL to retrieve ACS token for epub download. (In LITE
1133
AcsTokenLink string `json:"acsTokenLink,omitempty"`
1135
// DownloadLink: URL to download epub. (In LITE projection.)
1136
DownloadLink string `json:"downloadLink,omitempty"`
1138
// IsAvailable: Is a flowing text epub available either as public domain
1139
// or for purchase. (In LITE projection.)
1140
IsAvailable bool `json:"isAvailable,omitempty"`
1143
type VolumeAccessInfoPdf struct {
1144
// AcsTokenLink: URL to retrieve ACS token for pdf download. (In LITE
1146
AcsTokenLink string `json:"acsTokenLink,omitempty"`
1148
// DownloadLink: URL to download pdf. (In LITE projection.)
1149
DownloadLink string `json:"downloadLink,omitempty"`
1151
// IsAvailable: Is a scanned image pdf available either as public domain
1152
// or for purchase. (In LITE projection.)
1153
IsAvailable bool `json:"isAvailable,omitempty"`
1156
type VolumeLayerInfo struct {
1157
// Layers: A layer should appear here if and only if the layer exists
1159
Layers []*VolumeLayerInfoLayers `json:"layers,omitempty"`
1162
type VolumeLayerInfoLayers struct {
1163
// LayerId: The layer id of this layer (e.g. "geo").
1164
LayerId string `json:"layerId,omitempty"`
1166
// VolumeAnnotationsVersion: The current version of this layer's volume
1167
// annotations. Note that this version applies only to the data in the
1168
// books.layers.volumeAnnotations.* responses. The actual annotation
1169
// data is versioned separately.
1170
VolumeAnnotationsVersion string `json:"volumeAnnotationsVersion,omitempty"`
1173
type VolumeRecommendedInfo struct {
1174
// Explanation: A text explaining why this volume is recommended.
1175
Explanation string `json:"explanation,omitempty"`
1178
type VolumeSaleInfo struct {
1179
// BuyLink: URL to purchase this volume on the Google Books site. (In
1181
BuyLink string `json:"buyLink,omitempty"`
1183
// Country: The two-letter ISO_3166-1 country code for which this sale
1184
// information is valid. (In LITE projection.)
1185
Country string `json:"country,omitempty"`
1187
// IsEbook: Whether or not this volume is an eBook (can be added to the
1188
// My eBooks shelf).
1189
IsEbook bool `json:"isEbook,omitempty"`
1191
// ListPrice: Suggested retail price. (In LITE projection.)
1192
ListPrice *VolumeSaleInfoListPrice `json:"listPrice,omitempty"`
1194
// Offers: Offers available for this volume (sales and rentals).
1195
Offers []*VolumeSaleInfoOffers `json:"offers,omitempty"`
1197
// OnSaleDate: The date on which this book is available for sale.
1198
OnSaleDate string `json:"onSaleDate,omitempty"`
1200
// RetailPrice: The actual selling price of the book. This is the same
1201
// as the suggested retail or list price unless there are offers or
1202
// discounts on this volume. (In LITE projection.)
1203
RetailPrice *VolumeSaleInfoRetailPrice `json:"retailPrice,omitempty"`
1205
// Saleability: Whether or not this book is available for sale or
1206
// offered for free in the Google eBookstore for the country listed
1207
// above. Possible values are FOR_SALE, FOR_RENTAL_ONLY,
1208
// FOR_SALE_AND_RENTAL, FREE, NOT_FOR_SALE, or FOR_PREORDER.
1209
Saleability string `json:"saleability,omitempty"`
1212
type VolumeSaleInfoListPrice struct {
1213
// Amount: Amount in the currency listed below. (In LITE projection.)
1214
Amount float64 `json:"amount,omitempty"`
1216
// CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
1218
CurrencyCode string `json:"currencyCode,omitempty"`
1221
type VolumeSaleInfoOffers struct {
1222
// FinskyOfferType: The finsky offer type (e.g., PURCHASE=0 RENTAL=3)
1223
FinskyOfferType int64 `json:"finskyOfferType,omitempty"`
1225
// ListPrice: Offer list (=undiscounted) price in Micros.
1226
ListPrice *VolumeSaleInfoOffersListPrice `json:"listPrice,omitempty"`
1228
// RentalDuration: The rental duration (for rental offers only).
1229
RentalDuration *VolumeSaleInfoOffersRentalDuration `json:"rentalDuration,omitempty"`
1231
// RetailPrice: Offer retail (=discounted) price in Micros
1232
RetailPrice *VolumeSaleInfoOffersRetailPrice `json:"retailPrice,omitempty"`
1235
type VolumeSaleInfoOffersListPrice struct {
1236
AmountInMicros float64 `json:"amountInMicros,omitempty"`
1238
CurrencyCode string `json:"currencyCode,omitempty"`
1241
type VolumeSaleInfoOffersRentalDuration struct {
1242
Count float64 `json:"count,omitempty"`
1244
Unit string `json:"unit,omitempty"`
1247
type VolumeSaleInfoOffersRetailPrice struct {
1248
AmountInMicros float64 `json:"amountInMicros,omitempty"`
1250
CurrencyCode string `json:"currencyCode,omitempty"`
1253
type VolumeSaleInfoRetailPrice struct {
1254
// Amount: Amount in the currency listed below. (In LITE projection.)
1255
Amount float64 `json:"amount,omitempty"`
1257
// CurrencyCode: An ISO 4217, three-letter currency code. (In LITE
1259
CurrencyCode string `json:"currencyCode,omitempty"`
1262
type VolumeSearchInfo struct {
1263
// TextSnippet: A text snippet containing the search query.
1264
TextSnippet string `json:"textSnippet,omitempty"`
1267
type VolumeUserInfo struct {
1268
// Copy: Copy/Paste accounting information.
1269
Copy *VolumeUserInfoCopy `json:"copy,omitempty"`
1271
// IsInMyBooks: Whether or not this volume is currently in "my books."
1272
IsInMyBooks bool `json:"isInMyBooks,omitempty"`
1274
// IsPreordered: Whether or not this volume was pre-ordered by the
1275
// authenticated user making the request. (In LITE projection.)
1276
IsPreordered bool `json:"isPreordered,omitempty"`
1278
// IsPurchased: Whether or not this volume was purchased by the
1279
// authenticated user making the request. (In LITE projection.)
1280
IsPurchased bool `json:"isPurchased,omitempty"`
1282
// IsUploaded: Whether or not this volume was user uploaded.
1283
IsUploaded bool `json:"isUploaded,omitempty"`
1285
// ReadingPosition: The user's current reading position in the volume,
1286
// if one is available. (In LITE projection.)
1287
ReadingPosition *ReadingPosition `json:"readingPosition,omitempty"`
1289
// RentalPeriod: Period during this book is/was a valid rental.
1290
RentalPeriod *VolumeUserInfoRentalPeriod `json:"rentalPeriod,omitempty"`
1292
// RentalState: Whether this book is an active or an expired rental.
1293
RentalState string `json:"rentalState,omitempty"`
1295
// Review: This user's review of this volume, if one exists.
1296
Review *Review `json:"review,omitempty"`
1298
// Updated: Timestamp when this volume was last modified by a user
1299
// action, such as a reading position update, volume purchase or writing
1300
// a review. (RFC 3339 UTC date-time format).
1301
Updated string `json:"updated,omitempty"`
1303
UserUploadedVolumeInfo *VolumeUserInfoUserUploadedVolumeInfo `json:"userUploadedVolumeInfo,omitempty"`
1306
type VolumeUserInfoCopy struct {
1307
AllowedCharacterCount int64 `json:"allowedCharacterCount,omitempty"`
1309
LimitType string `json:"limitType,omitempty"`
1311
RemainingCharacterCount int64 `json:"remainingCharacterCount,omitempty"`
1313
Updated string `json:"updated,omitempty"`
1316
type VolumeUserInfoRentalPeriod struct {
1317
EndUtcSec int64 `json:"endUtcSec,omitempty,string"`
1319
StartUtcSec int64 `json:"startUtcSec,omitempty,string"`
1322
type VolumeUserInfoUserUploadedVolumeInfo struct {
1323
ProcessingState string `json:"processingState,omitempty"`
1326
type VolumeVolumeInfo struct {
1327
// Authors: The names of the authors and/or editors for this volume. (In
1329
Authors []string `json:"authors,omitempty"`
1331
// AverageRating: The mean review rating for this volume. (min = 1.0,
1333
AverageRating float64 `json:"averageRating,omitempty"`
1335
// CanonicalVolumeLink: Canonical URL for a volume. (In LITE
1337
CanonicalVolumeLink string `json:"canonicalVolumeLink,omitempty"`
1339
// Categories: A list of subject categories, such as "Fiction",
1341
Categories []string `json:"categories,omitempty"`
1343
// ContentVersion: An identifier for the version of the volume content
1344
// (text & images). (In LITE projection)
1345
ContentVersion string `json:"contentVersion,omitempty"`
1347
// Description: A synopsis of the volume. The text of the description is
1348
// formatted in HTML and includes simple formatting elements, such as b,
1349
// i, and br tags. (In LITE projection.)
1350
Description string `json:"description,omitempty"`
1352
// Dimensions: Physical dimensions of this volume.
1353
Dimensions *VolumeVolumeInfoDimensions `json:"dimensions,omitempty"`
1355
// ImageLinks: A list of image links for all the sizes that are
1356
// available. (In LITE projection.)
1357
ImageLinks *VolumeVolumeInfoImageLinks `json:"imageLinks,omitempty"`
1359
// IndustryIdentifiers: Industry standard identifiers for this volume.
1360
IndustryIdentifiers []*VolumeVolumeInfoIndustryIdentifiers `json:"industryIdentifiers,omitempty"`
1362
// InfoLink: URL to view information about this volume on the Google
1363
// Books site. (In LITE projection)
1364
InfoLink string `json:"infoLink,omitempty"`
1366
// Language: Best language for this volume (based on content). It is the
1367
// two-letter ISO 639-1 code such as 'fr', 'en', etc.
1368
Language string `json:"language,omitempty"`
1370
// MainCategory: The main category to which this volume belongs. It will
1371
// be the category from the categories list returned below that has the
1373
MainCategory string `json:"mainCategory,omitempty"`
1375
// PageCount: Total number of pages as per publisher metadata.
1376
PageCount int64 `json:"pageCount,omitempty"`
1378
// PreviewLink: URL to preview this volume on the Google Books site.
1379
PreviewLink string `json:"previewLink,omitempty"`
1381
// PrintType: Type of publication of this volume. Possible values are
1382
// BOOK or MAGAZINE.
1383
PrintType string `json:"printType,omitempty"`
1385
// PrintedPageCount: Total number of printed pages in generated pdf
1387
PrintedPageCount int64 `json:"printedPageCount,omitempty"`
1389
// PublishedDate: Date of publication. (In LITE projection.)
1390
PublishedDate string `json:"publishedDate,omitempty"`
1392
// Publisher: Publisher of this volume. (In LITE projection.)
1393
Publisher string `json:"publisher,omitempty"`
1395
// RatingsCount: The number of review ratings for this volume.
1396
RatingsCount int64 `json:"ratingsCount,omitempty"`
1398
// ReadingModes: The reading modes available for this volume.
1399
ReadingModes interface{} `json:"readingModes,omitempty"`
1401
// Subtitle: Volume subtitle. (In LITE projection.)
1402
Subtitle string `json:"subtitle,omitempty"`
1404
// Title: Volume title. (In LITE projection.)
1405
Title string `json:"title,omitempty"`
1408
type VolumeVolumeInfoDimensions struct {
1409
// Height: Height or length of this volume (in cm).
1410
Height string `json:"height,omitempty"`
1412
// Thickness: Thickness of this volume (in cm).
1413
Thickness string `json:"thickness,omitempty"`
1415
// Width: Width of this volume (in cm).
1416
Width string `json:"width,omitempty"`
1419
type VolumeVolumeInfoImageLinks struct {
1420
// ExtraLarge: Image link for extra large size (width of ~1280 pixels).
1421
// (In LITE projection)
1422
ExtraLarge string `json:"extraLarge,omitempty"`
1424
// Large: Image link for large size (width of ~800 pixels). (In LITE
1426
Large string `json:"large,omitempty"`
1428
// Medium: Image link for medium size (width of ~575 pixels). (In LITE
1430
Medium string `json:"medium,omitempty"`
1432
// Small: Image link for small size (width of ~300 pixels). (In LITE
1434
Small string `json:"small,omitempty"`
1436
// SmallThumbnail: Image link for small thumbnail size (width of ~80
1437
// pixels). (In LITE projection)
1438
SmallThumbnail string `json:"smallThumbnail,omitempty"`
1440
// Thumbnail: Image link for thumbnail size (width of ~128 pixels). (In
1442
Thumbnail string `json:"thumbnail,omitempty"`
1445
type VolumeVolumeInfoIndustryIdentifiers struct {
1446
// Identifier: Industry specific volume identifier.
1447
Identifier string `json:"identifier,omitempty"`
1449
// Type: Identifier type. Possible values are ISBN_10, ISBN_13, ISSN and
1451
Type string `json:"type,omitempty"`
1454
type Volumeannotation struct {
1455
// AnnotationDataId: The annotation data id for this volume annotation.
1456
AnnotationDataId string `json:"annotationDataId,omitempty"`
1458
// AnnotationDataLink: Link to get data for this annotation.
1459
AnnotationDataLink string `json:"annotationDataLink,omitempty"`
1461
// AnnotationType: The type of annotation this is.
1462
AnnotationType string `json:"annotationType,omitempty"`
1464
// ContentRanges: The content ranges to identify the selected text.
1465
ContentRanges *VolumeannotationContentRanges `json:"contentRanges,omitempty"`
1467
// Data: Data for this annotation.
1468
Data string `json:"data,omitempty"`
1470
// Deleted: Indicates that this annotation is deleted.
1471
Deleted bool `json:"deleted,omitempty"`
1473
// Id: Unique id of this volume annotation.
1474
Id string `json:"id,omitempty"`
1476
// Kind: Resource Type
1477
Kind string `json:"kind,omitempty"`
1479
// LayerId: The Layer this annotation is for.
1480
LayerId string `json:"layerId,omitempty"`
1482
// PageIds: Pages the annotation spans.
1483
PageIds []string `json:"pageIds,omitempty"`
1485
// SelectedText: Excerpt from the volume.
1486
SelectedText string `json:"selectedText,omitempty"`
1488
// SelfLink: URL to this resource.
1489
SelfLink string `json:"selfLink,omitempty"`
1491
// Updated: Timestamp for the last time this anntoation was updated.
1492
// (RFC 3339 UTC date-time format).
1493
Updated string `json:"updated,omitempty"`
1495
// VolumeId: The Volume this annotation is for.
1496
VolumeId string `json:"volumeId,omitempty"`
1499
type VolumeannotationContentRanges struct {
1500
// CfiRange: Range in CFI format for this annotation for version above.
1501
CfiRange *BooksAnnotationsRange `json:"cfiRange,omitempty"`
1503
// ContentVersion: Content version applicable to ranges below.
1504
ContentVersion string `json:"contentVersion,omitempty"`
1506
// GbImageRange: Range in GB image format for this annotation for
1508
GbImageRange *BooksAnnotationsRange `json:"gbImageRange,omitempty"`
1510
// GbTextRange: Range in GB text format for this annotation for version
1512
GbTextRange *BooksAnnotationsRange `json:"gbTextRange,omitempty"`
1515
type Volumeannotations struct {
1516
// Items: A list of volume annotations.
1517
Items []*Volumeannotation `json:"items,omitempty"`
1519
// Kind: Resource type
1520
Kind string `json:"kind,omitempty"`
1522
// NextPageToken: Token to pass in for pagination for the next page.
1523
// This will not be present if this request does not have more results.
1524
NextPageToken string `json:"nextPageToken,omitempty"`
1526
// TotalItems: The total number of volume annotations found.
1527
TotalItems int64 `json:"totalItems,omitempty"`
1529
// Version: The version string for all of the volume annotations in this
1530
// layer (not just the ones in this response). Note: the version string
1531
// doesn't apply to the annotation data, just the information in this
1532
// response (e.g. the location of annotations in the book).
1533
Version string `json:"version,omitempty"`
1536
type Volumes struct {
1537
// Items: A list of volumes.
1538
Items []*Volume `json:"items,omitempty"`
1540
// Kind: Resource type.
1541
Kind string `json:"kind,omitempty"`
1543
// TotalItems: Total number of volumes found. This might be greater than
1544
// the number of volumes returned in this response if results have been
1546
TotalItems int64 `json:"totalItems,omitempty"`
1549
// method id "books.bookshelves.get":
1551
type BookshelvesGetCall struct {
1555
opt_ map[string]interface{}
1558
// Get: Retrieves metadata for a specific bookshelf for the specified
1560
func (r *BookshelvesService) Get(userId string, shelf string) *BookshelvesGetCall {
1561
c := &BookshelvesGetCall{s: r.s, opt_: make(map[string]interface{})}
1567
// Source sets the optional parameter "source": String to identify the
1568
// originator of this request.
1569
func (c *BookshelvesGetCall) Source(source string) *BookshelvesGetCall {
1570
c.opt_["source"] = source
1574
// Fields allows partial responses to be retrieved.
1575
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1576
// for more information.
1577
func (c *BookshelvesGetCall) Fields(s ...googleapi.Field) *BookshelvesGetCall {
1578
c.opt_["fields"] = googleapi.CombineFields(s)
1582
func (c *BookshelvesGetCall) Do() (*Bookshelf, error) {
1583
var body io.Reader = nil
1584
params := make(url.Values)
1585
params.Set("alt", "json")
1586
if v, ok := c.opt_["source"]; ok {
1587
params.Set("source", fmt.Sprintf("%v", v))
1589
if v, ok := c.opt_["fields"]; ok {
1590
params.Set("fields", fmt.Sprintf("%v", v))
1592
urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}")
1593
urls += "?" + params.Encode()
1594
req, _ := http.NewRequest("GET", urls, body)
1595
googleapi.Expand(req.URL, map[string]string{
1599
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1600
res, err := c.s.client.Do(req)
1604
defer googleapi.CloseBody(res)
1605
if err := googleapi.CheckResponse(res); err != nil {
1609
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1614
// "description": "Retrieves metadata for a specific bookshelf for the specified user.",
1615
// "httpMethod": "GET",
1616
// "id": "books.bookshelves.get",
1617
// "parameterOrder": [
1623
// "description": "ID of bookshelf to retrieve.",
1624
// "location": "path",
1625
// "required": true,
1629
// "description": "String to identify the originator of this request.",
1630
// "location": "query",
1634
// "description": "ID of user for whom to retrieve bookshelves.",
1635
// "location": "path",
1636
// "required": true,
1640
// "path": "users/{userId}/bookshelves/{shelf}",
1642
// "$ref": "Bookshelf"
1645
// "https://www.googleapis.com/auth/books"
1651
// method id "books.bookshelves.list":
1653
type BookshelvesListCall struct {
1656
opt_ map[string]interface{}
1659
// List: Retrieves a list of public bookshelves for the specified user.
1660
func (r *BookshelvesService) List(userId string) *BookshelvesListCall {
1661
c := &BookshelvesListCall{s: r.s, opt_: make(map[string]interface{})}
1666
// Source sets the optional parameter "source": String to identify the
1667
// originator of this request.
1668
func (c *BookshelvesListCall) Source(source string) *BookshelvesListCall {
1669
c.opt_["source"] = source
1673
// Fields allows partial responses to be retrieved.
1674
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1675
// for more information.
1676
func (c *BookshelvesListCall) Fields(s ...googleapi.Field) *BookshelvesListCall {
1677
c.opt_["fields"] = googleapi.CombineFields(s)
1681
func (c *BookshelvesListCall) Do() (*Bookshelves, error) {
1682
var body io.Reader = nil
1683
params := make(url.Values)
1684
params.Set("alt", "json")
1685
if v, ok := c.opt_["source"]; ok {
1686
params.Set("source", fmt.Sprintf("%v", v))
1688
if v, ok := c.opt_["fields"]; ok {
1689
params.Set("fields", fmt.Sprintf("%v", v))
1691
urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves")
1692
urls += "?" + params.Encode()
1693
req, _ := http.NewRequest("GET", urls, body)
1694
googleapi.Expand(req.URL, map[string]string{
1697
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1698
res, err := c.s.client.Do(req)
1702
defer googleapi.CloseBody(res)
1703
if err := googleapi.CheckResponse(res); err != nil {
1706
var ret *Bookshelves
1707
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1712
// "description": "Retrieves a list of public bookshelves for the specified user.",
1713
// "httpMethod": "GET",
1714
// "id": "books.bookshelves.list",
1715
// "parameterOrder": [
1720
// "description": "String to identify the originator of this request.",
1721
// "location": "query",
1725
// "description": "ID of user for whom to retrieve bookshelves.",
1726
// "location": "path",
1727
// "required": true,
1731
// "path": "users/{userId}/bookshelves",
1733
// "$ref": "Bookshelves"
1736
// "https://www.googleapis.com/auth/books"
1742
// method id "books.bookshelves.volumes.list":
1744
type BookshelvesVolumesListCall struct {
1748
opt_ map[string]interface{}
1751
// List: Retrieves volumes in a specific bookshelf for the specified
1753
func (r *BookshelvesVolumesService) List(userId string, shelf string) *BookshelvesVolumesListCall {
1754
c := &BookshelvesVolumesListCall{s: r.s, opt_: make(map[string]interface{})}
1760
// MaxResults sets the optional parameter "maxResults": Maximum number
1761
// of results to return
1762
func (c *BookshelvesVolumesListCall) MaxResults(maxResults int64) *BookshelvesVolumesListCall {
1763
c.opt_["maxResults"] = maxResults
1767
// ShowPreorders sets the optional parameter "showPreorders": Set to
1768
// true to show pre-ordered books. Defaults to false.
1769
func (c *BookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *BookshelvesVolumesListCall {
1770
c.opt_["showPreorders"] = showPreorders
1774
// Source sets the optional parameter "source": String to identify the
1775
// originator of this request.
1776
func (c *BookshelvesVolumesListCall) Source(source string) *BookshelvesVolumesListCall {
1777
c.opt_["source"] = source
1781
// StartIndex sets the optional parameter "startIndex": Index of the
1782
// first element to return (starts at 0)
1783
func (c *BookshelvesVolumesListCall) StartIndex(startIndex int64) *BookshelvesVolumesListCall {
1784
c.opt_["startIndex"] = startIndex
1788
// Fields allows partial responses to be retrieved.
1789
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1790
// for more information.
1791
func (c *BookshelvesVolumesListCall) Fields(s ...googleapi.Field) *BookshelvesVolumesListCall {
1792
c.opt_["fields"] = googleapi.CombineFields(s)
1796
func (c *BookshelvesVolumesListCall) Do() (*Volumes, error) {
1797
var body io.Reader = nil
1798
params := make(url.Values)
1799
params.Set("alt", "json")
1800
if v, ok := c.opt_["maxResults"]; ok {
1801
params.Set("maxResults", fmt.Sprintf("%v", v))
1803
if v, ok := c.opt_["showPreorders"]; ok {
1804
params.Set("showPreorders", fmt.Sprintf("%v", v))
1806
if v, ok := c.opt_["source"]; ok {
1807
params.Set("source", fmt.Sprintf("%v", v))
1809
if v, ok := c.opt_["startIndex"]; ok {
1810
params.Set("startIndex", fmt.Sprintf("%v", v))
1812
if v, ok := c.opt_["fields"]; ok {
1813
params.Set("fields", fmt.Sprintf("%v", v))
1815
urls := googleapi.ResolveRelative(c.s.BasePath, "users/{userId}/bookshelves/{shelf}/volumes")
1816
urls += "?" + params.Encode()
1817
req, _ := http.NewRequest("GET", urls, body)
1818
googleapi.Expand(req.URL, map[string]string{
1822
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1823
res, err := c.s.client.Do(req)
1827
defer googleapi.CloseBody(res)
1828
if err := googleapi.CheckResponse(res); err != nil {
1832
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1837
// "description": "Retrieves volumes in a specific bookshelf for the specified user.",
1838
// "httpMethod": "GET",
1839
// "id": "books.bookshelves.volumes.list",
1840
// "parameterOrder": [
1846
// "description": "Maximum number of results to return",
1847
// "format": "uint32",
1848
// "location": "query",
1850
// "type": "integer"
1853
// "description": "ID of bookshelf to retrieve volumes.",
1854
// "location": "path",
1855
// "required": true,
1858
// "showPreorders": {
1859
// "description": "Set to true to show pre-ordered books. Defaults to false.",
1860
// "location": "query",
1861
// "type": "boolean"
1864
// "description": "String to identify the originator of this request.",
1865
// "location": "query",
1869
// "description": "Index of the first element to return (starts at 0)",
1870
// "format": "uint32",
1871
// "location": "query",
1873
// "type": "integer"
1876
// "description": "ID of user for whom to retrieve bookshelf volumes.",
1877
// "location": "path",
1878
// "required": true,
1882
// "path": "users/{userId}/bookshelves/{shelf}/volumes",
1884
// "$ref": "Volumes"
1887
// "https://www.googleapis.com/auth/books"
1893
// method id "books.cloudloading.addBook":
1895
type CloudloadingAddBookCall struct {
1897
opt_ map[string]interface{}
1901
func (r *CloudloadingService) AddBook() *CloudloadingAddBookCall {
1902
c := &CloudloadingAddBookCall{s: r.s, opt_: make(map[string]interface{})}
1906
// Drive_document_id sets the optional parameter "drive_document_id": A
1907
// drive document id. The upload_client_token must not be set.
1908
func (c *CloudloadingAddBookCall) Drive_document_id(drive_document_id string) *CloudloadingAddBookCall {
1909
c.opt_["drive_document_id"] = drive_document_id
1913
// Mime_type sets the optional parameter "mime_type": The document MIME
1914
// type. It can be set only if the drive_document_id is set.
1915
func (c *CloudloadingAddBookCall) Mime_type(mime_type string) *CloudloadingAddBookCall {
1916
c.opt_["mime_type"] = mime_type
1920
// Name sets the optional parameter "name": The document name. It can be
1921
// set only if the drive_document_id is set.
1922
func (c *CloudloadingAddBookCall) Name(name string) *CloudloadingAddBookCall {
1923
c.opt_["name"] = name
1927
// Upload_client_token sets the optional parameter
1928
// "upload_client_token":
1929
func (c *CloudloadingAddBookCall) Upload_client_token(upload_client_token string) *CloudloadingAddBookCall {
1930
c.opt_["upload_client_token"] = upload_client_token
1934
// Fields allows partial responses to be retrieved.
1935
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
1936
// for more information.
1937
func (c *CloudloadingAddBookCall) Fields(s ...googleapi.Field) *CloudloadingAddBookCall {
1938
c.opt_["fields"] = googleapi.CombineFields(s)
1942
func (c *CloudloadingAddBookCall) Do() (*BooksCloudloadingResource, error) {
1943
var body io.Reader = nil
1944
params := make(url.Values)
1945
params.Set("alt", "json")
1946
if v, ok := c.opt_["drive_document_id"]; ok {
1947
params.Set("drive_document_id", fmt.Sprintf("%v", v))
1949
if v, ok := c.opt_["mime_type"]; ok {
1950
params.Set("mime_type", fmt.Sprintf("%v", v))
1952
if v, ok := c.opt_["name"]; ok {
1953
params.Set("name", fmt.Sprintf("%v", v))
1955
if v, ok := c.opt_["upload_client_token"]; ok {
1956
params.Set("upload_client_token", fmt.Sprintf("%v", v))
1958
if v, ok := c.opt_["fields"]; ok {
1959
params.Set("fields", fmt.Sprintf("%v", v))
1961
urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/addBook")
1962
urls += "?" + params.Encode()
1963
req, _ := http.NewRequest("POST", urls, body)
1964
googleapi.SetOpaque(req.URL)
1965
req.Header.Set("User-Agent", "google-api-go-client/0.5")
1966
res, err := c.s.client.Do(req)
1970
defer googleapi.CloseBody(res)
1971
if err := googleapi.CheckResponse(res); err != nil {
1974
var ret *BooksCloudloadingResource
1975
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
1980
// "description": "",
1981
// "httpMethod": "POST",
1982
// "id": "books.cloudloading.addBook",
1984
// "drive_document_id": {
1985
// "description": "A drive document id. The upload_client_token must not be set.",
1986
// "location": "query",
1990
// "description": "The document MIME type. It can be set only if the drive_document_id is set.",
1991
// "location": "query",
1995
// "description": "The document name. It can be set only if the drive_document_id is set.",
1996
// "location": "query",
1999
// "upload_client_token": {
2000
// "location": "query",
2004
// "path": "cloudloading/addBook",
2006
// "$ref": "BooksCloudloadingResource"
2009
// "https://www.googleapis.com/auth/books"
2015
// method id "books.cloudloading.deleteBook":
2017
type CloudloadingDeleteBookCall struct {
2020
opt_ map[string]interface{}
2023
// DeleteBook: Remove the book and its contents
2024
func (r *CloudloadingService) DeleteBook(volumeId string) *CloudloadingDeleteBookCall {
2025
c := &CloudloadingDeleteBookCall{s: r.s, opt_: make(map[string]interface{})}
2026
c.volumeId = volumeId
2030
// Fields allows partial responses to be retrieved.
2031
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2032
// for more information.
2033
func (c *CloudloadingDeleteBookCall) Fields(s ...googleapi.Field) *CloudloadingDeleteBookCall {
2034
c.opt_["fields"] = googleapi.CombineFields(s)
2038
func (c *CloudloadingDeleteBookCall) Do() error {
2039
var body io.Reader = nil
2040
params := make(url.Values)
2041
params.Set("alt", "json")
2042
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
2043
if v, ok := c.opt_["fields"]; ok {
2044
params.Set("fields", fmt.Sprintf("%v", v))
2046
urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/deleteBook")
2047
urls += "?" + params.Encode()
2048
req, _ := http.NewRequest("POST", urls, body)
2049
googleapi.SetOpaque(req.URL)
2050
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2051
res, err := c.s.client.Do(req)
2055
defer googleapi.CloseBody(res)
2056
if err := googleapi.CheckResponse(res); err != nil {
2061
// "description": "Remove the book and its contents",
2062
// "httpMethod": "POST",
2063
// "id": "books.cloudloading.deleteBook",
2064
// "parameterOrder": [
2069
// "description": "The id of the book to be removed.",
2070
// "location": "query",
2071
// "required": true,
2075
// "path": "cloudloading/deleteBook",
2077
// "https://www.googleapis.com/auth/books"
2083
// method id "books.cloudloading.updateBook":
2085
type CloudloadingUpdateBookCall struct {
2087
bookscloudloadingresource *BooksCloudloadingResource
2088
opt_ map[string]interface{}
2092
func (r *CloudloadingService) UpdateBook(bookscloudloadingresource *BooksCloudloadingResource) *CloudloadingUpdateBookCall {
2093
c := &CloudloadingUpdateBookCall{s: r.s, opt_: make(map[string]interface{})}
2094
c.bookscloudloadingresource = bookscloudloadingresource
2098
// Fields allows partial responses to be retrieved.
2099
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2100
// for more information.
2101
func (c *CloudloadingUpdateBookCall) Fields(s ...googleapi.Field) *CloudloadingUpdateBookCall {
2102
c.opt_["fields"] = googleapi.CombineFields(s)
2106
func (c *CloudloadingUpdateBookCall) Do() (*BooksCloudloadingResource, error) {
2107
var body io.Reader = nil
2108
body, err := googleapi.WithoutDataWrapper.JSONReader(c.bookscloudloadingresource)
2112
ctype := "application/json"
2113
params := make(url.Values)
2114
params.Set("alt", "json")
2115
if v, ok := c.opt_["fields"]; ok {
2116
params.Set("fields", fmt.Sprintf("%v", v))
2118
urls := googleapi.ResolveRelative(c.s.BasePath, "cloudloading/updateBook")
2119
urls += "?" + params.Encode()
2120
req, _ := http.NewRequest("POST", urls, body)
2121
googleapi.SetOpaque(req.URL)
2122
req.Header.Set("Content-Type", ctype)
2123
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2124
res, err := c.s.client.Do(req)
2128
defer googleapi.CloseBody(res)
2129
if err := googleapi.CheckResponse(res); err != nil {
2132
var ret *BooksCloudloadingResource
2133
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2138
// "description": "",
2139
// "httpMethod": "POST",
2140
// "id": "books.cloudloading.updateBook",
2141
// "path": "cloudloading/updateBook",
2143
// "$ref": "BooksCloudloadingResource"
2146
// "$ref": "BooksCloudloadingResource"
2149
// "https://www.googleapis.com/auth/books"
2155
// method id "books.layers.get":
2157
type LayersGetCall struct {
2161
opt_ map[string]interface{}
2164
// Get: Gets the layer summary for a volume.
2165
func (r *LayersService) Get(volumeId string, summaryId string) *LayersGetCall {
2166
c := &LayersGetCall{s: r.s, opt_: make(map[string]interface{})}
2167
c.volumeId = volumeId
2168
c.summaryId = summaryId
2172
// ContentVersion sets the optional parameter "contentVersion": The
2173
// content version for the requested volume.
2174
func (c *LayersGetCall) ContentVersion(contentVersion string) *LayersGetCall {
2175
c.opt_["contentVersion"] = contentVersion
2179
// Source sets the optional parameter "source": String to identify the
2180
// originator of this request.
2181
func (c *LayersGetCall) Source(source string) *LayersGetCall {
2182
c.opt_["source"] = source
2186
// Fields allows partial responses to be retrieved.
2187
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2188
// for more information.
2189
func (c *LayersGetCall) Fields(s ...googleapi.Field) *LayersGetCall {
2190
c.opt_["fields"] = googleapi.CombineFields(s)
2194
func (c *LayersGetCall) Do() (*Layersummary, error) {
2195
var body io.Reader = nil
2196
params := make(url.Values)
2197
params.Set("alt", "json")
2198
if v, ok := c.opt_["contentVersion"]; ok {
2199
params.Set("contentVersion", fmt.Sprintf("%v", v))
2201
if v, ok := c.opt_["source"]; ok {
2202
params.Set("source", fmt.Sprintf("%v", v))
2204
if v, ok := c.opt_["fields"]; ok {
2205
params.Set("fields", fmt.Sprintf("%v", v))
2207
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary/{summaryId}")
2208
urls += "?" + params.Encode()
2209
req, _ := http.NewRequest("GET", urls, body)
2210
googleapi.Expand(req.URL, map[string]string{
2211
"volumeId": c.volumeId,
2212
"summaryId": c.summaryId,
2214
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2215
res, err := c.s.client.Do(req)
2219
defer googleapi.CloseBody(res)
2220
if err := googleapi.CheckResponse(res); err != nil {
2223
var ret *Layersummary
2224
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2229
// "description": "Gets the layer summary for a volume.",
2230
// "httpMethod": "GET",
2231
// "id": "books.layers.get",
2232
// "parameterOrder": [
2237
// "contentVersion": {
2238
// "description": "The content version for the requested volume.",
2239
// "location": "query",
2243
// "description": "String to identify the originator of this request.",
2244
// "location": "query",
2248
// "description": "The ID for the layer to get the summary for.",
2249
// "location": "path",
2250
// "required": true,
2254
// "description": "The volume to retrieve layers for.",
2255
// "location": "path",
2256
// "required": true,
2260
// "path": "volumes/{volumeId}/layersummary/{summaryId}",
2262
// "$ref": "Layersummary"
2265
// "https://www.googleapis.com/auth/books"
2271
// method id "books.layers.list":
2273
type LayersListCall struct {
2276
opt_ map[string]interface{}
2279
// List: List the layer summaries for a volume.
2280
func (r *LayersService) List(volumeId string) *LayersListCall {
2281
c := &LayersListCall{s: r.s, opt_: make(map[string]interface{})}
2282
c.volumeId = volumeId
2286
// ContentVersion sets the optional parameter "contentVersion": The
2287
// content version for the requested volume.
2288
func (c *LayersListCall) ContentVersion(contentVersion string) *LayersListCall {
2289
c.opt_["contentVersion"] = contentVersion
2293
// MaxResults sets the optional parameter "maxResults": Maximum number
2294
// of results to return
2295
func (c *LayersListCall) MaxResults(maxResults int64) *LayersListCall {
2296
c.opt_["maxResults"] = maxResults
2300
// PageToken sets the optional parameter "pageToken": The value of the
2301
// nextToken from the previous page.
2302
func (c *LayersListCall) PageToken(pageToken string) *LayersListCall {
2303
c.opt_["pageToken"] = pageToken
2307
// Source sets the optional parameter "source": String to identify the
2308
// originator of this request.
2309
func (c *LayersListCall) Source(source string) *LayersListCall {
2310
c.opt_["source"] = source
2314
// Fields allows partial responses to be retrieved.
2315
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2316
// for more information.
2317
func (c *LayersListCall) Fields(s ...googleapi.Field) *LayersListCall {
2318
c.opt_["fields"] = googleapi.CombineFields(s)
2322
func (c *LayersListCall) Do() (*Layersummaries, error) {
2323
var body io.Reader = nil
2324
params := make(url.Values)
2325
params.Set("alt", "json")
2326
if v, ok := c.opt_["contentVersion"]; ok {
2327
params.Set("contentVersion", fmt.Sprintf("%v", v))
2329
if v, ok := c.opt_["maxResults"]; ok {
2330
params.Set("maxResults", fmt.Sprintf("%v", v))
2332
if v, ok := c.opt_["pageToken"]; ok {
2333
params.Set("pageToken", fmt.Sprintf("%v", v))
2335
if v, ok := c.opt_["source"]; ok {
2336
params.Set("source", fmt.Sprintf("%v", v))
2338
if v, ok := c.opt_["fields"]; ok {
2339
params.Set("fields", fmt.Sprintf("%v", v))
2341
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layersummary")
2342
urls += "?" + params.Encode()
2343
req, _ := http.NewRequest("GET", urls, body)
2344
googleapi.Expand(req.URL, map[string]string{
2345
"volumeId": c.volumeId,
2347
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2348
res, err := c.s.client.Do(req)
2352
defer googleapi.CloseBody(res)
2353
if err := googleapi.CheckResponse(res); err != nil {
2356
var ret *Layersummaries
2357
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2362
// "description": "List the layer summaries for a volume.",
2363
// "httpMethod": "GET",
2364
// "id": "books.layers.list",
2365
// "parameterOrder": [
2369
// "contentVersion": {
2370
// "description": "The content version for the requested volume.",
2371
// "location": "query",
2375
// "description": "Maximum number of results to return",
2376
// "format": "uint32",
2377
// "location": "query",
2378
// "maximum": "200",
2380
// "type": "integer"
2383
// "description": "The value of the nextToken from the previous page.",
2384
// "location": "query",
2388
// "description": "String to identify the originator of this request.",
2389
// "location": "query",
2393
// "description": "The volume to retrieve layers for.",
2394
// "location": "path",
2395
// "required": true,
2399
// "path": "volumes/{volumeId}/layersummary",
2401
// "$ref": "Layersummaries"
2404
// "https://www.googleapis.com/auth/books"
2410
// method id "books.layers.annotationData.get":
2412
type LayersAnnotationDataGetCall struct {
2416
annotationDataId string
2417
contentVersion string
2418
opt_ map[string]interface{}
2421
// Get: Gets the annotation data.
2422
func (r *LayersAnnotationDataService) Get(volumeId string, layerId string, annotationDataId string, contentVersion string) *LayersAnnotationDataGetCall {
2423
c := &LayersAnnotationDataGetCall{s: r.s, opt_: make(map[string]interface{})}
2424
c.volumeId = volumeId
2426
c.annotationDataId = annotationDataId
2427
c.contentVersion = contentVersion
2431
// AllowWebDefinitions sets the optional parameter
2432
// "allowWebDefinitions": For the dictionary layer. Whether or not to
2433
// allow web definitions.
2434
func (c *LayersAnnotationDataGetCall) AllowWebDefinitions(allowWebDefinitions bool) *LayersAnnotationDataGetCall {
2435
c.opt_["allowWebDefinitions"] = allowWebDefinitions
2439
// H sets the optional parameter "h": The requested pixel height for any
2440
// images. If height is provided width must also be provided.
2441
func (c *LayersAnnotationDataGetCall) H(h int64) *LayersAnnotationDataGetCall {
2446
// Locale sets the optional parameter "locale": The locale information
2447
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
2449
func (c *LayersAnnotationDataGetCall) Locale(locale string) *LayersAnnotationDataGetCall {
2450
c.opt_["locale"] = locale
2454
// Scale sets the optional parameter "scale": The requested scale for
2456
func (c *LayersAnnotationDataGetCall) Scale(scale int64) *LayersAnnotationDataGetCall {
2457
c.opt_["scale"] = scale
2461
// Source sets the optional parameter "source": String to identify the
2462
// originator of this request.
2463
func (c *LayersAnnotationDataGetCall) Source(source string) *LayersAnnotationDataGetCall {
2464
c.opt_["source"] = source
2468
// W sets the optional parameter "w": The requested pixel width for any
2469
// images. If width is provided height must also be provided.
2470
func (c *LayersAnnotationDataGetCall) W(w int64) *LayersAnnotationDataGetCall {
2475
// Fields allows partial responses to be retrieved.
2476
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2477
// for more information.
2478
func (c *LayersAnnotationDataGetCall) Fields(s ...googleapi.Field) *LayersAnnotationDataGetCall {
2479
c.opt_["fields"] = googleapi.CombineFields(s)
2483
func (c *LayersAnnotationDataGetCall) Do() (*Annotationdata, error) {
2484
var body io.Reader = nil
2485
params := make(url.Values)
2486
params.Set("alt", "json")
2487
params.Set("contentVersion", fmt.Sprintf("%v", c.contentVersion))
2488
if v, ok := c.opt_["allowWebDefinitions"]; ok {
2489
params.Set("allowWebDefinitions", fmt.Sprintf("%v", v))
2491
if v, ok := c.opt_["h"]; ok {
2492
params.Set("h", fmt.Sprintf("%v", v))
2494
if v, ok := c.opt_["locale"]; ok {
2495
params.Set("locale", fmt.Sprintf("%v", v))
2497
if v, ok := c.opt_["scale"]; ok {
2498
params.Set("scale", fmt.Sprintf("%v", v))
2500
if v, ok := c.opt_["source"]; ok {
2501
params.Set("source", fmt.Sprintf("%v", v))
2503
if v, ok := c.opt_["w"]; ok {
2504
params.Set("w", fmt.Sprintf("%v", v))
2506
if v, ok := c.opt_["fields"]; ok {
2507
params.Set("fields", fmt.Sprintf("%v", v))
2509
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}")
2510
urls += "?" + params.Encode()
2511
req, _ := http.NewRequest("GET", urls, body)
2512
googleapi.Expand(req.URL, map[string]string{
2513
"volumeId": c.volumeId,
2514
"layerId": c.layerId,
2515
"annotationDataId": c.annotationDataId,
2517
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2518
res, err := c.s.client.Do(req)
2522
defer googleapi.CloseBody(res)
2523
if err := googleapi.CheckResponse(res); err != nil {
2526
var ret *Annotationdata
2527
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2532
// "description": "Gets the annotation data.",
2533
// "httpMethod": "GET",
2534
// "id": "books.layers.annotationData.get",
2535
// "parameterOrder": [
2538
// "annotationDataId",
2542
// "allowWebDefinitions": {
2543
// "description": "For the dictionary layer. Whether or not to allow web definitions.",
2544
// "location": "query",
2545
// "type": "boolean"
2547
// "annotationDataId": {
2548
// "description": "The ID of the annotation data to retrieve.",
2549
// "location": "path",
2550
// "required": true,
2553
// "contentVersion": {
2554
// "description": "The content version for the volume you are trying to retrieve.",
2555
// "location": "query",
2556
// "required": true,
2560
// "description": "The requested pixel height for any images. If height is provided width must also be provided.",
2561
// "format": "int32",
2562
// "location": "query",
2563
// "type": "integer"
2566
// "description": "The ID for the layer to get the annotations.",
2567
// "location": "path",
2568
// "required": true,
2572
// "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
2573
// "location": "query",
2577
// "description": "The requested scale for the image.",
2578
// "format": "int32",
2579
// "location": "query",
2581
// "type": "integer"
2584
// "description": "String to identify the originator of this request.",
2585
// "location": "query",
2589
// "description": "The volume to retrieve annotations for.",
2590
// "location": "path",
2591
// "required": true,
2595
// "description": "The requested pixel width for any images. If width is provided height must also be provided.",
2596
// "format": "int32",
2597
// "location": "query",
2598
// "type": "integer"
2601
// "path": "volumes/{volumeId}/layers/{layerId}/data/{annotationDataId}",
2603
// "$ref": "Annotationdata"
2606
// "https://www.googleapis.com/auth/books"
2612
// method id "books.layers.annotationData.list":
2614
type LayersAnnotationDataListCall struct {
2618
contentVersion string
2619
opt_ map[string]interface{}
2622
// List: Gets the annotation data for a volume and layer.
2623
func (r *LayersAnnotationDataService) List(volumeId string, layerId string, contentVersion string) *LayersAnnotationDataListCall {
2624
c := &LayersAnnotationDataListCall{s: r.s, opt_: make(map[string]interface{})}
2625
c.volumeId = volumeId
2627
c.contentVersion = contentVersion
2631
// AnnotationDataId sets the optional parameter "annotationDataId": The
2632
// list of Annotation Data Ids to retrieve. Pagination is ignored if
2634
func (c *LayersAnnotationDataListCall) AnnotationDataId(annotationDataId string) *LayersAnnotationDataListCall {
2635
c.opt_["annotationDataId"] = annotationDataId
2639
// H sets the optional parameter "h": The requested pixel height for any
2640
// images. If height is provided width must also be provided.
2641
func (c *LayersAnnotationDataListCall) H(h int64) *LayersAnnotationDataListCall {
2646
// Locale sets the optional parameter "locale": The locale information
2647
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
2649
func (c *LayersAnnotationDataListCall) Locale(locale string) *LayersAnnotationDataListCall {
2650
c.opt_["locale"] = locale
2654
// MaxResults sets the optional parameter "maxResults": Maximum number
2655
// of results to return
2656
func (c *LayersAnnotationDataListCall) MaxResults(maxResults int64) *LayersAnnotationDataListCall {
2657
c.opt_["maxResults"] = maxResults
2661
// PageToken sets the optional parameter "pageToken": The value of the
2662
// nextToken from the previous page.
2663
func (c *LayersAnnotationDataListCall) PageToken(pageToken string) *LayersAnnotationDataListCall {
2664
c.opt_["pageToken"] = pageToken
2668
// Scale sets the optional parameter "scale": The requested scale for
2670
func (c *LayersAnnotationDataListCall) Scale(scale int64) *LayersAnnotationDataListCall {
2671
c.opt_["scale"] = scale
2675
// Source sets the optional parameter "source": String to identify the
2676
// originator of this request.
2677
func (c *LayersAnnotationDataListCall) Source(source string) *LayersAnnotationDataListCall {
2678
c.opt_["source"] = source
2682
// UpdatedMax sets the optional parameter "updatedMax": RFC 3339
2683
// timestamp to restrict to items updated prior to this timestamp
2685
func (c *LayersAnnotationDataListCall) UpdatedMax(updatedMax string) *LayersAnnotationDataListCall {
2686
c.opt_["updatedMax"] = updatedMax
2690
// UpdatedMin sets the optional parameter "updatedMin": RFC 3339
2691
// timestamp to restrict to items updated since this timestamp
2693
func (c *LayersAnnotationDataListCall) UpdatedMin(updatedMin string) *LayersAnnotationDataListCall {
2694
c.opt_["updatedMin"] = updatedMin
2698
// W sets the optional parameter "w": The requested pixel width for any
2699
// images. If width is provided height must also be provided.
2700
func (c *LayersAnnotationDataListCall) W(w int64) *LayersAnnotationDataListCall {
2705
// Fields allows partial responses to be retrieved.
2706
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2707
// for more information.
2708
func (c *LayersAnnotationDataListCall) Fields(s ...googleapi.Field) *LayersAnnotationDataListCall {
2709
c.opt_["fields"] = googleapi.CombineFields(s)
2713
func (c *LayersAnnotationDataListCall) Do() (*Annotationsdata, error) {
2714
var body io.Reader = nil
2715
params := make(url.Values)
2716
params.Set("alt", "json")
2717
params.Set("contentVersion", fmt.Sprintf("%v", c.contentVersion))
2718
if v, ok := c.opt_["annotationDataId"]; ok {
2719
params.Set("annotationDataId", fmt.Sprintf("%v", v))
2721
if v, ok := c.opt_["h"]; ok {
2722
params.Set("h", fmt.Sprintf("%v", v))
2724
if v, ok := c.opt_["locale"]; ok {
2725
params.Set("locale", fmt.Sprintf("%v", v))
2727
if v, ok := c.opt_["maxResults"]; ok {
2728
params.Set("maxResults", fmt.Sprintf("%v", v))
2730
if v, ok := c.opt_["pageToken"]; ok {
2731
params.Set("pageToken", fmt.Sprintf("%v", v))
2733
if v, ok := c.opt_["scale"]; ok {
2734
params.Set("scale", fmt.Sprintf("%v", v))
2736
if v, ok := c.opt_["source"]; ok {
2737
params.Set("source", fmt.Sprintf("%v", v))
2739
if v, ok := c.opt_["updatedMax"]; ok {
2740
params.Set("updatedMax", fmt.Sprintf("%v", v))
2742
if v, ok := c.opt_["updatedMin"]; ok {
2743
params.Set("updatedMin", fmt.Sprintf("%v", v))
2745
if v, ok := c.opt_["w"]; ok {
2746
params.Set("w", fmt.Sprintf("%v", v))
2748
if v, ok := c.opt_["fields"]; ok {
2749
params.Set("fields", fmt.Sprintf("%v", v))
2751
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/data")
2752
urls += "?" + params.Encode()
2753
req, _ := http.NewRequest("GET", urls, body)
2754
googleapi.Expand(req.URL, map[string]string{
2755
"volumeId": c.volumeId,
2756
"layerId": c.layerId,
2758
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2759
res, err := c.s.client.Do(req)
2763
defer googleapi.CloseBody(res)
2764
if err := googleapi.CheckResponse(res); err != nil {
2767
var ret *Annotationsdata
2768
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2773
// "description": "Gets the annotation data for a volume and layer.",
2774
// "httpMethod": "GET",
2775
// "id": "books.layers.annotationData.list",
2776
// "parameterOrder": [
2782
// "annotationDataId": {
2783
// "description": "The list of Annotation Data Ids to retrieve. Pagination is ignored if this is set.",
2784
// "location": "query",
2785
// "repeated": true,
2788
// "contentVersion": {
2789
// "description": "The content version for the requested volume.",
2790
// "location": "query",
2791
// "required": true,
2795
// "description": "The requested pixel height for any images. If height is provided width must also be provided.",
2796
// "format": "int32",
2797
// "location": "query",
2798
// "type": "integer"
2801
// "description": "The ID for the layer to get the annotation data.",
2802
// "location": "path",
2803
// "required": true,
2807
// "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
2808
// "location": "query",
2812
// "description": "Maximum number of results to return",
2813
// "format": "uint32",
2814
// "location": "query",
2815
// "maximum": "200",
2817
// "type": "integer"
2820
// "description": "The value of the nextToken from the previous page.",
2821
// "location": "query",
2825
// "description": "The requested scale for the image.",
2826
// "format": "int32",
2827
// "location": "query",
2829
// "type": "integer"
2832
// "description": "String to identify the originator of this request.",
2833
// "location": "query",
2837
// "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
2838
// "location": "query",
2842
// "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
2843
// "location": "query",
2847
// "description": "The volume to retrieve annotation data for.",
2848
// "location": "path",
2849
// "required": true,
2853
// "description": "The requested pixel width for any images. If width is provided height must also be provided.",
2854
// "format": "int32",
2855
// "location": "query",
2856
// "type": "integer"
2859
// "path": "volumes/{volumeId}/layers/{layerId}/data",
2861
// "$ref": "Annotationsdata"
2864
// "https://www.googleapis.com/auth/books"
2870
// method id "books.layers.volumeAnnotations.get":
2872
type LayersVolumeAnnotationsGetCall struct {
2877
opt_ map[string]interface{}
2880
// Get: Gets the volume annotation.
2881
func (r *LayersVolumeAnnotationsService) Get(volumeId string, layerId string, annotationId string) *LayersVolumeAnnotationsGetCall {
2882
c := &LayersVolumeAnnotationsGetCall{s: r.s, opt_: make(map[string]interface{})}
2883
c.volumeId = volumeId
2885
c.annotationId = annotationId
2889
// Locale sets the optional parameter "locale": The locale information
2890
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
2892
func (c *LayersVolumeAnnotationsGetCall) Locale(locale string) *LayersVolumeAnnotationsGetCall {
2893
c.opt_["locale"] = locale
2897
// Source sets the optional parameter "source": String to identify the
2898
// originator of this request.
2899
func (c *LayersVolumeAnnotationsGetCall) Source(source string) *LayersVolumeAnnotationsGetCall {
2900
c.opt_["source"] = source
2904
// Fields allows partial responses to be retrieved.
2905
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2906
// for more information.
2907
func (c *LayersVolumeAnnotationsGetCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsGetCall {
2908
c.opt_["fields"] = googleapi.CombineFields(s)
2912
func (c *LayersVolumeAnnotationsGetCall) Do() (*Volumeannotation, error) {
2913
var body io.Reader = nil
2914
params := make(url.Values)
2915
params.Set("alt", "json")
2916
if v, ok := c.opt_["locale"]; ok {
2917
params.Set("locale", fmt.Sprintf("%v", v))
2919
if v, ok := c.opt_["source"]; ok {
2920
params.Set("source", fmt.Sprintf("%v", v))
2922
if v, ok := c.opt_["fields"]; ok {
2923
params.Set("fields", fmt.Sprintf("%v", v))
2925
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}")
2926
urls += "?" + params.Encode()
2927
req, _ := http.NewRequest("GET", urls, body)
2928
googleapi.Expand(req.URL, map[string]string{
2929
"volumeId": c.volumeId,
2930
"layerId": c.layerId,
2931
"annotationId": c.annotationId,
2933
req.Header.Set("User-Agent", "google-api-go-client/0.5")
2934
res, err := c.s.client.Do(req)
2938
defer googleapi.CloseBody(res)
2939
if err := googleapi.CheckResponse(res); err != nil {
2942
var ret *Volumeannotation
2943
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
2948
// "description": "Gets the volume annotation.",
2949
// "httpMethod": "GET",
2950
// "id": "books.layers.volumeAnnotations.get",
2951
// "parameterOrder": [
2957
// "annotationId": {
2958
// "description": "The ID of the volume annotation to retrieve.",
2959
// "location": "path",
2960
// "required": true,
2964
// "description": "The ID for the layer to get the annotations.",
2965
// "location": "path",
2966
// "required": true,
2970
// "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
2971
// "location": "query",
2975
// "description": "String to identify the originator of this request.",
2976
// "location": "query",
2980
// "description": "The volume to retrieve annotations for.",
2981
// "location": "path",
2982
// "required": true,
2986
// "path": "volumes/{volumeId}/layers/{layerId}/annotations/{annotationId}",
2988
// "$ref": "Volumeannotation"
2991
// "https://www.googleapis.com/auth/books"
2997
// method id "books.layers.volumeAnnotations.list":
2999
type LayersVolumeAnnotationsListCall struct {
3003
contentVersion string
3004
opt_ map[string]interface{}
3007
// List: Gets the volume annotations for a volume and layer.
3008
func (r *LayersVolumeAnnotationsService) List(volumeId string, layerId string, contentVersion string) *LayersVolumeAnnotationsListCall {
3009
c := &LayersVolumeAnnotationsListCall{s: r.s, opt_: make(map[string]interface{})}
3010
c.volumeId = volumeId
3012
c.contentVersion = contentVersion
3016
// EndOffset sets the optional parameter "endOffset": The end offset to
3017
// end retrieving data from.
3018
func (c *LayersVolumeAnnotationsListCall) EndOffset(endOffset string) *LayersVolumeAnnotationsListCall {
3019
c.opt_["endOffset"] = endOffset
3023
// EndPosition sets the optional parameter "endPosition": The end
3024
// position to end retrieving data from.
3025
func (c *LayersVolumeAnnotationsListCall) EndPosition(endPosition string) *LayersVolumeAnnotationsListCall {
3026
c.opt_["endPosition"] = endPosition
3030
// Locale sets the optional parameter "locale": The locale information
3031
// for the data. ISO-639-1 language and ISO-3166-1 country code. Ex:
3033
func (c *LayersVolumeAnnotationsListCall) Locale(locale string) *LayersVolumeAnnotationsListCall {
3034
c.opt_["locale"] = locale
3038
// MaxResults sets the optional parameter "maxResults": Maximum number
3039
// of results to return
3040
func (c *LayersVolumeAnnotationsListCall) MaxResults(maxResults int64) *LayersVolumeAnnotationsListCall {
3041
c.opt_["maxResults"] = maxResults
3045
// PageToken sets the optional parameter "pageToken": The value of the
3046
// nextToken from the previous page.
3047
func (c *LayersVolumeAnnotationsListCall) PageToken(pageToken string) *LayersVolumeAnnotationsListCall {
3048
c.opt_["pageToken"] = pageToken
3052
// ShowDeleted sets the optional parameter "showDeleted": Set to true to
3053
// return deleted annotations. updatedMin must be in the request to use
3054
// this. Defaults to false.
3055
func (c *LayersVolumeAnnotationsListCall) ShowDeleted(showDeleted bool) *LayersVolumeAnnotationsListCall {
3056
c.opt_["showDeleted"] = showDeleted
3060
// Source sets the optional parameter "source": String to identify the
3061
// originator of this request.
3062
func (c *LayersVolumeAnnotationsListCall) Source(source string) *LayersVolumeAnnotationsListCall {
3063
c.opt_["source"] = source
3067
// StartOffset sets the optional parameter "startOffset": The start
3068
// offset to start retrieving data from.
3069
func (c *LayersVolumeAnnotationsListCall) StartOffset(startOffset string) *LayersVolumeAnnotationsListCall {
3070
c.opt_["startOffset"] = startOffset
3074
// StartPosition sets the optional parameter "startPosition": The start
3075
// position to start retrieving data from.
3076
func (c *LayersVolumeAnnotationsListCall) StartPosition(startPosition string) *LayersVolumeAnnotationsListCall {
3077
c.opt_["startPosition"] = startPosition
3081
// UpdatedMax sets the optional parameter "updatedMax": RFC 3339
3082
// timestamp to restrict to items updated prior to this timestamp
3084
func (c *LayersVolumeAnnotationsListCall) UpdatedMax(updatedMax string) *LayersVolumeAnnotationsListCall {
3085
c.opt_["updatedMax"] = updatedMax
3089
// UpdatedMin sets the optional parameter "updatedMin": RFC 3339
3090
// timestamp to restrict to items updated since this timestamp
3092
func (c *LayersVolumeAnnotationsListCall) UpdatedMin(updatedMin string) *LayersVolumeAnnotationsListCall {
3093
c.opt_["updatedMin"] = updatedMin
3097
// VolumeAnnotationsVersion sets the optional parameter
3098
// "volumeAnnotationsVersion": The version of the volume annotations
3099
// that you are requesting.
3100
func (c *LayersVolumeAnnotationsListCall) VolumeAnnotationsVersion(volumeAnnotationsVersion string) *LayersVolumeAnnotationsListCall {
3101
c.opt_["volumeAnnotationsVersion"] = volumeAnnotationsVersion
3105
// Fields allows partial responses to be retrieved.
3106
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3107
// for more information.
3108
func (c *LayersVolumeAnnotationsListCall) Fields(s ...googleapi.Field) *LayersVolumeAnnotationsListCall {
3109
c.opt_["fields"] = googleapi.CombineFields(s)
3113
func (c *LayersVolumeAnnotationsListCall) Do() (*Volumeannotations, error) {
3114
var body io.Reader = nil
3115
params := make(url.Values)
3116
params.Set("alt", "json")
3117
params.Set("contentVersion", fmt.Sprintf("%v", c.contentVersion))
3118
if v, ok := c.opt_["endOffset"]; ok {
3119
params.Set("endOffset", fmt.Sprintf("%v", v))
3121
if v, ok := c.opt_["endPosition"]; ok {
3122
params.Set("endPosition", fmt.Sprintf("%v", v))
3124
if v, ok := c.opt_["locale"]; ok {
3125
params.Set("locale", fmt.Sprintf("%v", v))
3127
if v, ok := c.opt_["maxResults"]; ok {
3128
params.Set("maxResults", fmt.Sprintf("%v", v))
3130
if v, ok := c.opt_["pageToken"]; ok {
3131
params.Set("pageToken", fmt.Sprintf("%v", v))
3133
if v, ok := c.opt_["showDeleted"]; ok {
3134
params.Set("showDeleted", fmt.Sprintf("%v", v))
3136
if v, ok := c.opt_["source"]; ok {
3137
params.Set("source", fmt.Sprintf("%v", v))
3139
if v, ok := c.opt_["startOffset"]; ok {
3140
params.Set("startOffset", fmt.Sprintf("%v", v))
3142
if v, ok := c.opt_["startPosition"]; ok {
3143
params.Set("startPosition", fmt.Sprintf("%v", v))
3145
if v, ok := c.opt_["updatedMax"]; ok {
3146
params.Set("updatedMax", fmt.Sprintf("%v", v))
3148
if v, ok := c.opt_["updatedMin"]; ok {
3149
params.Set("updatedMin", fmt.Sprintf("%v", v))
3151
if v, ok := c.opt_["volumeAnnotationsVersion"]; ok {
3152
params.Set("volumeAnnotationsVersion", fmt.Sprintf("%v", v))
3154
if v, ok := c.opt_["fields"]; ok {
3155
params.Set("fields", fmt.Sprintf("%v", v))
3157
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/layers/{layerId}")
3158
urls += "?" + params.Encode()
3159
req, _ := http.NewRequest("GET", urls, body)
3160
googleapi.Expand(req.URL, map[string]string{
3161
"volumeId": c.volumeId,
3162
"layerId": c.layerId,
3164
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3165
res, err := c.s.client.Do(req)
3169
defer googleapi.CloseBody(res)
3170
if err := googleapi.CheckResponse(res); err != nil {
3173
var ret *Volumeannotations
3174
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3179
// "description": "Gets the volume annotations for a volume and layer.",
3180
// "httpMethod": "GET",
3181
// "id": "books.layers.volumeAnnotations.list",
3182
// "parameterOrder": [
3188
// "contentVersion": {
3189
// "description": "The content version for the requested volume.",
3190
// "location": "query",
3191
// "required": true,
3195
// "description": "The end offset to end retrieving data from.",
3196
// "location": "query",
3200
// "description": "The end position to end retrieving data from.",
3201
// "location": "query",
3205
// "description": "The ID for the layer to get the annotations.",
3206
// "location": "path",
3207
// "required": true,
3211
// "description": "The locale information for the data. ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'.",
3212
// "location": "query",
3216
// "description": "Maximum number of results to return",
3217
// "format": "uint32",
3218
// "location": "query",
3219
// "maximum": "200",
3221
// "type": "integer"
3224
// "description": "The value of the nextToken from the previous page.",
3225
// "location": "query",
3229
// "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
3230
// "location": "query",
3231
// "type": "boolean"
3234
// "description": "String to identify the originator of this request.",
3235
// "location": "query",
3239
// "description": "The start offset to start retrieving data from.",
3240
// "location": "query",
3243
// "startPosition": {
3244
// "description": "The start position to start retrieving data from.",
3245
// "location": "query",
3249
// "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
3250
// "location": "query",
3254
// "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
3255
// "location": "query",
3258
// "volumeAnnotationsVersion": {
3259
// "description": "The version of the volume annotations that you are requesting.",
3260
// "location": "query",
3264
// "description": "The volume to retrieve annotations for.",
3265
// "location": "path",
3266
// "required": true,
3270
// "path": "volumes/{volumeId}/layers/{layerId}",
3272
// "$ref": "Volumeannotations"
3275
// "https://www.googleapis.com/auth/books"
3281
// method id "books.myconfig.releaseDownloadAccess":
3283
type MyconfigReleaseDownloadAccessCall struct {
3287
opt_ map[string]interface{}
3290
// ReleaseDownloadAccess: Release downloaded content access restriction.
3291
func (r *MyconfigService) ReleaseDownloadAccess(volumeIds []string, cpksver string) *MyconfigReleaseDownloadAccessCall {
3292
c := &MyconfigReleaseDownloadAccessCall{s: r.s, opt_: make(map[string]interface{})}
3293
c.volumeIds = volumeIds
3298
// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
3299
// codes for message localization, i.e. en_US.
3300
func (c *MyconfigReleaseDownloadAccessCall) Locale(locale string) *MyconfigReleaseDownloadAccessCall {
3301
c.opt_["locale"] = locale
3305
// Source sets the optional parameter "source": String to identify the
3306
// originator of this request.
3307
func (c *MyconfigReleaseDownloadAccessCall) Source(source string) *MyconfigReleaseDownloadAccessCall {
3308
c.opt_["source"] = source
3312
// Fields allows partial responses to be retrieved.
3313
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3314
// for more information.
3315
func (c *MyconfigReleaseDownloadAccessCall) Fields(s ...googleapi.Field) *MyconfigReleaseDownloadAccessCall {
3316
c.opt_["fields"] = googleapi.CombineFields(s)
3320
func (c *MyconfigReleaseDownloadAccessCall) Do() (*DownloadAccesses, error) {
3321
var body io.Reader = nil
3322
params := make(url.Values)
3323
params.Set("alt", "json")
3324
params.Set("cpksver", fmt.Sprintf("%v", c.cpksver))
3325
for _, v := range c.volumeIds {
3326
params.Add("volumeIds", fmt.Sprintf("%v", v))
3328
if v, ok := c.opt_["locale"]; ok {
3329
params.Set("locale", fmt.Sprintf("%v", v))
3331
if v, ok := c.opt_["source"]; ok {
3332
params.Set("source", fmt.Sprintf("%v", v))
3334
if v, ok := c.opt_["fields"]; ok {
3335
params.Set("fields", fmt.Sprintf("%v", v))
3337
urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/releaseDownloadAccess")
3338
urls += "?" + params.Encode()
3339
req, _ := http.NewRequest("POST", urls, body)
3340
googleapi.SetOpaque(req.URL)
3341
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3342
res, err := c.s.client.Do(req)
3346
defer googleapi.CloseBody(res)
3347
if err := googleapi.CheckResponse(res); err != nil {
3350
var ret *DownloadAccesses
3351
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3356
// "description": "Release downloaded content access restriction.",
3357
// "httpMethod": "POST",
3358
// "id": "books.myconfig.releaseDownloadAccess",
3359
// "parameterOrder": [
3365
// "description": "The device/version ID from which to release the restriction.",
3366
// "location": "query",
3367
// "required": true,
3371
// "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
3372
// "location": "query",
3376
// "description": "String to identify the originator of this request.",
3377
// "location": "query",
3381
// "description": "The volume(s) to release restrictions for.",
3382
// "location": "query",
3383
// "repeated": true,
3384
// "required": true,
3388
// "path": "myconfig/releaseDownloadAccess",
3390
// "$ref": "DownloadAccesses"
3393
// "https://www.googleapis.com/auth/books"
3399
// method id "books.myconfig.requestAccess":
3401
type MyconfigRequestAccessCall struct {
3407
opt_ map[string]interface{}
3410
// RequestAccess: Request concurrent and download access restrictions.
3411
func (r *MyconfigService) RequestAccess(source string, volumeId string, nonce string, cpksver string) *MyconfigRequestAccessCall {
3412
c := &MyconfigRequestAccessCall{s: r.s, opt_: make(map[string]interface{})}
3414
c.volumeId = volumeId
3420
// LicenseTypes sets the optional parameter "licenseTypes": The type of
3421
// access license to request. If not specified, the default is BOTH.
3422
func (c *MyconfigRequestAccessCall) LicenseTypes(licenseTypes string) *MyconfigRequestAccessCall {
3423
c.opt_["licenseTypes"] = licenseTypes
3427
// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
3428
// codes for message localization, i.e. en_US.
3429
func (c *MyconfigRequestAccessCall) Locale(locale string) *MyconfigRequestAccessCall {
3430
c.opt_["locale"] = locale
3434
// Fields allows partial responses to be retrieved.
3435
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3436
// for more information.
3437
func (c *MyconfigRequestAccessCall) Fields(s ...googleapi.Field) *MyconfigRequestAccessCall {
3438
c.opt_["fields"] = googleapi.CombineFields(s)
3442
func (c *MyconfigRequestAccessCall) Do() (*RequestAccess, error) {
3443
var body io.Reader = nil
3444
params := make(url.Values)
3445
params.Set("alt", "json")
3446
params.Set("cpksver", fmt.Sprintf("%v", c.cpksver))
3447
params.Set("nonce", fmt.Sprintf("%v", c.nonce))
3448
params.Set("source", fmt.Sprintf("%v", c.source))
3449
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
3450
if v, ok := c.opt_["licenseTypes"]; ok {
3451
params.Set("licenseTypes", fmt.Sprintf("%v", v))
3453
if v, ok := c.opt_["locale"]; ok {
3454
params.Set("locale", fmt.Sprintf("%v", v))
3456
if v, ok := c.opt_["fields"]; ok {
3457
params.Set("fields", fmt.Sprintf("%v", v))
3459
urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/requestAccess")
3460
urls += "?" + params.Encode()
3461
req, _ := http.NewRequest("POST", urls, body)
3462
googleapi.SetOpaque(req.URL)
3463
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3464
res, err := c.s.client.Do(req)
3468
defer googleapi.CloseBody(res)
3469
if err := googleapi.CheckResponse(res); err != nil {
3472
var ret *RequestAccess
3473
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3478
// "description": "Request concurrent and download access restrictions.",
3479
// "httpMethod": "POST",
3480
// "id": "books.myconfig.requestAccess",
3481
// "parameterOrder": [
3489
// "description": "The device/version ID from which to request the restrictions.",
3490
// "location": "query",
3491
// "required": true,
3494
// "licenseTypes": {
3495
// "description": "The type of access license to request. If not specified, the default is BOTH.",
3501
// "enumDescriptions": [
3502
// "Both concurrent and download licenses.",
3503
// "Concurrent access license.",
3504
// "Offline download access license."
3506
// "location": "query",
3510
// "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
3511
// "location": "query",
3515
// "description": "The client nonce value.",
3516
// "location": "query",
3517
// "required": true,
3521
// "description": "String to identify the originator of this request.",
3522
// "location": "query",
3523
// "required": true,
3527
// "description": "The volume to request concurrent/download restrictions for.",
3528
// "location": "query",
3529
// "required": true,
3533
// "path": "myconfig/requestAccess",
3535
// "$ref": "RequestAccess"
3538
// "https://www.googleapis.com/auth/books"
3544
// method id "books.myconfig.syncVolumeLicenses":
3546
type MyconfigSyncVolumeLicensesCall struct {
3551
opt_ map[string]interface{}
3554
// SyncVolumeLicenses: Request downloaded content access for specified
3555
// volumes on the My eBooks shelf.
3556
func (r *MyconfigService) SyncVolumeLicenses(source string, nonce string, cpksver string) *MyconfigSyncVolumeLicensesCall {
3557
c := &MyconfigSyncVolumeLicensesCall{s: r.s, opt_: make(map[string]interface{})}
3564
// Features sets the optional parameter "features": List of features
3565
// supported by the client, i.e., 'RENTALS'
3566
func (c *MyconfigSyncVolumeLicensesCall) Features(features string) *MyconfigSyncVolumeLicensesCall {
3567
c.opt_["features"] = features
3571
// Locale sets the optional parameter "locale": ISO-639-1, ISO-3166-1
3572
// codes for message localization, i.e. en_US.
3573
func (c *MyconfigSyncVolumeLicensesCall) Locale(locale string) *MyconfigSyncVolumeLicensesCall {
3574
c.opt_["locale"] = locale
3578
// ShowPreorders sets the optional parameter "showPreorders": Set to
3579
// true to show pre-ordered books. Defaults to false.
3580
func (c *MyconfigSyncVolumeLicensesCall) ShowPreorders(showPreorders bool) *MyconfigSyncVolumeLicensesCall {
3581
c.opt_["showPreorders"] = showPreorders
3585
// VolumeIds sets the optional parameter "volumeIds": The volume(s) to
3586
// request download restrictions for.
3587
func (c *MyconfigSyncVolumeLicensesCall) VolumeIds(volumeIds string) *MyconfigSyncVolumeLicensesCall {
3588
c.opt_["volumeIds"] = volumeIds
3592
// Fields allows partial responses to be retrieved.
3593
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3594
// for more information.
3595
func (c *MyconfigSyncVolumeLicensesCall) Fields(s ...googleapi.Field) *MyconfigSyncVolumeLicensesCall {
3596
c.opt_["fields"] = googleapi.CombineFields(s)
3600
func (c *MyconfigSyncVolumeLicensesCall) Do() (*Volumes, error) {
3601
var body io.Reader = nil
3602
params := make(url.Values)
3603
params.Set("alt", "json")
3604
params.Set("cpksver", fmt.Sprintf("%v", c.cpksver))
3605
params.Set("nonce", fmt.Sprintf("%v", c.nonce))
3606
params.Set("source", fmt.Sprintf("%v", c.source))
3607
if v, ok := c.opt_["features"]; ok {
3608
params.Set("features", fmt.Sprintf("%v", v))
3610
if v, ok := c.opt_["locale"]; ok {
3611
params.Set("locale", fmt.Sprintf("%v", v))
3613
if v, ok := c.opt_["showPreorders"]; ok {
3614
params.Set("showPreorders", fmt.Sprintf("%v", v))
3616
if v, ok := c.opt_["volumeIds"]; ok {
3617
params.Set("volumeIds", fmt.Sprintf("%v", v))
3619
if v, ok := c.opt_["fields"]; ok {
3620
params.Set("fields", fmt.Sprintf("%v", v))
3622
urls := googleapi.ResolveRelative(c.s.BasePath, "myconfig/syncVolumeLicenses")
3623
urls += "?" + params.Encode()
3624
req, _ := http.NewRequest("POST", urls, body)
3625
googleapi.SetOpaque(req.URL)
3626
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3627
res, err := c.s.client.Do(req)
3631
defer googleapi.CloseBody(res)
3632
if err := googleapi.CheckResponse(res); err != nil {
3636
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3641
// "description": "Request downloaded content access for specified volumes on the My eBooks shelf.",
3642
// "httpMethod": "POST",
3643
// "id": "books.myconfig.syncVolumeLicenses",
3644
// "parameterOrder": [
3651
// "description": "The device/version ID from which to release the restriction.",
3652
// "location": "query",
3653
// "required": true,
3657
// "description": "List of features supported by the client, i.e., 'RENTALS'",
3661
// "enumDescriptions": [
3662
// "Client supports rentals."
3664
// "location": "query",
3665
// "repeated": true,
3669
// "description": "ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.",
3670
// "location": "query",
3674
// "description": "The client nonce value.",
3675
// "location": "query",
3676
// "required": true,
3679
// "showPreorders": {
3680
// "description": "Set to true to show pre-ordered books. Defaults to false.",
3681
// "location": "query",
3682
// "type": "boolean"
3685
// "description": "String to identify the originator of this request.",
3686
// "location": "query",
3687
// "required": true,
3691
// "description": "The volume(s) to request download restrictions for.",
3692
// "location": "query",
3693
// "repeated": true,
3697
// "path": "myconfig/syncVolumeLicenses",
3699
// "$ref": "Volumes"
3702
// "https://www.googleapis.com/auth/books"
3708
// method id "books.mylibrary.annotations.delete":
3710
type MylibraryAnnotationsDeleteCall struct {
3713
opt_ map[string]interface{}
3716
// Delete: Deletes an annotation.
3717
func (r *MylibraryAnnotationsService) Delete(annotationId string) *MylibraryAnnotationsDeleteCall {
3718
c := &MylibraryAnnotationsDeleteCall{s: r.s, opt_: make(map[string]interface{})}
3719
c.annotationId = annotationId
3723
// Source sets the optional parameter "source": String to identify the
3724
// originator of this request.
3725
func (c *MylibraryAnnotationsDeleteCall) Source(source string) *MylibraryAnnotationsDeleteCall {
3726
c.opt_["source"] = source
3730
// Fields allows partial responses to be retrieved.
3731
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3732
// for more information.
3733
func (c *MylibraryAnnotationsDeleteCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsDeleteCall {
3734
c.opt_["fields"] = googleapi.CombineFields(s)
3738
func (c *MylibraryAnnotationsDeleteCall) Do() error {
3739
var body io.Reader = nil
3740
params := make(url.Values)
3741
params.Set("alt", "json")
3742
if v, ok := c.opt_["source"]; ok {
3743
params.Set("source", fmt.Sprintf("%v", v))
3745
if v, ok := c.opt_["fields"]; ok {
3746
params.Set("fields", fmt.Sprintf("%v", v))
3748
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
3749
urls += "?" + params.Encode()
3750
req, _ := http.NewRequest("DELETE", urls, body)
3751
googleapi.Expand(req.URL, map[string]string{
3752
"annotationId": c.annotationId,
3754
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3755
res, err := c.s.client.Do(req)
3759
defer googleapi.CloseBody(res)
3760
if err := googleapi.CheckResponse(res); err != nil {
3765
// "description": "Deletes an annotation.",
3766
// "httpMethod": "DELETE",
3767
// "id": "books.mylibrary.annotations.delete",
3768
// "parameterOrder": [
3772
// "annotationId": {
3773
// "description": "The ID for the annotation to delete.",
3774
// "location": "path",
3775
// "required": true,
3779
// "description": "String to identify the originator of this request.",
3780
// "location": "query",
3784
// "path": "mylibrary/annotations/{annotationId}",
3786
// "https://www.googleapis.com/auth/books"
3792
// method id "books.mylibrary.annotations.get":
3794
type MylibraryAnnotationsGetCall struct {
3797
opt_ map[string]interface{}
3800
// Get: Gets an annotation by its ID.
3801
func (r *MylibraryAnnotationsService) Get(annotationId string) *MylibraryAnnotationsGetCall {
3802
c := &MylibraryAnnotationsGetCall{s: r.s, opt_: make(map[string]interface{})}
3803
c.annotationId = annotationId
3807
// Source sets the optional parameter "source": String to identify the
3808
// originator of this request.
3809
func (c *MylibraryAnnotationsGetCall) Source(source string) *MylibraryAnnotationsGetCall {
3810
c.opt_["source"] = source
3814
// Fields allows partial responses to be retrieved.
3815
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3816
// for more information.
3817
func (c *MylibraryAnnotationsGetCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsGetCall {
3818
c.opt_["fields"] = googleapi.CombineFields(s)
3822
func (c *MylibraryAnnotationsGetCall) Do() (*Annotation, error) {
3823
var body io.Reader = nil
3824
params := make(url.Values)
3825
params.Set("alt", "json")
3826
if v, ok := c.opt_["source"]; ok {
3827
params.Set("source", fmt.Sprintf("%v", v))
3829
if v, ok := c.opt_["fields"]; ok {
3830
params.Set("fields", fmt.Sprintf("%v", v))
3832
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
3833
urls += "?" + params.Encode()
3834
req, _ := http.NewRequest("GET", urls, body)
3835
googleapi.Expand(req.URL, map[string]string{
3836
"annotationId": c.annotationId,
3838
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3839
res, err := c.s.client.Do(req)
3843
defer googleapi.CloseBody(res)
3844
if err := googleapi.CheckResponse(res); err != nil {
3848
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3853
// "description": "Gets an annotation by its ID.",
3854
// "httpMethod": "GET",
3855
// "id": "books.mylibrary.annotations.get",
3856
// "parameterOrder": [
3860
// "annotationId": {
3861
// "description": "The ID for the annotation to retrieve.",
3862
// "location": "path",
3863
// "required": true,
3867
// "description": "String to identify the originator of this request.",
3868
// "location": "query",
3872
// "path": "mylibrary/annotations/{annotationId}",
3874
// "$ref": "Annotation"
3877
// "https://www.googleapis.com/auth/books"
3883
// method id "books.mylibrary.annotations.insert":
3885
type MylibraryAnnotationsInsertCall struct {
3887
annotation *Annotation
3888
opt_ map[string]interface{}
3891
// Insert: Inserts a new annotation.
3892
func (r *MylibraryAnnotationsService) Insert(annotation *Annotation) *MylibraryAnnotationsInsertCall {
3893
c := &MylibraryAnnotationsInsertCall{s: r.s, opt_: make(map[string]interface{})}
3894
c.annotation = annotation
3898
// ShowOnlySummaryInResponse sets the optional parameter
3899
// "showOnlySummaryInResponse": Requests that only the summary of the
3900
// specified layer be provided in the response.
3901
func (c *MylibraryAnnotationsInsertCall) ShowOnlySummaryInResponse(showOnlySummaryInResponse bool) *MylibraryAnnotationsInsertCall {
3902
c.opt_["showOnlySummaryInResponse"] = showOnlySummaryInResponse
3906
// Source sets the optional parameter "source": String to identify the
3907
// originator of this request.
3908
func (c *MylibraryAnnotationsInsertCall) Source(source string) *MylibraryAnnotationsInsertCall {
3909
c.opt_["source"] = source
3913
// Fields allows partial responses to be retrieved.
3914
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3915
// for more information.
3916
func (c *MylibraryAnnotationsInsertCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsInsertCall {
3917
c.opt_["fields"] = googleapi.CombineFields(s)
3921
func (c *MylibraryAnnotationsInsertCall) Do() (*Annotation, error) {
3922
var body io.Reader = nil
3923
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
3927
ctype := "application/json"
3928
params := make(url.Values)
3929
params.Set("alt", "json")
3930
if v, ok := c.opt_["showOnlySummaryInResponse"]; ok {
3931
params.Set("showOnlySummaryInResponse", fmt.Sprintf("%v", v))
3933
if v, ok := c.opt_["source"]; ok {
3934
params.Set("source", fmt.Sprintf("%v", v))
3936
if v, ok := c.opt_["fields"]; ok {
3937
params.Set("fields", fmt.Sprintf("%v", v))
3939
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
3940
urls += "?" + params.Encode()
3941
req, _ := http.NewRequest("POST", urls, body)
3942
googleapi.SetOpaque(req.URL)
3943
req.Header.Set("Content-Type", ctype)
3944
req.Header.Set("User-Agent", "google-api-go-client/0.5")
3945
res, err := c.s.client.Do(req)
3949
defer googleapi.CloseBody(res)
3950
if err := googleapi.CheckResponse(res); err != nil {
3954
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
3959
// "description": "Inserts a new annotation.",
3960
// "httpMethod": "POST",
3961
// "id": "books.mylibrary.annotations.insert",
3963
// "showOnlySummaryInResponse": {
3964
// "description": "Requests that only the summary of the specified layer be provided in the response.",
3965
// "location": "query",
3966
// "type": "boolean"
3969
// "description": "String to identify the originator of this request.",
3970
// "location": "query",
3974
// "path": "mylibrary/annotations",
3976
// "$ref": "Annotation"
3979
// "$ref": "Annotation"
3982
// "https://www.googleapis.com/auth/books"
3988
// method id "books.mylibrary.annotations.list":
3990
type MylibraryAnnotationsListCall struct {
3992
opt_ map[string]interface{}
3995
// List: Retrieves a list of annotations, possibly filtered.
3996
func (r *MylibraryAnnotationsService) List() *MylibraryAnnotationsListCall {
3997
c := &MylibraryAnnotationsListCall{s: r.s, opt_: make(map[string]interface{})}
4001
// ContentVersion sets the optional parameter "contentVersion": The
4002
// content version for the requested volume.
4003
func (c *MylibraryAnnotationsListCall) ContentVersion(contentVersion string) *MylibraryAnnotationsListCall {
4004
c.opt_["contentVersion"] = contentVersion
4008
// LayerId sets the optional parameter "layerId": The layer ID to limit
4010
func (c *MylibraryAnnotationsListCall) LayerId(layerId string) *MylibraryAnnotationsListCall {
4011
c.opt_["layerId"] = layerId
4015
// LayerIds sets the optional parameter "layerIds": The layer ID(s) to
4016
// limit annotation by.
4017
func (c *MylibraryAnnotationsListCall) LayerIds(layerIds string) *MylibraryAnnotationsListCall {
4018
c.opt_["layerIds"] = layerIds
4022
// MaxResults sets the optional parameter "maxResults": Maximum number
4023
// of results to return
4024
func (c *MylibraryAnnotationsListCall) MaxResults(maxResults int64) *MylibraryAnnotationsListCall {
4025
c.opt_["maxResults"] = maxResults
4029
// PageIds sets the optional parameter "pageIds": The page ID(s) for the
4030
// volume that is being queried.
4031
func (c *MylibraryAnnotationsListCall) PageIds(pageIds string) *MylibraryAnnotationsListCall {
4032
c.opt_["pageIds"] = pageIds
4036
// PageToken sets the optional parameter "pageToken": The value of the
4037
// nextToken from the previous page.
4038
func (c *MylibraryAnnotationsListCall) PageToken(pageToken string) *MylibraryAnnotationsListCall {
4039
c.opt_["pageToken"] = pageToken
4043
// ShowDeleted sets the optional parameter "showDeleted": Set to true to
4044
// return deleted annotations. updatedMin must be in the request to use
4045
// this. Defaults to false.
4046
func (c *MylibraryAnnotationsListCall) ShowDeleted(showDeleted bool) *MylibraryAnnotationsListCall {
4047
c.opt_["showDeleted"] = showDeleted
4051
// Source sets the optional parameter "source": String to identify the
4052
// originator of this request.
4053
func (c *MylibraryAnnotationsListCall) Source(source string) *MylibraryAnnotationsListCall {
4054
c.opt_["source"] = source
4058
// UpdatedMax sets the optional parameter "updatedMax": RFC 3339
4059
// timestamp to restrict to items updated prior to this timestamp
4061
func (c *MylibraryAnnotationsListCall) UpdatedMax(updatedMax string) *MylibraryAnnotationsListCall {
4062
c.opt_["updatedMax"] = updatedMax
4066
// UpdatedMin sets the optional parameter "updatedMin": RFC 3339
4067
// timestamp to restrict to items updated since this timestamp
4069
func (c *MylibraryAnnotationsListCall) UpdatedMin(updatedMin string) *MylibraryAnnotationsListCall {
4070
c.opt_["updatedMin"] = updatedMin
4074
// VolumeId sets the optional parameter "volumeId": The volume to
4075
// restrict annotations to.
4076
func (c *MylibraryAnnotationsListCall) VolumeId(volumeId string) *MylibraryAnnotationsListCall {
4077
c.opt_["volumeId"] = volumeId
4081
// Fields allows partial responses to be retrieved.
4082
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4083
// for more information.
4084
func (c *MylibraryAnnotationsListCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsListCall {
4085
c.opt_["fields"] = googleapi.CombineFields(s)
4089
func (c *MylibraryAnnotationsListCall) Do() (*Annotations, error) {
4090
var body io.Reader = nil
4091
params := make(url.Values)
4092
params.Set("alt", "json")
4093
if v, ok := c.opt_["contentVersion"]; ok {
4094
params.Set("contentVersion", fmt.Sprintf("%v", v))
4096
if v, ok := c.opt_["layerId"]; ok {
4097
params.Set("layerId", fmt.Sprintf("%v", v))
4099
if v, ok := c.opt_["layerIds"]; ok {
4100
params.Set("layerIds", fmt.Sprintf("%v", v))
4102
if v, ok := c.opt_["maxResults"]; ok {
4103
params.Set("maxResults", fmt.Sprintf("%v", v))
4105
if v, ok := c.opt_["pageIds"]; ok {
4106
params.Set("pageIds", fmt.Sprintf("%v", v))
4108
if v, ok := c.opt_["pageToken"]; ok {
4109
params.Set("pageToken", fmt.Sprintf("%v", v))
4111
if v, ok := c.opt_["showDeleted"]; ok {
4112
params.Set("showDeleted", fmt.Sprintf("%v", v))
4114
if v, ok := c.opt_["source"]; ok {
4115
params.Set("source", fmt.Sprintf("%v", v))
4117
if v, ok := c.opt_["updatedMax"]; ok {
4118
params.Set("updatedMax", fmt.Sprintf("%v", v))
4120
if v, ok := c.opt_["updatedMin"]; ok {
4121
params.Set("updatedMin", fmt.Sprintf("%v", v))
4123
if v, ok := c.opt_["volumeId"]; ok {
4124
params.Set("volumeId", fmt.Sprintf("%v", v))
4126
if v, ok := c.opt_["fields"]; ok {
4127
params.Set("fields", fmt.Sprintf("%v", v))
4129
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations")
4130
urls += "?" + params.Encode()
4131
req, _ := http.NewRequest("GET", urls, body)
4132
googleapi.SetOpaque(req.URL)
4133
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4134
res, err := c.s.client.Do(req)
4138
defer googleapi.CloseBody(res)
4139
if err := googleapi.CheckResponse(res); err != nil {
4142
var ret *Annotations
4143
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
4148
// "description": "Retrieves a list of annotations, possibly filtered.",
4149
// "httpMethod": "GET",
4150
// "id": "books.mylibrary.annotations.list",
4152
// "contentVersion": {
4153
// "description": "The content version for the requested volume.",
4154
// "location": "query",
4158
// "description": "The layer ID to limit annotation by.",
4159
// "location": "query",
4163
// "description": "The layer ID(s) to limit annotation by.",
4164
// "location": "query",
4165
// "repeated": true,
4169
// "description": "Maximum number of results to return",
4170
// "format": "uint32",
4171
// "location": "query",
4174
// "type": "integer"
4177
// "description": "The page ID(s) for the volume that is being queried.",
4178
// "location": "query",
4179
// "repeated": true,
4183
// "description": "The value of the nextToken from the previous page.",
4184
// "location": "query",
4188
// "description": "Set to true to return deleted annotations. updatedMin must be in the request to use this. Defaults to false.",
4189
// "location": "query",
4190
// "type": "boolean"
4193
// "description": "String to identify the originator of this request.",
4194
// "location": "query",
4198
// "description": "RFC 3339 timestamp to restrict to items updated prior to this timestamp (exclusive).",
4199
// "location": "query",
4203
// "description": "RFC 3339 timestamp to restrict to items updated since this timestamp (inclusive).",
4204
// "location": "query",
4208
// "description": "The volume to restrict annotations to.",
4209
// "location": "query",
4213
// "path": "mylibrary/annotations",
4215
// "$ref": "Annotations"
4218
// "https://www.googleapis.com/auth/books"
4224
// method id "books.mylibrary.annotations.summary":
4226
type MylibraryAnnotationsSummaryCall struct {
4230
opt_ map[string]interface{}
4233
// Summary: Gets the summary of specified layers.
4234
func (r *MylibraryAnnotationsService) Summary(layerIds []string, volumeId string) *MylibraryAnnotationsSummaryCall {
4235
c := &MylibraryAnnotationsSummaryCall{s: r.s, opt_: make(map[string]interface{})}
4236
c.layerIds = layerIds
4237
c.volumeId = volumeId
4241
// Fields allows partial responses to be retrieved.
4242
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4243
// for more information.
4244
func (c *MylibraryAnnotationsSummaryCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsSummaryCall {
4245
c.opt_["fields"] = googleapi.CombineFields(s)
4249
func (c *MylibraryAnnotationsSummaryCall) Do() (*AnnotationsSummary, error) {
4250
var body io.Reader = nil
4251
params := make(url.Values)
4252
params.Set("alt", "json")
4253
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
4254
for _, v := range c.layerIds {
4255
params.Add("layerIds", fmt.Sprintf("%v", v))
4257
if v, ok := c.opt_["fields"]; ok {
4258
params.Set("fields", fmt.Sprintf("%v", v))
4260
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/summary")
4261
urls += "?" + params.Encode()
4262
req, _ := http.NewRequest("POST", urls, body)
4263
googleapi.SetOpaque(req.URL)
4264
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4265
res, err := c.s.client.Do(req)
4269
defer googleapi.CloseBody(res)
4270
if err := googleapi.CheckResponse(res); err != nil {
4273
var ret *AnnotationsSummary
4274
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
4279
// "description": "Gets the summary of specified layers.",
4280
// "httpMethod": "POST",
4281
// "id": "books.mylibrary.annotations.summary",
4282
// "parameterOrder": [
4288
// "description": "Array of layer IDs to get the summary for.",
4289
// "location": "query",
4290
// "repeated": true,
4291
// "required": true,
4295
// "description": "Volume id to get the summary for.",
4296
// "location": "query",
4297
// "required": true,
4301
// "path": "mylibrary/annotations/summary",
4303
// "$ref": "AnnotationsSummary"
4306
// "https://www.googleapis.com/auth/books"
4312
// method id "books.mylibrary.annotations.update":
4314
type MylibraryAnnotationsUpdateCall struct {
4317
annotation *Annotation
4318
opt_ map[string]interface{}
4321
// Update: Updates an existing annotation.
4322
func (r *MylibraryAnnotationsService) Update(annotationId string, annotation *Annotation) *MylibraryAnnotationsUpdateCall {
4323
c := &MylibraryAnnotationsUpdateCall{s: r.s, opt_: make(map[string]interface{})}
4324
c.annotationId = annotationId
4325
c.annotation = annotation
4329
// Source sets the optional parameter "source": String to identify the
4330
// originator of this request.
4331
func (c *MylibraryAnnotationsUpdateCall) Source(source string) *MylibraryAnnotationsUpdateCall {
4332
c.opt_["source"] = source
4336
// Fields allows partial responses to be retrieved.
4337
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4338
// for more information.
4339
func (c *MylibraryAnnotationsUpdateCall) Fields(s ...googleapi.Field) *MylibraryAnnotationsUpdateCall {
4340
c.opt_["fields"] = googleapi.CombineFields(s)
4344
func (c *MylibraryAnnotationsUpdateCall) Do() (*Annotation, error) {
4345
var body io.Reader = nil
4346
body, err := googleapi.WithoutDataWrapper.JSONReader(c.annotation)
4350
ctype := "application/json"
4351
params := make(url.Values)
4352
params.Set("alt", "json")
4353
if v, ok := c.opt_["source"]; ok {
4354
params.Set("source", fmt.Sprintf("%v", v))
4356
if v, ok := c.opt_["fields"]; ok {
4357
params.Set("fields", fmt.Sprintf("%v", v))
4359
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/annotations/{annotationId}")
4360
urls += "?" + params.Encode()
4361
req, _ := http.NewRequest("PUT", urls, body)
4362
googleapi.Expand(req.URL, map[string]string{
4363
"annotationId": c.annotationId,
4365
req.Header.Set("Content-Type", ctype)
4366
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4367
res, err := c.s.client.Do(req)
4371
defer googleapi.CloseBody(res)
4372
if err := googleapi.CheckResponse(res); err != nil {
4376
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
4381
// "description": "Updates an existing annotation.",
4382
// "httpMethod": "PUT",
4383
// "id": "books.mylibrary.annotations.update",
4384
// "parameterOrder": [
4388
// "annotationId": {
4389
// "description": "The ID for the annotation to update.",
4390
// "location": "path",
4391
// "required": true,
4395
// "description": "String to identify the originator of this request.",
4396
// "location": "query",
4400
// "path": "mylibrary/annotations/{annotationId}",
4402
// "$ref": "Annotation"
4405
// "$ref": "Annotation"
4408
// "https://www.googleapis.com/auth/books"
4414
// method id "books.mylibrary.bookshelves.addVolume":
4416
type MylibraryBookshelvesAddVolumeCall struct {
4420
opt_ map[string]interface{}
4423
// AddVolume: Adds a volume to a bookshelf.
4424
func (r *MylibraryBookshelvesService) AddVolume(shelf string, volumeId string) *MylibraryBookshelvesAddVolumeCall {
4425
c := &MylibraryBookshelvesAddVolumeCall{s: r.s, opt_: make(map[string]interface{})}
4427
c.volumeId = volumeId
4431
// Source sets the optional parameter "source": String to identify the
4432
// originator of this request.
4433
func (c *MylibraryBookshelvesAddVolumeCall) Source(source string) *MylibraryBookshelvesAddVolumeCall {
4434
c.opt_["source"] = source
4438
// Fields allows partial responses to be retrieved.
4439
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4440
// for more information.
4441
func (c *MylibraryBookshelvesAddVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesAddVolumeCall {
4442
c.opt_["fields"] = googleapi.CombineFields(s)
4446
func (c *MylibraryBookshelvesAddVolumeCall) Do() error {
4447
var body io.Reader = nil
4448
params := make(url.Values)
4449
params.Set("alt", "json")
4450
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
4451
if v, ok := c.opt_["source"]; ok {
4452
params.Set("source", fmt.Sprintf("%v", v))
4454
if v, ok := c.opt_["fields"]; ok {
4455
params.Set("fields", fmt.Sprintf("%v", v))
4457
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/addVolume")
4458
urls += "?" + params.Encode()
4459
req, _ := http.NewRequest("POST", urls, body)
4460
googleapi.Expand(req.URL, map[string]string{
4463
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4464
res, err := c.s.client.Do(req)
4468
defer googleapi.CloseBody(res)
4469
if err := googleapi.CheckResponse(res); err != nil {
4474
// "description": "Adds a volume to a bookshelf.",
4475
// "httpMethod": "POST",
4476
// "id": "books.mylibrary.bookshelves.addVolume",
4477
// "parameterOrder": [
4483
// "description": "ID of bookshelf to which to add a volume.",
4484
// "location": "path",
4485
// "required": true,
4489
// "description": "String to identify the originator of this request.",
4490
// "location": "query",
4494
// "description": "ID of volume to add.",
4495
// "location": "query",
4496
// "required": true,
4500
// "path": "mylibrary/bookshelves/{shelf}/addVolume",
4502
// "https://www.googleapis.com/auth/books"
4508
// method id "books.mylibrary.bookshelves.clearVolumes":
4510
type MylibraryBookshelvesClearVolumesCall struct {
4513
opt_ map[string]interface{}
4516
// ClearVolumes: Clears all volumes from a bookshelf.
4517
func (r *MylibraryBookshelvesService) ClearVolumes(shelf string) *MylibraryBookshelvesClearVolumesCall {
4518
c := &MylibraryBookshelvesClearVolumesCall{s: r.s, opt_: make(map[string]interface{})}
4523
// Source sets the optional parameter "source": String to identify the
4524
// originator of this request.
4525
func (c *MylibraryBookshelvesClearVolumesCall) Source(source string) *MylibraryBookshelvesClearVolumesCall {
4526
c.opt_["source"] = source
4530
// Fields allows partial responses to be retrieved.
4531
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4532
// for more information.
4533
func (c *MylibraryBookshelvesClearVolumesCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesClearVolumesCall {
4534
c.opt_["fields"] = googleapi.CombineFields(s)
4538
func (c *MylibraryBookshelvesClearVolumesCall) Do() error {
4539
var body io.Reader = nil
4540
params := make(url.Values)
4541
params.Set("alt", "json")
4542
if v, ok := c.opt_["source"]; ok {
4543
params.Set("source", fmt.Sprintf("%v", v))
4545
if v, ok := c.opt_["fields"]; ok {
4546
params.Set("fields", fmt.Sprintf("%v", v))
4548
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/clearVolumes")
4549
urls += "?" + params.Encode()
4550
req, _ := http.NewRequest("POST", urls, body)
4551
googleapi.Expand(req.URL, map[string]string{
4554
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4555
res, err := c.s.client.Do(req)
4559
defer googleapi.CloseBody(res)
4560
if err := googleapi.CheckResponse(res); err != nil {
4565
// "description": "Clears all volumes from a bookshelf.",
4566
// "httpMethod": "POST",
4567
// "id": "books.mylibrary.bookshelves.clearVolumes",
4568
// "parameterOrder": [
4573
// "description": "ID of bookshelf from which to remove a volume.",
4574
// "location": "path",
4575
// "required": true,
4579
// "description": "String to identify the originator of this request.",
4580
// "location": "query",
4584
// "path": "mylibrary/bookshelves/{shelf}/clearVolumes",
4586
// "https://www.googleapis.com/auth/books"
4592
// method id "books.mylibrary.bookshelves.get":
4594
type MylibraryBookshelvesGetCall struct {
4597
opt_ map[string]interface{}
4600
// Get: Retrieves metadata for a specific bookshelf belonging to the
4601
// authenticated user.
4602
func (r *MylibraryBookshelvesService) Get(shelf string) *MylibraryBookshelvesGetCall {
4603
c := &MylibraryBookshelvesGetCall{s: r.s, opt_: make(map[string]interface{})}
4608
// Source sets the optional parameter "source": String to identify the
4609
// originator of this request.
4610
func (c *MylibraryBookshelvesGetCall) Source(source string) *MylibraryBookshelvesGetCall {
4611
c.opt_["source"] = source
4615
// Fields allows partial responses to be retrieved.
4616
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4617
// for more information.
4618
func (c *MylibraryBookshelvesGetCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesGetCall {
4619
c.opt_["fields"] = googleapi.CombineFields(s)
4623
func (c *MylibraryBookshelvesGetCall) Do() (*Bookshelf, error) {
4624
var body io.Reader = nil
4625
params := make(url.Values)
4626
params.Set("alt", "json")
4627
if v, ok := c.opt_["source"]; ok {
4628
params.Set("source", fmt.Sprintf("%v", v))
4630
if v, ok := c.opt_["fields"]; ok {
4631
params.Set("fields", fmt.Sprintf("%v", v))
4633
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}")
4634
urls += "?" + params.Encode()
4635
req, _ := http.NewRequest("GET", urls, body)
4636
googleapi.Expand(req.URL, map[string]string{
4639
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4640
res, err := c.s.client.Do(req)
4644
defer googleapi.CloseBody(res)
4645
if err := googleapi.CheckResponse(res); err != nil {
4649
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
4654
// "description": "Retrieves metadata for a specific bookshelf belonging to the authenticated user.",
4655
// "httpMethod": "GET",
4656
// "id": "books.mylibrary.bookshelves.get",
4657
// "parameterOrder": [
4662
// "description": "ID of bookshelf to retrieve.",
4663
// "location": "path",
4664
// "required": true,
4668
// "description": "String to identify the originator of this request.",
4669
// "location": "query",
4673
// "path": "mylibrary/bookshelves/{shelf}",
4675
// "$ref": "Bookshelf"
4678
// "https://www.googleapis.com/auth/books"
4684
// method id "books.mylibrary.bookshelves.list":
4686
type MylibraryBookshelvesListCall struct {
4688
opt_ map[string]interface{}
4691
// List: Retrieves a list of bookshelves belonging to the authenticated
4693
func (r *MylibraryBookshelvesService) List() *MylibraryBookshelvesListCall {
4694
c := &MylibraryBookshelvesListCall{s: r.s, opt_: make(map[string]interface{})}
4698
// Source sets the optional parameter "source": String to identify the
4699
// originator of this request.
4700
func (c *MylibraryBookshelvesListCall) Source(source string) *MylibraryBookshelvesListCall {
4701
c.opt_["source"] = source
4705
// Fields allows partial responses to be retrieved.
4706
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4707
// for more information.
4708
func (c *MylibraryBookshelvesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesListCall {
4709
c.opt_["fields"] = googleapi.CombineFields(s)
4713
func (c *MylibraryBookshelvesListCall) Do() (*Bookshelves, error) {
4714
var body io.Reader = nil
4715
params := make(url.Values)
4716
params.Set("alt", "json")
4717
if v, ok := c.opt_["source"]; ok {
4718
params.Set("source", fmt.Sprintf("%v", v))
4720
if v, ok := c.opt_["fields"]; ok {
4721
params.Set("fields", fmt.Sprintf("%v", v))
4723
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves")
4724
urls += "?" + params.Encode()
4725
req, _ := http.NewRequest("GET", urls, body)
4726
googleapi.SetOpaque(req.URL)
4727
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4728
res, err := c.s.client.Do(req)
4732
defer googleapi.CloseBody(res)
4733
if err := googleapi.CheckResponse(res); err != nil {
4736
var ret *Bookshelves
4737
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
4742
// "description": "Retrieves a list of bookshelves belonging to the authenticated user.",
4743
// "httpMethod": "GET",
4744
// "id": "books.mylibrary.bookshelves.list",
4747
// "description": "String to identify the originator of this request.",
4748
// "location": "query",
4752
// "path": "mylibrary/bookshelves",
4754
// "$ref": "Bookshelves"
4757
// "https://www.googleapis.com/auth/books"
4763
// method id "books.mylibrary.bookshelves.moveVolume":
4765
type MylibraryBookshelvesMoveVolumeCall struct {
4769
volumePosition int64
4770
opt_ map[string]interface{}
4773
// MoveVolume: Moves a volume within a bookshelf.
4774
func (r *MylibraryBookshelvesService) MoveVolume(shelf string, volumeId string, volumePosition int64) *MylibraryBookshelvesMoveVolumeCall {
4775
c := &MylibraryBookshelvesMoveVolumeCall{s: r.s, opt_: make(map[string]interface{})}
4777
c.volumeId = volumeId
4778
c.volumePosition = volumePosition
4782
// Source sets the optional parameter "source": String to identify the
4783
// originator of this request.
4784
func (c *MylibraryBookshelvesMoveVolumeCall) Source(source string) *MylibraryBookshelvesMoveVolumeCall {
4785
c.opt_["source"] = source
4789
// Fields allows partial responses to be retrieved.
4790
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4791
// for more information.
4792
func (c *MylibraryBookshelvesMoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesMoveVolumeCall {
4793
c.opt_["fields"] = googleapi.CombineFields(s)
4797
func (c *MylibraryBookshelvesMoveVolumeCall) Do() error {
4798
var body io.Reader = nil
4799
params := make(url.Values)
4800
params.Set("alt", "json")
4801
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
4802
params.Set("volumePosition", fmt.Sprintf("%v", c.volumePosition))
4803
if v, ok := c.opt_["source"]; ok {
4804
params.Set("source", fmt.Sprintf("%v", v))
4806
if v, ok := c.opt_["fields"]; ok {
4807
params.Set("fields", fmt.Sprintf("%v", v))
4809
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/moveVolume")
4810
urls += "?" + params.Encode()
4811
req, _ := http.NewRequest("POST", urls, body)
4812
googleapi.Expand(req.URL, map[string]string{
4815
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4816
res, err := c.s.client.Do(req)
4820
defer googleapi.CloseBody(res)
4821
if err := googleapi.CheckResponse(res); err != nil {
4826
// "description": "Moves a volume within a bookshelf.",
4827
// "httpMethod": "POST",
4828
// "id": "books.mylibrary.bookshelves.moveVolume",
4829
// "parameterOrder": [
4836
// "description": "ID of bookshelf with the volume.",
4837
// "location": "path",
4838
// "required": true,
4842
// "description": "String to identify the originator of this request.",
4843
// "location": "query",
4847
// "description": "ID of volume to move.",
4848
// "location": "query",
4849
// "required": true,
4852
// "volumePosition": {
4853
// "description": "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.)",
4854
// "format": "int32",
4855
// "location": "query",
4856
// "required": true,
4857
// "type": "integer"
4860
// "path": "mylibrary/bookshelves/{shelf}/moveVolume",
4862
// "https://www.googleapis.com/auth/books"
4868
// method id "books.mylibrary.bookshelves.removeVolume":
4870
type MylibraryBookshelvesRemoveVolumeCall struct {
4874
opt_ map[string]interface{}
4877
// RemoveVolume: Removes a volume from a bookshelf.
4878
func (r *MylibraryBookshelvesService) RemoveVolume(shelf string, volumeId string) *MylibraryBookshelvesRemoveVolumeCall {
4879
c := &MylibraryBookshelvesRemoveVolumeCall{s: r.s, opt_: make(map[string]interface{})}
4881
c.volumeId = volumeId
4885
// Source sets the optional parameter "source": String to identify the
4886
// originator of this request.
4887
func (c *MylibraryBookshelvesRemoveVolumeCall) Source(source string) *MylibraryBookshelvesRemoveVolumeCall {
4888
c.opt_["source"] = source
4892
// Fields allows partial responses to be retrieved.
4893
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4894
// for more information.
4895
func (c *MylibraryBookshelvesRemoveVolumeCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesRemoveVolumeCall {
4896
c.opt_["fields"] = googleapi.CombineFields(s)
4900
func (c *MylibraryBookshelvesRemoveVolumeCall) Do() error {
4901
var body io.Reader = nil
4902
params := make(url.Values)
4903
params.Set("alt", "json")
4904
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
4905
if v, ok := c.opt_["source"]; ok {
4906
params.Set("source", fmt.Sprintf("%v", v))
4908
if v, ok := c.opt_["fields"]; ok {
4909
params.Set("fields", fmt.Sprintf("%v", v))
4911
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/removeVolume")
4912
urls += "?" + params.Encode()
4913
req, _ := http.NewRequest("POST", urls, body)
4914
googleapi.Expand(req.URL, map[string]string{
4917
req.Header.Set("User-Agent", "google-api-go-client/0.5")
4918
res, err := c.s.client.Do(req)
4922
defer googleapi.CloseBody(res)
4923
if err := googleapi.CheckResponse(res); err != nil {
4928
// "description": "Removes a volume from a bookshelf.",
4929
// "httpMethod": "POST",
4930
// "id": "books.mylibrary.bookshelves.removeVolume",
4931
// "parameterOrder": [
4937
// "description": "ID of bookshelf from which to remove a volume.",
4938
// "location": "path",
4939
// "required": true,
4943
// "description": "String to identify the originator of this request.",
4944
// "location": "query",
4948
// "description": "ID of volume to remove.",
4949
// "location": "query",
4950
// "required": true,
4954
// "path": "mylibrary/bookshelves/{shelf}/removeVolume",
4956
// "https://www.googleapis.com/auth/books"
4962
// method id "books.mylibrary.bookshelves.volumes.list":
4964
type MylibraryBookshelvesVolumesListCall struct {
4967
opt_ map[string]interface{}
4970
// List: Gets volume information for volumes on a bookshelf.
4971
func (r *MylibraryBookshelvesVolumesService) List(shelf string) *MylibraryBookshelvesVolumesListCall {
4972
c := &MylibraryBookshelvesVolumesListCall{s: r.s, opt_: make(map[string]interface{})}
4977
// Country sets the optional parameter "country": ISO-3166-1 code to
4978
// override the IP-based location.
4979
func (c *MylibraryBookshelvesVolumesListCall) Country(country string) *MylibraryBookshelvesVolumesListCall {
4980
c.opt_["country"] = country
4984
// MaxResults sets the optional parameter "maxResults": Maximum number
4985
// of results to return
4986
func (c *MylibraryBookshelvesVolumesListCall) MaxResults(maxResults int64) *MylibraryBookshelvesVolumesListCall {
4987
c.opt_["maxResults"] = maxResults
4991
// Projection sets the optional parameter "projection": Restrict
4992
// information returned to a set of selected fields.
4993
func (c *MylibraryBookshelvesVolumesListCall) Projection(projection string) *MylibraryBookshelvesVolumesListCall {
4994
c.opt_["projection"] = projection
4998
// Q sets the optional parameter "q": Full-text search query string in
5000
func (c *MylibraryBookshelvesVolumesListCall) Q(q string) *MylibraryBookshelvesVolumesListCall {
5005
// ShowPreorders sets the optional parameter "showPreorders": Set to
5006
// true to show pre-ordered books. Defaults to false.
5007
func (c *MylibraryBookshelvesVolumesListCall) ShowPreorders(showPreorders bool) *MylibraryBookshelvesVolumesListCall {
5008
c.opt_["showPreorders"] = showPreorders
5012
// Source sets the optional parameter "source": String to identify the
5013
// originator of this request.
5014
func (c *MylibraryBookshelvesVolumesListCall) Source(source string) *MylibraryBookshelvesVolumesListCall {
5015
c.opt_["source"] = source
5019
// StartIndex sets the optional parameter "startIndex": Index of the
5020
// first element to return (starts at 0)
5021
func (c *MylibraryBookshelvesVolumesListCall) StartIndex(startIndex int64) *MylibraryBookshelvesVolumesListCall {
5022
c.opt_["startIndex"] = startIndex
5026
// Fields allows partial responses to be retrieved.
5027
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5028
// for more information.
5029
func (c *MylibraryBookshelvesVolumesListCall) Fields(s ...googleapi.Field) *MylibraryBookshelvesVolumesListCall {
5030
c.opt_["fields"] = googleapi.CombineFields(s)
5034
func (c *MylibraryBookshelvesVolumesListCall) Do() (*Volumes, error) {
5035
var body io.Reader = nil
5036
params := make(url.Values)
5037
params.Set("alt", "json")
5038
if v, ok := c.opt_["country"]; ok {
5039
params.Set("country", fmt.Sprintf("%v", v))
5041
if v, ok := c.opt_["maxResults"]; ok {
5042
params.Set("maxResults", fmt.Sprintf("%v", v))
5044
if v, ok := c.opt_["projection"]; ok {
5045
params.Set("projection", fmt.Sprintf("%v", v))
5047
if v, ok := c.opt_["q"]; ok {
5048
params.Set("q", fmt.Sprintf("%v", v))
5050
if v, ok := c.opt_["showPreorders"]; ok {
5051
params.Set("showPreorders", fmt.Sprintf("%v", v))
5053
if v, ok := c.opt_["source"]; ok {
5054
params.Set("source", fmt.Sprintf("%v", v))
5056
if v, ok := c.opt_["startIndex"]; ok {
5057
params.Set("startIndex", fmt.Sprintf("%v", v))
5059
if v, ok := c.opt_["fields"]; ok {
5060
params.Set("fields", fmt.Sprintf("%v", v))
5062
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/bookshelves/{shelf}/volumes")
5063
urls += "?" + params.Encode()
5064
req, _ := http.NewRequest("GET", urls, body)
5065
googleapi.Expand(req.URL, map[string]string{
5068
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5069
res, err := c.s.client.Do(req)
5073
defer googleapi.CloseBody(res)
5074
if err := googleapi.CheckResponse(res); err != nil {
5078
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
5083
// "description": "Gets volume information for volumes on a bookshelf.",
5084
// "httpMethod": "GET",
5085
// "id": "books.mylibrary.bookshelves.volumes.list",
5086
// "parameterOrder": [
5091
// "description": "ISO-3166-1 code to override the IP-based location.",
5092
// "location": "query",
5096
// "description": "Maximum number of results to return",
5097
// "format": "uint32",
5098
// "location": "query",
5100
// "type": "integer"
5103
// "description": "Restrict information returned to a set of selected fields.",
5108
// "enumDescriptions": [
5109
// "Includes all volume data.",
5110
// "Includes a subset of fields in volumeInfo and accessInfo."
5112
// "location": "query",
5116
// "description": "Full-text search query string in this bookshelf.",
5117
// "location": "query",
5121
// "description": "The bookshelf ID or name retrieve volumes for.",
5122
// "location": "path",
5123
// "required": true,
5126
// "showPreorders": {
5127
// "description": "Set to true to show pre-ordered books. Defaults to false.",
5128
// "location": "query",
5129
// "type": "boolean"
5132
// "description": "String to identify the originator of this request.",
5133
// "location": "query",
5137
// "description": "Index of the first element to return (starts at 0)",
5138
// "format": "uint32",
5139
// "location": "query",
5141
// "type": "integer"
5144
// "path": "mylibrary/bookshelves/{shelf}/volumes",
5146
// "$ref": "Volumes"
5149
// "https://www.googleapis.com/auth/books"
5155
// method id "books.mylibrary.readingpositions.get":
5157
type MylibraryReadingpositionsGetCall struct {
5160
opt_ map[string]interface{}
5163
// Get: Retrieves my reading position information for a volume.
5164
func (r *MylibraryReadingpositionsService) Get(volumeId string) *MylibraryReadingpositionsGetCall {
5165
c := &MylibraryReadingpositionsGetCall{s: r.s, opt_: make(map[string]interface{})}
5166
c.volumeId = volumeId
5170
// ContentVersion sets the optional parameter "contentVersion": Volume
5171
// content version for which this reading position is requested.
5172
func (c *MylibraryReadingpositionsGetCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsGetCall {
5173
c.opt_["contentVersion"] = contentVersion
5177
// Source sets the optional parameter "source": String to identify the
5178
// originator of this request.
5179
func (c *MylibraryReadingpositionsGetCall) Source(source string) *MylibraryReadingpositionsGetCall {
5180
c.opt_["source"] = source
5184
// Fields allows partial responses to be retrieved.
5185
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5186
// for more information.
5187
func (c *MylibraryReadingpositionsGetCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsGetCall {
5188
c.opt_["fields"] = googleapi.CombineFields(s)
5192
func (c *MylibraryReadingpositionsGetCall) Do() (*ReadingPosition, error) {
5193
var body io.Reader = nil
5194
params := make(url.Values)
5195
params.Set("alt", "json")
5196
if v, ok := c.opt_["contentVersion"]; ok {
5197
params.Set("contentVersion", fmt.Sprintf("%v", v))
5199
if v, ok := c.opt_["source"]; ok {
5200
params.Set("source", fmt.Sprintf("%v", v))
5202
if v, ok := c.opt_["fields"]; ok {
5203
params.Set("fields", fmt.Sprintf("%v", v))
5205
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}")
5206
urls += "?" + params.Encode()
5207
req, _ := http.NewRequest("GET", urls, body)
5208
googleapi.Expand(req.URL, map[string]string{
5209
"volumeId": c.volumeId,
5211
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5212
res, err := c.s.client.Do(req)
5216
defer googleapi.CloseBody(res)
5217
if err := googleapi.CheckResponse(res); err != nil {
5220
var ret *ReadingPosition
5221
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
5226
// "description": "Retrieves my reading position information for a volume.",
5227
// "httpMethod": "GET",
5228
// "id": "books.mylibrary.readingpositions.get",
5229
// "parameterOrder": [
5233
// "contentVersion": {
5234
// "description": "Volume content version for which this reading position is requested.",
5235
// "location": "query",
5239
// "description": "String to identify the originator of this request.",
5240
// "location": "query",
5244
// "description": "ID of volume for which to retrieve a reading position.",
5245
// "location": "path",
5246
// "required": true,
5250
// "path": "mylibrary/readingpositions/{volumeId}",
5252
// "$ref": "ReadingPosition"
5255
// "https://www.googleapis.com/auth/books"
5261
// method id "books.mylibrary.readingpositions.setPosition":
5263
type MylibraryReadingpositionsSetPositionCall struct {
5268
opt_ map[string]interface{}
5271
// SetPosition: Sets my reading position information for a volume.
5272
func (r *MylibraryReadingpositionsService) SetPosition(volumeId string, timestamp string, position string) *MylibraryReadingpositionsSetPositionCall {
5273
c := &MylibraryReadingpositionsSetPositionCall{s: r.s, opt_: make(map[string]interface{})}
5274
c.volumeId = volumeId
5275
c.timestamp = timestamp
5276
c.position = position
5280
// Action sets the optional parameter "action": Action that caused this
5281
// reading position to be set.
5282
func (c *MylibraryReadingpositionsSetPositionCall) Action(action string) *MylibraryReadingpositionsSetPositionCall {
5283
c.opt_["action"] = action
5287
// ContentVersion sets the optional parameter "contentVersion": Volume
5288
// content version for which this reading position applies.
5289
func (c *MylibraryReadingpositionsSetPositionCall) ContentVersion(contentVersion string) *MylibraryReadingpositionsSetPositionCall {
5290
c.opt_["contentVersion"] = contentVersion
5294
// DeviceCookie sets the optional parameter "deviceCookie": Random
5295
// persistent device cookie optional on set position.
5296
func (c *MylibraryReadingpositionsSetPositionCall) DeviceCookie(deviceCookie string) *MylibraryReadingpositionsSetPositionCall {
5297
c.opt_["deviceCookie"] = deviceCookie
5301
// Source sets the optional parameter "source": String to identify the
5302
// originator of this request.
5303
func (c *MylibraryReadingpositionsSetPositionCall) Source(source string) *MylibraryReadingpositionsSetPositionCall {
5304
c.opt_["source"] = source
5308
// Fields allows partial responses to be retrieved.
5309
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5310
// for more information.
5311
func (c *MylibraryReadingpositionsSetPositionCall) Fields(s ...googleapi.Field) *MylibraryReadingpositionsSetPositionCall {
5312
c.opt_["fields"] = googleapi.CombineFields(s)
5316
func (c *MylibraryReadingpositionsSetPositionCall) Do() error {
5317
var body io.Reader = nil
5318
params := make(url.Values)
5319
params.Set("alt", "json")
5320
params.Set("position", fmt.Sprintf("%v", c.position))
5321
params.Set("timestamp", fmt.Sprintf("%v", c.timestamp))
5322
if v, ok := c.opt_["action"]; ok {
5323
params.Set("action", fmt.Sprintf("%v", v))
5325
if v, ok := c.opt_["contentVersion"]; ok {
5326
params.Set("contentVersion", fmt.Sprintf("%v", v))
5328
if v, ok := c.opt_["deviceCookie"]; ok {
5329
params.Set("deviceCookie", fmt.Sprintf("%v", v))
5331
if v, ok := c.opt_["source"]; ok {
5332
params.Set("source", fmt.Sprintf("%v", v))
5334
if v, ok := c.opt_["fields"]; ok {
5335
params.Set("fields", fmt.Sprintf("%v", v))
5337
urls := googleapi.ResolveRelative(c.s.BasePath, "mylibrary/readingpositions/{volumeId}/setPosition")
5338
urls += "?" + params.Encode()
5339
req, _ := http.NewRequest("POST", urls, body)
5340
googleapi.Expand(req.URL, map[string]string{
5341
"volumeId": c.volumeId,
5343
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5344
res, err := c.s.client.Do(req)
5348
defer googleapi.CloseBody(res)
5349
if err := googleapi.CheckResponse(res); err != nil {
5354
// "description": "Sets my reading position information for a volume.",
5355
// "httpMethod": "POST",
5356
// "id": "books.mylibrary.readingpositions.setPosition",
5357
// "parameterOrder": [
5364
// "description": "Action that caused this reading position to be set.",
5373
// "enumDescriptions": [
5374
// "User chose bookmark within volume.",
5375
// "User selected chapter from list.",
5376
// "Next page event.",
5377
// "Previous page event.",
5378
// "User navigated to page.",
5379
// "User chose search results within volume."
5381
// "location": "query",
5384
// "contentVersion": {
5385
// "description": "Volume content version for which this reading position applies.",
5386
// "location": "query",
5389
// "deviceCookie": {
5390
// "description": "Random persistent device cookie optional on set position.",
5391
// "location": "query",
5395
// "description": "Position string for the new volume reading position.",
5396
// "location": "query",
5397
// "required": true,
5401
// "description": "String to identify the originator of this request.",
5402
// "location": "query",
5406
// "description": "RFC 3339 UTC format timestamp associated with this reading position.",
5407
// "location": "query",
5408
// "required": true,
5412
// "description": "ID of volume for which to update the reading position.",
5413
// "location": "path",
5414
// "required": true,
5418
// "path": "mylibrary/readingpositions/{volumeId}/setPosition",
5420
// "https://www.googleapis.com/auth/books"
5426
// method id "books.promooffer.accept":
5428
type PromoofferAcceptCall struct {
5430
opt_ map[string]interface{}
5434
func (r *PromoofferService) Accept() *PromoofferAcceptCall {
5435
c := &PromoofferAcceptCall{s: r.s, opt_: make(map[string]interface{})}
5439
// AndroidId sets the optional parameter "androidId": device android_id
5440
func (c *PromoofferAcceptCall) AndroidId(androidId string) *PromoofferAcceptCall {
5441
c.opt_["androidId"] = androidId
5445
// Device sets the optional parameter "device": device device
5446
func (c *PromoofferAcceptCall) Device(device string) *PromoofferAcceptCall {
5447
c.opt_["device"] = device
5451
// Manufacturer sets the optional parameter "manufacturer": device
5453
func (c *PromoofferAcceptCall) Manufacturer(manufacturer string) *PromoofferAcceptCall {
5454
c.opt_["manufacturer"] = manufacturer
5458
// Model sets the optional parameter "model": device model
5459
func (c *PromoofferAcceptCall) Model(model string) *PromoofferAcceptCall {
5460
c.opt_["model"] = model
5464
// OfferId sets the optional parameter "offerId":
5465
func (c *PromoofferAcceptCall) OfferId(offerId string) *PromoofferAcceptCall {
5466
c.opt_["offerId"] = offerId
5470
// Product sets the optional parameter "product": device product
5471
func (c *PromoofferAcceptCall) Product(product string) *PromoofferAcceptCall {
5472
c.opt_["product"] = product
5476
// Serial sets the optional parameter "serial": device serial
5477
func (c *PromoofferAcceptCall) Serial(serial string) *PromoofferAcceptCall {
5478
c.opt_["serial"] = serial
5482
// VolumeId sets the optional parameter "volumeId": Volume id to
5483
// exercise the offer
5484
func (c *PromoofferAcceptCall) VolumeId(volumeId string) *PromoofferAcceptCall {
5485
c.opt_["volumeId"] = volumeId
5489
// Fields allows partial responses to be retrieved.
5490
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5491
// for more information.
5492
func (c *PromoofferAcceptCall) Fields(s ...googleapi.Field) *PromoofferAcceptCall {
5493
c.opt_["fields"] = googleapi.CombineFields(s)
5497
func (c *PromoofferAcceptCall) Do() error {
5498
var body io.Reader = nil
5499
params := make(url.Values)
5500
params.Set("alt", "json")
5501
if v, ok := c.opt_["androidId"]; ok {
5502
params.Set("androidId", fmt.Sprintf("%v", v))
5504
if v, ok := c.opt_["device"]; ok {
5505
params.Set("device", fmt.Sprintf("%v", v))
5507
if v, ok := c.opt_["manufacturer"]; ok {
5508
params.Set("manufacturer", fmt.Sprintf("%v", v))
5510
if v, ok := c.opt_["model"]; ok {
5511
params.Set("model", fmt.Sprintf("%v", v))
5513
if v, ok := c.opt_["offerId"]; ok {
5514
params.Set("offerId", fmt.Sprintf("%v", v))
5516
if v, ok := c.opt_["product"]; ok {
5517
params.Set("product", fmt.Sprintf("%v", v))
5519
if v, ok := c.opt_["serial"]; ok {
5520
params.Set("serial", fmt.Sprintf("%v", v))
5522
if v, ok := c.opt_["volumeId"]; ok {
5523
params.Set("volumeId", fmt.Sprintf("%v", v))
5525
if v, ok := c.opt_["fields"]; ok {
5526
params.Set("fields", fmt.Sprintf("%v", v))
5528
urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/accept")
5529
urls += "?" + params.Encode()
5530
req, _ := http.NewRequest("POST", urls, body)
5531
googleapi.SetOpaque(req.URL)
5532
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5533
res, err := c.s.client.Do(req)
5537
defer googleapi.CloseBody(res)
5538
if err := googleapi.CheckResponse(res); err != nil {
5543
// "description": "",
5544
// "httpMethod": "POST",
5545
// "id": "books.promooffer.accept",
5548
// "description": "device android_id",
5549
// "location": "query",
5553
// "description": "device device",
5554
// "location": "query",
5557
// "manufacturer": {
5558
// "description": "device manufacturer",
5559
// "location": "query",
5563
// "description": "device model",
5564
// "location": "query",
5568
// "location": "query",
5572
// "description": "device product",
5573
// "location": "query",
5577
// "description": "device serial",
5578
// "location": "query",
5582
// "description": "Volume id to exercise the offer",
5583
// "location": "query",
5587
// "path": "promooffer/accept",
5589
// "https://www.googleapis.com/auth/books"
5595
// method id "books.promooffer.dismiss":
5597
type PromoofferDismissCall struct {
5599
opt_ map[string]interface{}
5603
func (r *PromoofferService) Dismiss() *PromoofferDismissCall {
5604
c := &PromoofferDismissCall{s: r.s, opt_: make(map[string]interface{})}
5608
// AndroidId sets the optional parameter "androidId": device android_id
5609
func (c *PromoofferDismissCall) AndroidId(androidId string) *PromoofferDismissCall {
5610
c.opt_["androidId"] = androidId
5614
// Device sets the optional parameter "device": device device
5615
func (c *PromoofferDismissCall) Device(device string) *PromoofferDismissCall {
5616
c.opt_["device"] = device
5620
// Manufacturer sets the optional parameter "manufacturer": device
5622
func (c *PromoofferDismissCall) Manufacturer(manufacturer string) *PromoofferDismissCall {
5623
c.opt_["manufacturer"] = manufacturer
5627
// Model sets the optional parameter "model": device model
5628
func (c *PromoofferDismissCall) Model(model string) *PromoofferDismissCall {
5629
c.opt_["model"] = model
5633
// OfferId sets the optional parameter "offerId": Offer to dimiss
5634
func (c *PromoofferDismissCall) OfferId(offerId string) *PromoofferDismissCall {
5635
c.opt_["offerId"] = offerId
5639
// Product sets the optional parameter "product": device product
5640
func (c *PromoofferDismissCall) Product(product string) *PromoofferDismissCall {
5641
c.opt_["product"] = product
5645
// Serial sets the optional parameter "serial": device serial
5646
func (c *PromoofferDismissCall) Serial(serial string) *PromoofferDismissCall {
5647
c.opt_["serial"] = serial
5651
// Fields allows partial responses to be retrieved.
5652
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5653
// for more information.
5654
func (c *PromoofferDismissCall) Fields(s ...googleapi.Field) *PromoofferDismissCall {
5655
c.opt_["fields"] = googleapi.CombineFields(s)
5659
func (c *PromoofferDismissCall) Do() error {
5660
var body io.Reader = nil
5661
params := make(url.Values)
5662
params.Set("alt", "json")
5663
if v, ok := c.opt_["androidId"]; ok {
5664
params.Set("androidId", fmt.Sprintf("%v", v))
5666
if v, ok := c.opt_["device"]; ok {
5667
params.Set("device", fmt.Sprintf("%v", v))
5669
if v, ok := c.opt_["manufacturer"]; ok {
5670
params.Set("manufacturer", fmt.Sprintf("%v", v))
5672
if v, ok := c.opt_["model"]; ok {
5673
params.Set("model", fmt.Sprintf("%v", v))
5675
if v, ok := c.opt_["offerId"]; ok {
5676
params.Set("offerId", fmt.Sprintf("%v", v))
5678
if v, ok := c.opt_["product"]; ok {
5679
params.Set("product", fmt.Sprintf("%v", v))
5681
if v, ok := c.opt_["serial"]; ok {
5682
params.Set("serial", fmt.Sprintf("%v", v))
5684
if v, ok := c.opt_["fields"]; ok {
5685
params.Set("fields", fmt.Sprintf("%v", v))
5687
urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/dismiss")
5688
urls += "?" + params.Encode()
5689
req, _ := http.NewRequest("POST", urls, body)
5690
googleapi.SetOpaque(req.URL)
5691
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5692
res, err := c.s.client.Do(req)
5696
defer googleapi.CloseBody(res)
5697
if err := googleapi.CheckResponse(res); err != nil {
5702
// "description": "",
5703
// "httpMethod": "POST",
5704
// "id": "books.promooffer.dismiss",
5707
// "description": "device android_id",
5708
// "location": "query",
5712
// "description": "device device",
5713
// "location": "query",
5716
// "manufacturer": {
5717
// "description": "device manufacturer",
5718
// "location": "query",
5722
// "description": "device model",
5723
// "location": "query",
5727
// "description": "Offer to dimiss",
5728
// "location": "query",
5732
// "description": "device product",
5733
// "location": "query",
5737
// "description": "device serial",
5738
// "location": "query",
5742
// "path": "promooffer/dismiss",
5744
// "https://www.googleapis.com/auth/books"
5750
// method id "books.promooffer.get":
5752
type PromoofferGetCall struct {
5754
opt_ map[string]interface{}
5757
// Get: Returns a list of promo offers available to the user
5758
func (r *PromoofferService) Get() *PromoofferGetCall {
5759
c := &PromoofferGetCall{s: r.s, opt_: make(map[string]interface{})}
5763
// AndroidId sets the optional parameter "androidId": device android_id
5764
func (c *PromoofferGetCall) AndroidId(androidId string) *PromoofferGetCall {
5765
c.opt_["androidId"] = androidId
5769
// Device sets the optional parameter "device": device device
5770
func (c *PromoofferGetCall) Device(device string) *PromoofferGetCall {
5771
c.opt_["device"] = device
5775
// Manufacturer sets the optional parameter "manufacturer": device
5777
func (c *PromoofferGetCall) Manufacturer(manufacturer string) *PromoofferGetCall {
5778
c.opt_["manufacturer"] = manufacturer
5782
// Model sets the optional parameter "model": device model
5783
func (c *PromoofferGetCall) Model(model string) *PromoofferGetCall {
5784
c.opt_["model"] = model
5788
// Product sets the optional parameter "product": device product
5789
func (c *PromoofferGetCall) Product(product string) *PromoofferGetCall {
5790
c.opt_["product"] = product
5794
// Serial sets the optional parameter "serial": device serial
5795
func (c *PromoofferGetCall) Serial(serial string) *PromoofferGetCall {
5796
c.opt_["serial"] = serial
5800
// Fields allows partial responses to be retrieved.
5801
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5802
// for more information.
5803
func (c *PromoofferGetCall) Fields(s ...googleapi.Field) *PromoofferGetCall {
5804
c.opt_["fields"] = googleapi.CombineFields(s)
5808
func (c *PromoofferGetCall) Do() (*Offers, error) {
5809
var body io.Reader = nil
5810
params := make(url.Values)
5811
params.Set("alt", "json")
5812
if v, ok := c.opt_["androidId"]; ok {
5813
params.Set("androidId", fmt.Sprintf("%v", v))
5815
if v, ok := c.opt_["device"]; ok {
5816
params.Set("device", fmt.Sprintf("%v", v))
5818
if v, ok := c.opt_["manufacturer"]; ok {
5819
params.Set("manufacturer", fmt.Sprintf("%v", v))
5821
if v, ok := c.opt_["model"]; ok {
5822
params.Set("model", fmt.Sprintf("%v", v))
5824
if v, ok := c.opt_["product"]; ok {
5825
params.Set("product", fmt.Sprintf("%v", v))
5827
if v, ok := c.opt_["serial"]; ok {
5828
params.Set("serial", fmt.Sprintf("%v", v))
5830
if v, ok := c.opt_["fields"]; ok {
5831
params.Set("fields", fmt.Sprintf("%v", v))
5833
urls := googleapi.ResolveRelative(c.s.BasePath, "promooffer/get")
5834
urls += "?" + params.Encode()
5835
req, _ := http.NewRequest("GET", urls, body)
5836
googleapi.SetOpaque(req.URL)
5837
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5838
res, err := c.s.client.Do(req)
5842
defer googleapi.CloseBody(res)
5843
if err := googleapi.CheckResponse(res); err != nil {
5847
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
5852
// "description": "Returns a list of promo offers available to the user",
5853
// "httpMethod": "GET",
5854
// "id": "books.promooffer.get",
5857
// "description": "device android_id",
5858
// "location": "query",
5862
// "description": "device device",
5863
// "location": "query",
5866
// "manufacturer": {
5867
// "description": "device manufacturer",
5868
// "location": "query",
5872
// "description": "device model",
5873
// "location": "query",
5877
// "description": "device product",
5878
// "location": "query",
5882
// "description": "device serial",
5883
// "location": "query",
5887
// "path": "promooffer/get",
5892
// "https://www.googleapis.com/auth/books"
5898
// method id "books.volumes.get":
5900
type VolumesGetCall struct {
5903
opt_ map[string]interface{}
5906
// Get: Gets volume information for a single volume.
5907
func (r *VolumesService) Get(volumeId string) *VolumesGetCall {
5908
c := &VolumesGetCall{s: r.s, opt_: make(map[string]interface{})}
5909
c.volumeId = volumeId
5913
// Country sets the optional parameter "country": ISO-3166-1 code to
5914
// override the IP-based location.
5915
func (c *VolumesGetCall) Country(country string) *VolumesGetCall {
5916
c.opt_["country"] = country
5920
// Partner sets the optional parameter "partner": Brand results for
5922
func (c *VolumesGetCall) Partner(partner string) *VolumesGetCall {
5923
c.opt_["partner"] = partner
5927
// Projection sets the optional parameter "projection": Restrict
5928
// information returned to a set of selected fields.
5929
func (c *VolumesGetCall) Projection(projection string) *VolumesGetCall {
5930
c.opt_["projection"] = projection
5934
// Source sets the optional parameter "source": String to identify the
5935
// originator of this request.
5936
func (c *VolumesGetCall) Source(source string) *VolumesGetCall {
5937
c.opt_["source"] = source
5941
// Fields allows partial responses to be retrieved.
5942
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5943
// for more information.
5944
func (c *VolumesGetCall) Fields(s ...googleapi.Field) *VolumesGetCall {
5945
c.opt_["fields"] = googleapi.CombineFields(s)
5949
func (c *VolumesGetCall) Do() (*Volume, error) {
5950
var body io.Reader = nil
5951
params := make(url.Values)
5952
params.Set("alt", "json")
5953
if v, ok := c.opt_["country"]; ok {
5954
params.Set("country", fmt.Sprintf("%v", v))
5956
if v, ok := c.opt_["partner"]; ok {
5957
params.Set("partner", fmt.Sprintf("%v", v))
5959
if v, ok := c.opt_["projection"]; ok {
5960
params.Set("projection", fmt.Sprintf("%v", v))
5962
if v, ok := c.opt_["source"]; ok {
5963
params.Set("source", fmt.Sprintf("%v", v))
5965
if v, ok := c.opt_["fields"]; ok {
5966
params.Set("fields", fmt.Sprintf("%v", v))
5968
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}")
5969
urls += "?" + params.Encode()
5970
req, _ := http.NewRequest("GET", urls, body)
5971
googleapi.Expand(req.URL, map[string]string{
5972
"volumeId": c.volumeId,
5974
req.Header.Set("User-Agent", "google-api-go-client/0.5")
5975
res, err := c.s.client.Do(req)
5979
defer googleapi.CloseBody(res)
5980
if err := googleapi.CheckResponse(res); err != nil {
5984
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
5989
// "description": "Gets volume information for a single volume.",
5990
// "httpMethod": "GET",
5991
// "id": "books.volumes.get",
5992
// "parameterOrder": [
5997
// "description": "ISO-3166-1 code to override the IP-based location.",
5998
// "location": "query",
6002
// "description": "Brand results for partner ID.",
6003
// "location": "query",
6007
// "description": "Restrict information returned to a set of selected fields.",
6012
// "enumDescriptions": [
6013
// "Includes all volume data.",
6014
// "Includes a subset of fields in volumeInfo and accessInfo."
6016
// "location": "query",
6020
// "description": "String to identify the originator of this request.",
6021
// "location": "query",
6025
// "description": "ID of volume to retrieve.",
6026
// "location": "path",
6027
// "required": true,
6031
// "path": "volumes/{volumeId}",
6036
// "https://www.googleapis.com/auth/books"
6042
// method id "books.volumes.list":
6044
type VolumesListCall struct {
6047
opt_ map[string]interface{}
6050
// List: Performs a book search.
6051
func (r *VolumesService) List(q string) *VolumesListCall {
6052
c := &VolumesListCall{s: r.s, opt_: make(map[string]interface{})}
6057
// Download sets the optional parameter "download": Restrict to volumes
6058
// by download availability.
6059
func (c *VolumesListCall) Download(download string) *VolumesListCall {
6060
c.opt_["download"] = download
6064
// Filter sets the optional parameter "filter": Filter search results.
6065
func (c *VolumesListCall) Filter(filter string) *VolumesListCall {
6066
c.opt_["filter"] = filter
6070
// LangRestrict sets the optional parameter "langRestrict": Restrict
6071
// results to books with this language code.
6072
func (c *VolumesListCall) LangRestrict(langRestrict string) *VolumesListCall {
6073
c.opt_["langRestrict"] = langRestrict
6077
// LibraryRestrict sets the optional parameter "libraryRestrict":
6078
// Restrict search to this user's library.
6079
func (c *VolumesListCall) LibraryRestrict(libraryRestrict string) *VolumesListCall {
6080
c.opt_["libraryRestrict"] = libraryRestrict
6084
// MaxResults sets the optional parameter "maxResults": Maximum number
6085
// of results to return.
6086
func (c *VolumesListCall) MaxResults(maxResults int64) *VolumesListCall {
6087
c.opt_["maxResults"] = maxResults
6091
// OrderBy sets the optional parameter "orderBy": Sort search results.
6092
func (c *VolumesListCall) OrderBy(orderBy string) *VolumesListCall {
6093
c.opt_["orderBy"] = orderBy
6097
// Partner sets the optional parameter "partner": Restrict and brand
6098
// results for partner ID.
6099
func (c *VolumesListCall) Partner(partner string) *VolumesListCall {
6100
c.opt_["partner"] = partner
6104
// PrintType sets the optional parameter "printType": Restrict to books
6106
func (c *VolumesListCall) PrintType(printType string) *VolumesListCall {
6107
c.opt_["printType"] = printType
6111
// Projection sets the optional parameter "projection": Restrict
6112
// information returned to a set of selected fields.
6113
func (c *VolumesListCall) Projection(projection string) *VolumesListCall {
6114
c.opt_["projection"] = projection
6118
// ShowPreorders sets the optional parameter "showPreorders": Set to
6119
// true to show books available for preorder. Defaults to false.
6120
func (c *VolumesListCall) ShowPreorders(showPreorders bool) *VolumesListCall {
6121
c.opt_["showPreorders"] = showPreorders
6125
// Source sets the optional parameter "source": String to identify the
6126
// originator of this request.
6127
func (c *VolumesListCall) Source(source string) *VolumesListCall {
6128
c.opt_["source"] = source
6132
// StartIndex sets the optional parameter "startIndex": Index of the
6133
// first result to return (starts at 0)
6134
func (c *VolumesListCall) StartIndex(startIndex int64) *VolumesListCall {
6135
c.opt_["startIndex"] = startIndex
6139
// Fields allows partial responses to be retrieved.
6140
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6141
// for more information.
6142
func (c *VolumesListCall) Fields(s ...googleapi.Field) *VolumesListCall {
6143
c.opt_["fields"] = googleapi.CombineFields(s)
6147
func (c *VolumesListCall) Do() (*Volumes, error) {
6148
var body io.Reader = nil
6149
params := make(url.Values)
6150
params.Set("alt", "json")
6151
params.Set("q", fmt.Sprintf("%v", c.q))
6152
if v, ok := c.opt_["download"]; ok {
6153
params.Set("download", fmt.Sprintf("%v", v))
6155
if v, ok := c.opt_["filter"]; ok {
6156
params.Set("filter", fmt.Sprintf("%v", v))
6158
if v, ok := c.opt_["langRestrict"]; ok {
6159
params.Set("langRestrict", fmt.Sprintf("%v", v))
6161
if v, ok := c.opt_["libraryRestrict"]; ok {
6162
params.Set("libraryRestrict", fmt.Sprintf("%v", v))
6164
if v, ok := c.opt_["maxResults"]; ok {
6165
params.Set("maxResults", fmt.Sprintf("%v", v))
6167
if v, ok := c.opt_["orderBy"]; ok {
6168
params.Set("orderBy", fmt.Sprintf("%v", v))
6170
if v, ok := c.opt_["partner"]; ok {
6171
params.Set("partner", fmt.Sprintf("%v", v))
6173
if v, ok := c.opt_["printType"]; ok {
6174
params.Set("printType", fmt.Sprintf("%v", v))
6176
if v, ok := c.opt_["projection"]; ok {
6177
params.Set("projection", fmt.Sprintf("%v", v))
6179
if v, ok := c.opt_["showPreorders"]; ok {
6180
params.Set("showPreorders", fmt.Sprintf("%v", v))
6182
if v, ok := c.opt_["source"]; ok {
6183
params.Set("source", fmt.Sprintf("%v", v))
6185
if v, ok := c.opt_["startIndex"]; ok {
6186
params.Set("startIndex", fmt.Sprintf("%v", v))
6188
if v, ok := c.opt_["fields"]; ok {
6189
params.Set("fields", fmt.Sprintf("%v", v))
6191
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes")
6192
urls += "?" + params.Encode()
6193
req, _ := http.NewRequest("GET", urls, body)
6194
googleapi.SetOpaque(req.URL)
6195
req.Header.Set("User-Agent", "google-api-go-client/0.5")
6196
res, err := c.s.client.Do(req)
6200
defer googleapi.CloseBody(res)
6201
if err := googleapi.CheckResponse(res); err != nil {
6205
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
6210
// "description": "Performs a book search.",
6211
// "httpMethod": "GET",
6212
// "id": "books.volumes.list",
6213
// "parameterOrder": [
6218
// "description": "Restrict to volumes by download availability.",
6222
// "enumDescriptions": [
6223
// "All volumes with epub."
6225
// "location": "query",
6229
// "description": "Filter search results.",
6237
// "enumDescriptions": [
6238
// "All Google eBooks.",
6239
// "Google eBook with full volume text viewability.",
6240
// "Public can view entire volume text.",
6241
// "Google eBook with a price.",
6242
// "Public able to see parts of text."
6244
// "location": "query",
6247
// "langRestrict": {
6248
// "description": "Restrict results to books with this language code.",
6249
// "location": "query",
6252
// "libraryRestrict": {
6253
// "description": "Restrict search to this user's library.",
6258
// "enumDescriptions": [
6259
// "Restrict to the user's library, any shelf.",
6260
// "Do not restrict based on user's library."
6262
// "location": "query",
6266
// "description": "Maximum number of results to return.",
6267
// "format": "uint32",
6268
// "location": "query",
6271
// "type": "integer"
6274
// "description": "Sort search results.",
6279
// "enumDescriptions": [
6280
// "Most recently published.",
6281
// "Relevance to search terms."
6283
// "location": "query",
6287
// "description": "Restrict and brand results for partner ID.",
6288
// "location": "query",
6292
// "description": "Restrict to books or magazines.",
6298
// "enumDescriptions": [
6299
// "All volume content types.",
6301
// "Just magazines."
6303
// "location": "query",
6307
// "description": "Restrict information returned to a set of selected fields.",
6312
// "enumDescriptions": [
6313
// "Includes all volume data.",
6314
// "Includes a subset of fields in volumeInfo and accessInfo."
6316
// "location": "query",
6320
// "description": "Full-text search query string.",
6321
// "location": "query",
6322
// "required": true,
6325
// "showPreorders": {
6326
// "description": "Set to true to show books available for preorder. Defaults to false.",
6327
// "location": "query",
6328
// "type": "boolean"
6331
// "description": "String to identify the originator of this request.",
6332
// "location": "query",
6336
// "description": "Index of the first result to return (starts at 0)",
6337
// "format": "uint32",
6338
// "location": "query",
6340
// "type": "integer"
6343
// "path": "volumes",
6345
// "$ref": "Volumes"
6348
// "https://www.googleapis.com/auth/books"
6354
// method id "books.volumes.associated.list":
6356
type VolumesAssociatedListCall struct {
6359
opt_ map[string]interface{}
6362
// List: Return a list of associated books.
6363
func (r *VolumesAssociatedService) List(volumeId string) *VolumesAssociatedListCall {
6364
c := &VolumesAssociatedListCall{s: r.s, opt_: make(map[string]interface{})}
6365
c.volumeId = volumeId
6369
// Association sets the optional parameter "association": Association
6371
func (c *VolumesAssociatedListCall) Association(association string) *VolumesAssociatedListCall {
6372
c.opt_["association"] = association
6376
// Locale sets the optional parameter "locale": ISO-639-1 language and
6377
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
6379
func (c *VolumesAssociatedListCall) Locale(locale string) *VolumesAssociatedListCall {
6380
c.opt_["locale"] = locale
6384
// Source sets the optional parameter "source": String to identify the
6385
// originator of this request.
6386
func (c *VolumesAssociatedListCall) Source(source string) *VolumesAssociatedListCall {
6387
c.opt_["source"] = source
6391
// Fields allows partial responses to be retrieved.
6392
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6393
// for more information.
6394
func (c *VolumesAssociatedListCall) Fields(s ...googleapi.Field) *VolumesAssociatedListCall {
6395
c.opt_["fields"] = googleapi.CombineFields(s)
6399
func (c *VolumesAssociatedListCall) Do() (*Volumes, error) {
6400
var body io.Reader = nil
6401
params := make(url.Values)
6402
params.Set("alt", "json")
6403
if v, ok := c.opt_["association"]; ok {
6404
params.Set("association", fmt.Sprintf("%v", v))
6406
if v, ok := c.opt_["locale"]; ok {
6407
params.Set("locale", fmt.Sprintf("%v", v))
6409
if v, ok := c.opt_["source"]; ok {
6410
params.Set("source", fmt.Sprintf("%v", v))
6412
if v, ok := c.opt_["fields"]; ok {
6413
params.Set("fields", fmt.Sprintf("%v", v))
6415
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/{volumeId}/associated")
6416
urls += "?" + params.Encode()
6417
req, _ := http.NewRequest("GET", urls, body)
6418
googleapi.Expand(req.URL, map[string]string{
6419
"volumeId": c.volumeId,
6421
req.Header.Set("User-Agent", "google-api-go-client/0.5")
6422
res, err := c.s.client.Do(req)
6426
defer googleapi.CloseBody(res)
6427
if err := googleapi.CheckResponse(res); err != nil {
6431
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
6436
// "description": "Return a list of associated books.",
6437
// "httpMethod": "GET",
6438
// "id": "books.volumes.associated.list",
6439
// "parameterOrder": [
6444
// "description": "Association type.",
6449
// "enumDescriptions": [
6450
// "Recommendations for display end-of-sample.",
6451
// "Recommendations for display end-of-volume."
6453
// "location": "query",
6457
// "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
6458
// "location": "query",
6462
// "description": "String to identify the originator of this request.",
6463
// "location": "query",
6467
// "description": "ID of the source volume.",
6468
// "location": "path",
6469
// "required": true,
6473
// "path": "volumes/{volumeId}/associated",
6475
// "$ref": "Volumes"
6478
// "https://www.googleapis.com/auth/books"
6484
// method id "books.volumes.mybooks.list":
6486
type VolumesMybooksListCall struct {
6488
opt_ map[string]interface{}
6491
// List: Return a list of books in My Library.
6492
func (r *VolumesMybooksService) List() *VolumesMybooksListCall {
6493
c := &VolumesMybooksListCall{s: r.s, opt_: make(map[string]interface{})}
6497
// AcquireMethod sets the optional parameter "acquireMethod": How the
6499
func (c *VolumesMybooksListCall) AcquireMethod(acquireMethod string) *VolumesMybooksListCall {
6500
c.opt_["acquireMethod"] = acquireMethod
6504
// Locale sets the optional parameter "locale": ISO-639-1 language and
6505
// ISO-3166-1 country code. Ex:'en_US'. Used for generating
6507
func (c *VolumesMybooksListCall) Locale(locale string) *VolumesMybooksListCall {
6508
c.opt_["locale"] = locale
6512
// MaxResults sets the optional parameter "maxResults": Maximum number
6513
// of results to return.
6514
func (c *VolumesMybooksListCall) MaxResults(maxResults int64) *VolumesMybooksListCall {
6515
c.opt_["maxResults"] = maxResults
6519
// ProcessingState sets the optional parameter "processingState": The
6520
// processing state of the user uploaded volumes to be returned.
6521
// Applicable only if the UPLOADED is specified in the acquireMethod.
6522
func (c *VolumesMybooksListCall) ProcessingState(processingState string) *VolumesMybooksListCall {
6523
c.opt_["processingState"] = processingState
6527
// Source sets the optional parameter "source": String to identify the
6528
// originator of this request.
6529
func (c *VolumesMybooksListCall) Source(source string) *VolumesMybooksListCall {
6530
c.opt_["source"] = source
6534
// StartIndex sets the optional parameter "startIndex": Index of the
6535
// first result to return (starts at 0)
6536
func (c *VolumesMybooksListCall) StartIndex(startIndex int64) *VolumesMybooksListCall {
6537
c.opt_["startIndex"] = startIndex
6541
// Fields allows partial responses to be retrieved.
6542
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6543
// for more information.
6544
func (c *VolumesMybooksListCall) Fields(s ...googleapi.Field) *VolumesMybooksListCall {
6545
c.opt_["fields"] = googleapi.CombineFields(s)
6549
func (c *VolumesMybooksListCall) Do() (*Volumes, error) {
6550
var body io.Reader = nil
6551
params := make(url.Values)
6552
params.Set("alt", "json")
6553
if v, ok := c.opt_["acquireMethod"]; ok {
6554
params.Set("acquireMethod", fmt.Sprintf("%v", v))
6556
if v, ok := c.opt_["locale"]; ok {
6557
params.Set("locale", fmt.Sprintf("%v", v))
6559
if v, ok := c.opt_["maxResults"]; ok {
6560
params.Set("maxResults", fmt.Sprintf("%v", v))
6562
if v, ok := c.opt_["processingState"]; ok {
6563
params.Set("processingState", fmt.Sprintf("%v", v))
6565
if v, ok := c.opt_["source"]; ok {
6566
params.Set("source", fmt.Sprintf("%v", v))
6568
if v, ok := c.opt_["startIndex"]; ok {
6569
params.Set("startIndex", fmt.Sprintf("%v", v))
6571
if v, ok := c.opt_["fields"]; ok {
6572
params.Set("fields", fmt.Sprintf("%v", v))
6574
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/mybooks")
6575
urls += "?" + params.Encode()
6576
req, _ := http.NewRequest("GET", urls, body)
6577
googleapi.SetOpaque(req.URL)
6578
req.Header.Set("User-Agent", "google-api-go-client/0.5")
6579
res, err := c.s.client.Do(req)
6583
defer googleapi.CloseBody(res)
6584
if err := googleapi.CheckResponse(res); err != nil {
6588
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
6593
// "description": "Return a list of books in My Library.",
6594
// "httpMethod": "GET",
6595
// "id": "books.volumes.mybooks.list",
6597
// "acquireMethod": {
6598
// "description": "How the book was aquired",
6601
// "PREVIOUSLY_RENTED",
6608
// "enumDescriptions": [
6609
// "Preordered books (not yet available)",
6610
// "User-rented books past their expiration time",
6611
// "Public domain books",
6612
// "Purchased books",
6613
// "User-rented books",
6615
// "User uploaded books"
6617
// "location": "query",
6618
// "repeated": true,
6622
// "description": "ISO-639-1 language and ISO-3166-1 country code. Ex:'en_US'. Used for generating recommendations.",
6623
// "location": "query",
6627
// "description": "Maximum number of results to return.",
6628
// "format": "uint32",
6629
// "location": "query",
6630
// "maximum": "100",
6632
// "type": "integer"
6634
// "processingState": {
6635
// "description": "The processing state of the user uploaded volumes to be returned. Applicable only if the UPLOADED is specified in the acquireMethod.",
6637
// "COMPLETED_FAILED",
6638
// "COMPLETED_SUCCESS",
6641
// "enumDescriptions": [
6642
// "The volume processing hase failed.",
6643
// "The volume processing was completed.",
6644
// "The volume processing is not completed."
6646
// "location": "query",
6647
// "repeated": true,
6651
// "description": "String to identify the originator of this request.",
6652
// "location": "query",
6656
// "description": "Index of the first result to return (starts at 0)",
6657
// "format": "uint32",
6658
// "location": "query",
6660
// "type": "integer"
6663
// "path": "volumes/mybooks",
6665
// "$ref": "Volumes"
6668
// "https://www.googleapis.com/auth/books"
6674
// method id "books.volumes.recommended.list":
6676
type VolumesRecommendedListCall struct {
6678
opt_ map[string]interface{}
6681
// List: Return a list of recommended books for the current user.
6682
func (r *VolumesRecommendedService) List() *VolumesRecommendedListCall {
6683
c := &VolumesRecommendedListCall{s: r.s, opt_: make(map[string]interface{})}
6687
// Locale sets the optional parameter "locale": ISO-639-1 language and
6688
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
6690
func (c *VolumesRecommendedListCall) Locale(locale string) *VolumesRecommendedListCall {
6691
c.opt_["locale"] = locale
6695
// Source sets the optional parameter "source": String to identify the
6696
// originator of this request.
6697
func (c *VolumesRecommendedListCall) Source(source string) *VolumesRecommendedListCall {
6698
c.opt_["source"] = source
6702
// Fields allows partial responses to be retrieved.
6703
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6704
// for more information.
6705
func (c *VolumesRecommendedListCall) Fields(s ...googleapi.Field) *VolumesRecommendedListCall {
6706
c.opt_["fields"] = googleapi.CombineFields(s)
6710
func (c *VolumesRecommendedListCall) Do() (*Volumes, error) {
6711
var body io.Reader = nil
6712
params := make(url.Values)
6713
params.Set("alt", "json")
6714
if v, ok := c.opt_["locale"]; ok {
6715
params.Set("locale", fmt.Sprintf("%v", v))
6717
if v, ok := c.opt_["source"]; ok {
6718
params.Set("source", fmt.Sprintf("%v", v))
6720
if v, ok := c.opt_["fields"]; ok {
6721
params.Set("fields", fmt.Sprintf("%v", v))
6723
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended")
6724
urls += "?" + params.Encode()
6725
req, _ := http.NewRequest("GET", urls, body)
6726
googleapi.SetOpaque(req.URL)
6727
req.Header.Set("User-Agent", "google-api-go-client/0.5")
6728
res, err := c.s.client.Do(req)
6732
defer googleapi.CloseBody(res)
6733
if err := googleapi.CheckResponse(res); err != nil {
6737
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
6742
// "description": "Return a list of recommended books for the current user.",
6743
// "httpMethod": "GET",
6744
// "id": "books.volumes.recommended.list",
6747
// "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
6748
// "location": "query",
6752
// "description": "String to identify the originator of this request.",
6753
// "location": "query",
6757
// "path": "volumes/recommended",
6759
// "$ref": "Volumes"
6762
// "https://www.googleapis.com/auth/books"
6768
// method id "books.volumes.recommended.rate":
6770
type VolumesRecommendedRateCall struct {
6774
opt_ map[string]interface{}
6777
// Rate: Rate a recommended book for the current user.
6778
func (r *VolumesRecommendedService) Rate(rating string, volumeId string) *VolumesRecommendedRateCall {
6779
c := &VolumesRecommendedRateCall{s: r.s, opt_: make(map[string]interface{})}
6781
c.volumeId = volumeId
6785
// Locale sets the optional parameter "locale": ISO-639-1 language and
6786
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
6788
func (c *VolumesRecommendedRateCall) Locale(locale string) *VolumesRecommendedRateCall {
6789
c.opt_["locale"] = locale
6793
// Source sets the optional parameter "source": String to identify the
6794
// originator of this request.
6795
func (c *VolumesRecommendedRateCall) Source(source string) *VolumesRecommendedRateCall {
6796
c.opt_["source"] = source
6800
// Fields allows partial responses to be retrieved.
6801
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6802
// for more information.
6803
func (c *VolumesRecommendedRateCall) Fields(s ...googleapi.Field) *VolumesRecommendedRateCall {
6804
c.opt_["fields"] = googleapi.CombineFields(s)
6808
func (c *VolumesRecommendedRateCall) Do() (*BooksVolumesRecommendedRateResponse, error) {
6809
var body io.Reader = nil
6810
params := make(url.Values)
6811
params.Set("alt", "json")
6812
params.Set("rating", fmt.Sprintf("%v", c.rating))
6813
params.Set("volumeId", fmt.Sprintf("%v", c.volumeId))
6814
if v, ok := c.opt_["locale"]; ok {
6815
params.Set("locale", fmt.Sprintf("%v", v))
6817
if v, ok := c.opt_["source"]; ok {
6818
params.Set("source", fmt.Sprintf("%v", v))
6820
if v, ok := c.opt_["fields"]; ok {
6821
params.Set("fields", fmt.Sprintf("%v", v))
6823
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/recommended/rate")
6824
urls += "?" + params.Encode()
6825
req, _ := http.NewRequest("POST", urls, body)
6826
googleapi.SetOpaque(req.URL)
6827
req.Header.Set("User-Agent", "google-api-go-client/0.5")
6828
res, err := c.s.client.Do(req)
6832
defer googleapi.CloseBody(res)
6833
if err := googleapi.CheckResponse(res); err != nil {
6836
var ret *BooksVolumesRecommendedRateResponse
6837
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
6842
// "description": "Rate a recommended book for the current user.",
6843
// "httpMethod": "POST",
6844
// "id": "books.volumes.recommended.rate",
6845
// "parameterOrder": [
6851
// "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
6852
// "location": "query",
6856
// "description": "Rating to be given to the volume.",
6861
// "enumDescriptions": [
6862
// "Rating indicating a dismissal due to ownership.",
6863
// "Rating indicating a negative dismissal of a volume."
6865
// "location": "query",
6866
// "required": true,
6870
// "description": "String to identify the originator of this request.",
6871
// "location": "query",
6875
// "description": "ID of the source volume.",
6876
// "location": "query",
6877
// "required": true,
6881
// "path": "volumes/recommended/rate",
6883
// "$ref": "BooksVolumesRecommendedRateResponse"
6886
// "https://www.googleapis.com/auth/books"
6892
// method id "books.volumes.useruploaded.list":
6894
type VolumesUseruploadedListCall struct {
6896
opt_ map[string]interface{}
6899
// List: Return a list of books uploaded by the current user.
6900
func (r *VolumesUseruploadedService) List() *VolumesUseruploadedListCall {
6901
c := &VolumesUseruploadedListCall{s: r.s, opt_: make(map[string]interface{})}
6905
// Locale sets the optional parameter "locale": ISO-639-1 language and
6906
// ISO-3166-1 country code. Ex: 'en_US'. Used for generating
6908
func (c *VolumesUseruploadedListCall) Locale(locale string) *VolumesUseruploadedListCall {
6909
c.opt_["locale"] = locale
6913
// MaxResults sets the optional parameter "maxResults": Maximum number
6914
// of results to return.
6915
func (c *VolumesUseruploadedListCall) MaxResults(maxResults int64) *VolumesUseruploadedListCall {
6916
c.opt_["maxResults"] = maxResults
6920
// ProcessingState sets the optional parameter "processingState": The
6921
// processing state of the user uploaded volumes to be returned.
6922
func (c *VolumesUseruploadedListCall) ProcessingState(processingState string) *VolumesUseruploadedListCall {
6923
c.opt_["processingState"] = processingState
6927
// Source sets the optional parameter "source": String to identify the
6928
// originator of this request.
6929
func (c *VolumesUseruploadedListCall) Source(source string) *VolumesUseruploadedListCall {
6930
c.opt_["source"] = source
6934
// StartIndex sets the optional parameter "startIndex": Index of the
6935
// first result to return (starts at 0)
6936
func (c *VolumesUseruploadedListCall) StartIndex(startIndex int64) *VolumesUseruploadedListCall {
6937
c.opt_["startIndex"] = startIndex
6941
// VolumeId sets the optional parameter "volumeId": The ids of the
6942
// volumes to be returned. If not specified all that match the
6943
// processingState are returned.
6944
func (c *VolumesUseruploadedListCall) VolumeId(volumeId string) *VolumesUseruploadedListCall {
6945
c.opt_["volumeId"] = volumeId
6949
// Fields allows partial responses to be retrieved.
6950
// See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6951
// for more information.
6952
func (c *VolumesUseruploadedListCall) Fields(s ...googleapi.Field) *VolumesUseruploadedListCall {
6953
c.opt_["fields"] = googleapi.CombineFields(s)
6957
func (c *VolumesUseruploadedListCall) Do() (*Volumes, error) {
6958
var body io.Reader = nil
6959
params := make(url.Values)
6960
params.Set("alt", "json")
6961
if v, ok := c.opt_["locale"]; ok {
6962
params.Set("locale", fmt.Sprintf("%v", v))
6964
if v, ok := c.opt_["maxResults"]; ok {
6965
params.Set("maxResults", fmt.Sprintf("%v", v))
6967
if v, ok := c.opt_["processingState"]; ok {
6968
params.Set("processingState", fmt.Sprintf("%v", v))
6970
if v, ok := c.opt_["source"]; ok {
6971
params.Set("source", fmt.Sprintf("%v", v))
6973
if v, ok := c.opt_["startIndex"]; ok {
6974
params.Set("startIndex", fmt.Sprintf("%v", v))
6976
if v, ok := c.opt_["volumeId"]; ok {
6977
params.Set("volumeId", fmt.Sprintf("%v", v))
6979
if v, ok := c.opt_["fields"]; ok {
6980
params.Set("fields", fmt.Sprintf("%v", v))
6982
urls := googleapi.ResolveRelative(c.s.BasePath, "volumes/useruploaded")
6983
urls += "?" + params.Encode()
6984
req, _ := http.NewRequest("GET", urls, body)
6985
googleapi.SetOpaque(req.URL)
6986
req.Header.Set("User-Agent", "google-api-go-client/0.5")
6987
res, err := c.s.client.Do(req)
6991
defer googleapi.CloseBody(res)
6992
if err := googleapi.CheckResponse(res); err != nil {
6996
if err := json.NewDecoder(res.Body).Decode(&ret); err != nil {
7001
// "description": "Return a list of books uploaded by the current user.",
7002
// "httpMethod": "GET",
7003
// "id": "books.volumes.useruploaded.list",
7006
// "description": "ISO-639-1 language and ISO-3166-1 country code. Ex: 'en_US'. Used for generating recommendations.",
7007
// "location": "query",
7011
// "description": "Maximum number of results to return.",
7012
// "format": "uint32",
7013
// "location": "query",
7016
// "type": "integer"
7018
// "processingState": {
7019
// "description": "The processing state of the user uploaded volumes to be returned.",
7021
// "COMPLETED_FAILED",
7022
// "COMPLETED_SUCCESS",
7025
// "enumDescriptions": [
7026
// "The volume processing hase failed.",
7027
// "The volume processing was completed.",
7028
// "The volume processing is not completed."
7030
// "location": "query",
7031
// "repeated": true,
7035
// "description": "String to identify the originator of this request.",
7036
// "location": "query",
7040
// "description": "Index of the first result to return (starts at 0)",
7041
// "format": "uint32",
7042
// "location": "query",
7044
// "type": "integer"
7047
// "description": "The ids of the volumes to be returned. If not specified all that match the processingState are returned.",
7048
// "location": "query",
7049
// "repeated": true,
7053
// "path": "volumes/useruploaded",
7055
// "$ref": "Volumes"
7058
// "https://www.googleapis.com/auth/books"