Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "full" projection to get additional volume identifiers/metadata from GB #15

Closed
ryanfb opened this issue Apr 6, 2018 · 1 comment

Comments

@ryanfb
Copy link
Owner

ryanfb commented Apr 6, 2018

See: https://developers.google.com/books/docs/v1/reference/volumes#resource

Projection
You can use the projection parameter with one of the following values to specify a predefined set of Volume fields to return:

full - Returns all Volume fields.
lite - Returns only certain fields. See field descriptions marked with double asterisks in the Volume reference to find out which fields are included.
The following example returns search results with limited volume information:

GET https://www.googleapis.com/books/v1/volumes?q=flowers&projection=lite&key=yourAPIKey

It looks like we've been getting "lite" by default, which apparently doesn't include these.

@ryanfb
Copy link
Owner Author

ryanfb commented Apr 6, 2018

Actually not sure how much of a difference this will make. For LIM0AAAAMAAJ (from #14), here's the "full" output:

{
 "kind": "books#volume",
 "id": "LIM0AAAAMAAJ",
 "etag": "jYwIUXz8WS8",
 "selfLink": "https://www.googleapis.com/books/v1/volumes/LIM0AAAAMAAJ",
 "volumeInfo": {
  "title": "Translations and Poems Written on Several Subjects ...",
  "authors": [
   "Samuel Boyse"
  ],
  "publisher": "Mr. Thomas and Walter Ruddimans",
  "publishedDate": "1731",
  "readingModes": {
   "text": false,
   "image": true
  },
  "pageCount": 195,
  "printedPageCount": 224,
  "dimensions": {
   "height": "20.00 cm"
  },
  "printType": "BOOK",
  "maturityRating": "NOT_MATURE",
  "allowAnonLogging": false,
  "contentVersion": "1.1.1.0.full.1",
  "imageLinks": {
   "smallThumbnail": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=5&edge=curl&imgtk=AFLRE728_rhrIXBVMtENVW5ToJBeDrwBc9QST9Hdd7D2Sq-p-w91OeigGQFwFG2JjWnNgJ8VwGOuc-dbK_9rFKYVc2hfewS1HdjFGznBc6HZcnvv-k_DtApk7h7k4yz6BpAxGP5sD2D-&source=gbs_api",
   "thumbnail": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=1&edge=curl&imgtk=AFLRE73BXcolsOn_4GuJ5_wwjr9iylFEexFy3PZdYKWEZXze18sC4jjBb2qQ99PXhbySI5fjhrBLrZ3Bzg1sF-7WzwHNBJu5Liro6RYFOlYHbUs1oZibJBD9gCj7IoYZ4S_LHP6kkUUr&source=gbs_api",
   "small": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=2&edge=curl&imgtk=AFLRE72IzplTcDZTsAAXax88sYYtU4M1Fkqfd7Zkp68A6_GCvJ3mU0sRrkdAAZBVEOCSXc7MMn6n_i1E01EnL4KOJw2b2uW4vaFsX60hAjzx_KTKzUWP0en3PL9vXGNL6VY5KgjDPg3c&source=gbs_api",
   "medium": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=3&edge=curl&imgtk=AFLRE70R3KDrflxmAEqYcMUSWIxS5aVPe6nn4_MWyP3TmYaFpGDum0BJSlE8jhxXQiGTC6DMT9G3rEimcfHlj8fiRQL8RNjiNkS7ede3WeW5nrbpHaFSYf7dM3WkJVSkqahFvMyJoqJX&source=gbs_api",
   "large": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=4&edge=curl&imgtk=AFLRE73XuU_9EJV2DvUS1FZZAJ_ZbbahUmRU7iM5HheEH7HjJovUQK478a6-OaDbdrazsYlTJJkD-YQKCCwgZpgnbZUaMHsCAgcyVrv_0StYAffr0M5ko6LWHcJ6SlFwlNQJxDHFZ6RY&source=gbs_api",
   "extraLarge": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=6&edge=curl&imgtk=AFLRE71oMbtUzmnHnX6RSKXXN0NxYJRyw9Qxkv4MTlH1QEBbi2pl9VQ-4Q4gkkdnrZM4UkRXsRvG5ZHX510d8vDm4FsLIiNufKxcAet_il3HK3cZnre5HfFJ5U6ScCNmWp_QgrFQ6KqE&source=gbs_api"
  },
  "language": "en",
  "previewLink": "http://books.google.com/books?id=LIM0AAAAMAAJ&hl=&source=gbs_api",
  "infoLink": "https://play.google.com/store/books/details?id=LIM0AAAAMAAJ&source=gbs_api",
  "canonicalVolumeLink": "https://market.android.com/details?id=book-LIM0AAAAMAAJ"
 },
 "saleInfo": {
  "country": "US",
  "saleability": "FREE",
  "isEbook": true,
  "buyLink": "https://play.google.com/store/books/details?id=LIM0AAAAMAAJ&rdid=book-LIM0AAAAMAAJ&rdot=1&source=gbs_api"
 },
 "accessInfo": {
  "country": "US",
  "viewability": "ALL_PAGES",
  "embeddable": true,
  "publicDomain": true,
  "textToSpeechPermission": "ALLOWED",
  "epub": {
   "isAvailable": false,
   "downloadLink": "http://books.google.com/books/download/Translations_and_Poems_Written_on_Severa.epub?id=LIM0AAAAMAAJ&hl=&output=epub&source=gbs_api"
  },
  "pdf": {
   "isAvailable": true,
   "downloadLink": "http://books.google.com/books/download/Translations_and_Poems_Written_on_Severa.pdf?id=LIM0AAAAMAAJ&hl=&output=pdf&sig=ACfU3U1XsK5qxnVHGRU3rTr9ZXHXA2Ny7g&source=gbs_api"
  },
  "webReaderLink": "http://play.google.com/books/reader?id=LIM0AAAAMAAJ&hl=&printsec=frontcover&source=gbs_api",
  "accessViewStatus": "FULL_PUBLIC_DOMAIN",
  "quoteSharingAllowed": false
 }
}

And the "lite" output:

{
 "kind": "books#volume",
 "id": "LIM0AAAAMAAJ",
 "etag": "G3FrcUdVTYs",
 "selfLink": "https://www.googleapis.com/books/v1/volumes/LIM0AAAAMAAJ",
 "volumeInfo": {
  "title": "Translations and Poems Written on Several Subjects ...",
  "authors": [
   "Samuel Boyse"
  ],
  "publisher": "Mr. Thomas and Walter Ruddimans",
  "publishedDate": "1731",
  "readingModes": {
   "text": false,
   "image": true
  },
  "maturityRating": "NOT_MATURE",
  "allowAnonLogging": false,
  "contentVersion": "1.1.1.0.full.1",
  "imageLinks": {
   "smallThumbnail": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=5&edge=curl&imgtk=AFLRE70saIc5ZLqyf4KaAIE3vjR7mgPP-hnqPNlL1wJXLiGKWGttNYMfzGi3tOOOatF4PfxZCNHVFiYyDbCrmS8aoYnN4HsiOQejRiqBvYRUtAhS9gzjeoxLCq6PjRXmMIqKI8tyFDiT&source=gbs_api",
   "thumbnail": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=1&edge=curl&imgtk=AFLRE73GrCgEJajGw9dq7EL5Ym_rYnPsH5cxxIHTrZ38BzIhQLM0jMAR3wO1Lx6gleeBFMZ-dx_v8kH1oEYFdKXT7zBoOQKmQ0nYQPDjNpo8Id_GFGfgg6X0JN_OuEy-5Ng4fIuJMAcy&source=gbs_api",
   "small": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=2&edge=curl&imgtk=AFLRE72jbRDM9X5ZuIAlNYklJosHESakaKiCNwz2mGKd0vdlKI8IpTw7d-iGIlqzzjfS63620kywi0kSVsy4qiddOl2yUC2jLPCwUG5eafTk1j6QjSceFLcvLwih7lVn-ewgyb-pwKAb&source=gbs_api",
   "medium": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=3&edge=curl&imgtk=AFLRE72ahsQQAJOucDmlHtmvu4MyvpYACNToaU6NqFDfryRaPpjUosArcOI2uJPaMY5U4ebtEbxLh818JSuL_viL2M6J2e2e_z8ySNrLtrrIFC3_GL635BN75_HB36ji3HP-3qMM-9Wj&source=gbs_api",
   "large": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=4&edge=curl&imgtk=AFLRE73sB0KGlvBPpOLPSZL-QfSrlivAru8EZbh-J03Gg4jmKoGS1KE85E5eGTQO3i7p3F5DajdiRGcnDetsVqbYHtFTKiJaznLGZtDbetSWfgSqkLBghcapRZOOkAtkhQxSKtXE19nY&source=gbs_api",
   "extraLarge": "http://books.google.com/books/content?id=LIM0AAAAMAAJ&printsec=frontcover&img=1&zoom=6&edge=curl&imgtk=AFLRE71jKgSMun1Np8K2UrMw1XB2VeqfCrFTTNLvl0bdewy1MVeLxLJiGwMHMUkOex7R9587rsT2zo2NXQKd1YB5scU9Tid7eJG8d_y25QV0mZ01b46xEVH_FL5gDG_x6TwdUGYhd6L7&source=gbs_api"
  },
  "previewLink": "http://books.google.com/books?id=LIM0AAAAMAAJ&hl=&source=gbs_api",
  "infoLink": "https://play.google.com/store/books/details?id=LIM0AAAAMAAJ&source=gbs_api",
  "canonicalVolumeLink": "https://market.android.com/details?id=book-LIM0AAAAMAAJ"
 },
 "saleInfo": {
  "country": "US",
  "buyLink": "https://play.google.com/store/books/details?id=LIM0AAAAMAAJ&rdid=book-LIM0AAAAMAAJ&rdot=1&source=gbs_api"
 },
 "accessInfo": {
  "country": "US",
  "epub": {
   "isAvailable": false,
   "downloadLink": "http://books.google.com/books/download/Translations_and_Poems_Written_on_Severa.epub?id=LIM0AAAAMAAJ&hl=&output=epub&source=gbs_api"
  },
  "pdf": {
   "isAvailable": true,
   "downloadLink": "http://books.google.com/books/download/Translations_and_Poems_Written_on_Severa.pdf?id=LIM0AAAAMAAJ&hl=&output=pdf&sig=ACfU3U1XsK5qxnVHGRU3rTr9ZXHXA2Ny7g&source=gbs_api"
  },
  "accessViewStatus": "FULL_PUBLIC_DOMAIN"
 }
}

There's still no industryIdentifiers field with the OCLC number, which is the basis for the match from the HT->GB direction. Maybe this only matters for books with an ISBN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant