gogol-books 0.1.0 → 0.1.1
raw patch · 9 files changed
+289/−46 lines, 9 filesdep ~gogol-corePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: gogol-core
API changes (from Hackage documentation)
+ Network.Google.Books: FamilyShared :: VolumesMybooksListAcquireMethod
+ Network.Google.Books: VLMAMRMature :: VolumesListMaxAllowedMaturityRating
+ Network.Google.Books: VLMAMRNotMature :: VolumesListMaxAllowedMaturityRating
+ Network.Google.Books: data UserSettingsNotificationMoreFromSeries
+ Network.Google.Books: data VolumeVolumeInfoPanelizationSummary
+ Network.Google.Books: data VolumesListMaxAllowedMaturityRating
+ Network.Google.Books: userSettingsNotificationMoreFromSeries :: UserSettingsNotificationMoreFromSeries
+ Network.Google.Books: usnMoreFromSeries :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromSeries)
+ Network.Google.Books: usnmfsOptedState :: Lens' UserSettingsNotificationMoreFromSeries (Maybe Text)
+ Network.Google.Books: volumeVolumeInfoPanelizationSummary :: VolumeVolumeInfoPanelizationSummary
+ Network.Google.Books: vsioiGiftable :: Lens' VolumeSaleInfoOffersItem (Maybe Bool)
+ Network.Google.Books: vviPanelizationSummary :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoPanelizationSummary)
+ Network.Google.Books: vvipsContainsEpubBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
+ Network.Google.Books: vvipsContainsImageBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
+ Network.Google.Books: vvipsEpubBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
+ Network.Google.Books: vvipsImageBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
+ Network.Google.Books.Types: FamilyShared :: VolumesMybooksListAcquireMethod
+ Network.Google.Books.Types: VLMAMRMature :: VolumesListMaxAllowedMaturityRating
+ Network.Google.Books.Types: VLMAMRNotMature :: VolumesListMaxAllowedMaturityRating
+ Network.Google.Books.Types: data UserSettingsNotificationMoreFromSeries
+ Network.Google.Books.Types: data VolumeVolumeInfoPanelizationSummary
+ Network.Google.Books.Types: data VolumesListMaxAllowedMaturityRating
+ Network.Google.Books.Types: userSettingsNotificationMoreFromSeries :: UserSettingsNotificationMoreFromSeries
+ Network.Google.Books.Types: usnMoreFromSeries :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromSeries)
+ Network.Google.Books.Types: usnmfsOptedState :: Lens' UserSettingsNotificationMoreFromSeries (Maybe Text)
+ Network.Google.Books.Types: volumeVolumeInfoPanelizationSummary :: VolumeVolumeInfoPanelizationSummary
+ Network.Google.Books.Types: vsioiGiftable :: Lens' VolumeSaleInfoOffersItem (Maybe Bool)
+ Network.Google.Books.Types: vviPanelizationSummary :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoPanelizationSummary)
+ Network.Google.Books.Types: vvipsContainsEpubBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
+ Network.Google.Books.Types: vvipsContainsImageBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)
+ Network.Google.Books.Types: vvipsEpubBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
+ Network.Google.Books.Types: vvipsImageBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)
+ Network.Google.Resource.Books.Volumes.List: vlMaxAllowedMaturityRating :: Lens' VolumesList (Maybe VolumesListMaxAllowedMaturityRating)
- Network.Google.Resource.Books.Volumes.List: type VolumesListResource = "books" :> ("v1" :> ("volumes" :> (QueryParam "q" Text :> (QueryParam "orderBy" VolumesListOrderBy :> (QueryParam "libraryRestrict" VolumesListLibraryRestrict :> (QueryParam "partner" Text :> (QueryParam "download" VolumesListDownload :> (QueryParam "source" Text :> (QueryParam "projection" VolumesListProjection :> (QueryParam "filter" VolumesListFilter :> (QueryParam "langRestrict" Text :> (QueryParam "startIndex" (Textual Word32) :> (QueryParam "maxResults" (Textual Word32) :> (QueryParam "showPreorders" Bool :> (QueryParam "printType" VolumesListPrintType :> (QueryParam "alt" AltJSON :> Get '[JSON] Volumes))))))))))))))))
+ Network.Google.Resource.Books.Volumes.List: type VolumesListResource = "books" :> ("v1" :> ("volumes" :> (QueryParam "q" Text :> (QueryParam "orderBy" VolumesListOrderBy :> (QueryParam "maxAllowedMaturityRating" VolumesListMaxAllowedMaturityRating :> (QueryParam "libraryRestrict" VolumesListLibraryRestrict :> (QueryParam "partner" Text :> (QueryParam "download" VolumesListDownload :> (QueryParam "source" Text :> (QueryParam "projection" VolumesListProjection :> (QueryParam "filter" VolumesListFilter :> (QueryParam "langRestrict" Text :> (QueryParam "startIndex" (Textual Word32) :> (QueryParam "maxResults" (Textual Word32) :> (QueryParam "showPreorders" Bool :> (QueryParam "printType" VolumesListPrintType :> (QueryParam "alt" AltJSON :> Get '[JSON] Volumes)))))))))))))))))
Files
- README.md +1/−1
- gen/Network/Google/Books.hs +20/−1
- gen/Network/Google/Books/Types.hs +19/−0
- gen/Network/Google/Books/Types/Product.hs +161/−8
- gen/Network/Google/Books/Types/Sum.hs +37/−2
- gen/Network/Google/Resource/Books/Volumes/List.hs +46/−29
- gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs +1/−1
- gogol-books.cabal +4/−4
- src/.gitkeep +0/−0
README.md view
@@ -8,7 +8,7 @@ ## Version -`0.1.0`+`0.1.1` ## Description
gen/Network/Google/Books.hs view
@@ -13,7 +13,7 @@ -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- Lets you search for books and manage your Google Books library.+-- Searches for books and manages your Google Books library. -- -- /See:/ <https://developers.google.com/books/docs/v1/getting_started Books API Reference> module Network.Google.Books@@ -374,6 +374,14 @@ , vaiViewOrderURL , vaiPublicDomain + -- ** VolumeVolumeInfoPanelizationSummary+ , VolumeVolumeInfoPanelizationSummary+ , volumeVolumeInfoPanelizationSummary+ , vvipsEpubBubbleVersion+ , vvipsContainsImageBubbles+ , vvipsContainsEpubBubbles+ , vvipsImageBubbleVersion+ -- ** MyLibraryBookshelvesRemoveVolumeReason , MyLibraryBookshelvesRemoveVolumeReason (..) @@ -668,6 +676,7 @@ , UserSettingsNotification , userSettingsNotification , usnMoreFromAuthors+ , usnMoreFromSeries -- ** DictlayerDataDictWordsItemSensesItemSynonymsItem , DictlayerDataDictWordsItemSensesItemSynonymsItem@@ -892,6 +901,7 @@ , vsioiRentalDuration , vsioiListPrice , vsioiRetailPrice+ , vsioiGiftable -- ** DictlayerDataDict , DictlayerDataDict@@ -1002,6 +1012,7 @@ , VolumeVolumeInfo , volumeVolumeInfo , vviImageLinks+ , vviPanelizationSummary , vviAverageRating , vviRatingsCount , vviCanonicalVolumeLink@@ -1056,6 +1067,11 @@ , vuifsIsSharingAllowed , vuifsIsSharingDisabledByFop + -- ** UserSettingsNotificationMoreFromSeries+ , UserSettingsNotificationMoreFromSeries+ , userSettingsNotificationMoreFromSeries+ , usnmfsOptedState+ -- ** VolumeVolumeInfoIndustryIdentifiersItem , VolumeVolumeInfoIndustryIdentifiersItem , volumeVolumeInfoIndustryIdentifiersItem@@ -1069,6 +1085,9 @@ , barEndOffSet , barEndPosition , barStartPosition++ -- ** VolumesListMaxAllowedMaturityRating+ , VolumesListMaxAllowedMaturityRating (..) -- ** Layersummaries , Layersummaries
gen/Network/Google/Books/Types.hs view
@@ -221,6 +221,14 @@ , vaiViewOrderURL , vaiPublicDomain + -- * VolumeVolumeInfoPanelizationSummary+ , VolumeVolumeInfoPanelizationSummary+ , volumeVolumeInfoPanelizationSummary+ , vvipsEpubBubbleVersion+ , vvipsContainsImageBubbles+ , vvipsContainsEpubBubbles+ , vvipsImageBubbleVersion+ -- * MyLibraryBookshelvesRemoveVolumeReason , MyLibraryBookshelvesRemoveVolumeReason (..) @@ -515,6 +523,7 @@ , UserSettingsNotification , userSettingsNotification , usnMoreFromAuthors+ , usnMoreFromSeries -- * DictlayerDataDictWordsItemSensesItemSynonymsItem , DictlayerDataDictWordsItemSensesItemSynonymsItem@@ -739,6 +748,7 @@ , vsioiRentalDuration , vsioiListPrice , vsioiRetailPrice+ , vsioiGiftable -- * DictlayerDataDict , DictlayerDataDict@@ -849,6 +859,7 @@ , VolumeVolumeInfo , volumeVolumeInfo , vviImageLinks+ , vviPanelizationSummary , vviAverageRating , vviRatingsCount , vviCanonicalVolumeLink@@ -903,6 +914,11 @@ , vuifsIsSharingAllowed , vuifsIsSharingDisabledByFop + -- * UserSettingsNotificationMoreFromSeries+ , UserSettingsNotificationMoreFromSeries+ , userSettingsNotificationMoreFromSeries+ , usnmfsOptedState+ -- * VolumeVolumeInfoIndustryIdentifiersItem , VolumeVolumeInfoIndustryIdentifiersItem , volumeVolumeInfoIndustryIdentifiersItem@@ -916,6 +932,9 @@ , barEndOffSet , barEndPosition , barStartPosition++ -- * VolumesListMaxAllowedMaturityRating+ , VolumesListMaxAllowedMaturityRating (..) -- * Layersummaries , Layersummaries
gen/Network/Google/Books/Types/Product.hs view
@@ -1850,6 +1850,82 @@ ("viewOrderUrl" .=) <$> _vaiViewOrderURL, ("publicDomain" .=) <$> _vaiPublicDomain]) +-- | A top-level summary of the panelization info in this volume.+--+-- /See:/ 'volumeVolumeInfoPanelizationSummary' smart constructor.+data VolumeVolumeInfoPanelizationSummary = VolumeVolumeInfoPanelizationSummary'+ { _vvipsEpubBubbleVersion :: !(Maybe Text)+ , _vvipsContainsImageBubbles :: !(Maybe Bool)+ , _vvipsContainsEpubBubbles :: !(Maybe Bool)+ , _vvipsImageBubbleVersion :: !(Maybe Text)+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'VolumeVolumeInfoPanelizationSummary' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'vvipsEpubBubbleVersion'+--+-- * 'vvipsContainsImageBubbles'+--+-- * 'vvipsContainsEpubBubbles'+--+-- * 'vvipsImageBubbleVersion'+volumeVolumeInfoPanelizationSummary+ :: VolumeVolumeInfoPanelizationSummary+volumeVolumeInfoPanelizationSummary =+ VolumeVolumeInfoPanelizationSummary'+ { _vvipsEpubBubbleVersion = Nothing+ , _vvipsContainsImageBubbles = Nothing+ , _vvipsContainsEpubBubbles = Nothing+ , _vvipsImageBubbleVersion = Nothing+ }++vvipsEpubBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)+vvipsEpubBubbleVersion+ = lens _vvipsEpubBubbleVersion+ (\ s a -> s{_vvipsEpubBubbleVersion = a})++vvipsContainsImageBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)+vvipsContainsImageBubbles+ = lens _vvipsContainsImageBubbles+ (\ s a -> s{_vvipsContainsImageBubbles = a})++vvipsContainsEpubBubbles :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Bool)+vvipsContainsEpubBubbles+ = lens _vvipsContainsEpubBubbles+ (\ s a -> s{_vvipsContainsEpubBubbles = a})++vvipsImageBubbleVersion :: Lens' VolumeVolumeInfoPanelizationSummary (Maybe Text)+vvipsImageBubbleVersion+ = lens _vvipsImageBubbleVersion+ (\ s a -> s{_vvipsImageBubbleVersion = a})++instance FromJSON VolumeVolumeInfoPanelizationSummary+ where+ parseJSON+ = withObject "VolumeVolumeInfoPanelizationSummary"+ (\ o ->+ VolumeVolumeInfoPanelizationSummary' <$>+ (o .:? "epubBubbleVersion") <*>+ (o .:? "containsImageBubbles")+ <*> (o .:? "containsEpubBubbles")+ <*> (o .:? "imageBubbleVersion"))++instance ToJSON VolumeVolumeInfoPanelizationSummary+ where+ toJSON VolumeVolumeInfoPanelizationSummary'{..}+ = object+ (catMaybes+ [("epubBubbleVersion" .=) <$>+ _vvipsEpubBubbleVersion,+ ("containsImageBubbles" .=) <$>+ _vvipsContainsImageBubbles,+ ("containsEpubBubbles" .=) <$>+ _vvipsContainsEpubBubbles,+ ("imageBubbleVersion" .=) <$>+ _vvipsImageBubbleVersion])+ -- | A list of image links for all the sizes that are available. (In LITE -- projection.) --@@ -3224,6 +3300,8 @@ sKind :: Lens' Series Text sKind = lens _sKind (\ s a -> s{_sKind = a}) +-- | Series info list. The client always expects this element in the JSON+-- output, hence declared here as OutputAlways. sSeries :: Lens' Series [SeriesSeriesItem] sSeries = lens _sSeries (\ s a -> s{_sSeries = a}) . _Default@@ -4130,8 +4208,9 @@ -- -- /See:/ 'userSettingsNotification' smart constructor.-newtype UserSettingsNotification = UserSettingsNotification'- { _usnMoreFromAuthors :: Maybe UserSettingsNotificationMoreFromAuthors+data UserSettingsNotification = UserSettingsNotification'+ { _usnMoreFromAuthors :: !(Maybe UserSettingsNotificationMoreFromAuthors)+ , _usnMoreFromSeries :: !(Maybe UserSettingsNotificationMoreFromSeries) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'UserSettingsNotification' with the minimum fields required to make a request.@@ -4139,11 +4218,14 @@ -- Use one of the following lenses to modify other fields as desired: -- -- * 'usnMoreFromAuthors'+--+-- * 'usnMoreFromSeries' userSettingsNotification :: UserSettingsNotification userSettingsNotification = UserSettingsNotification' { _usnMoreFromAuthors = Nothing+ , _usnMoreFromSeries = Nothing } usnMoreFromAuthors :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromAuthors)@@ -4151,18 +4233,25 @@ = lens _usnMoreFromAuthors (\ s a -> s{_usnMoreFromAuthors = a}) +usnMoreFromSeries :: Lens' UserSettingsNotification (Maybe UserSettingsNotificationMoreFromSeries)+usnMoreFromSeries+ = lens _usnMoreFromSeries+ (\ s a -> s{_usnMoreFromSeries = a})+ instance FromJSON UserSettingsNotification where parseJSON = withObject "UserSettingsNotification" (\ o -> UserSettingsNotification' <$>- (o .:? "moreFromAuthors"))+ (o .:? "moreFromAuthors") <*>+ (o .:? "moreFromSeries")) instance ToJSON UserSettingsNotification where toJSON UserSettingsNotification'{..} = object (catMaybes- [("moreFromAuthors" .=) <$> _usnMoreFromAuthors])+ [("moreFromAuthors" .=) <$> _usnMoreFromAuthors,+ ("moreFromSeries" .=) <$> _usnMoreFromSeries]) -- -- /See:/ 'dictlayerDataDictWordsItemSensesItemSynonymsItem' smart constructor.@@ -5959,6 +6048,7 @@ , _vsioiRentalDuration :: !(Maybe VolumeSaleInfoOffersItemRentalDuration) , _vsioiListPrice :: !(Maybe VolumeSaleInfoOffersItemListPrice) , _vsioiRetailPrice :: !(Maybe VolumeSaleInfoOffersItemRetailPrice)+ , _vsioiGiftable :: !(Maybe Bool) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'VolumeSaleInfoOffersItem' with the minimum fields required to make a request.@@ -5972,6 +6062,8 @@ -- * 'vsioiListPrice' -- -- * 'vsioiRetailPrice'+--+-- * 'vsioiGiftable' volumeSaleInfoOffersItem :: VolumeSaleInfoOffersItem volumeSaleInfoOffersItem =@@ -5980,6 +6072,7 @@ , _vsioiRentalDuration = Nothing , _vsioiListPrice = Nothing , _vsioiRetailPrice = Nothing+ , _vsioiGiftable = Nothing } -- | The finsky offer type (e.g., PURCHASE=0 RENTAL=3)@@ -6007,6 +6100,12 @@ = lens _vsioiRetailPrice (\ s a -> s{_vsioiRetailPrice = a}) +-- | Indicates whether the offer is giftable.+vsioiGiftable :: Lens' VolumeSaleInfoOffersItem (Maybe Bool)+vsioiGiftable+ = lens _vsioiGiftable+ (\ s a -> s{_vsioiGiftable = a})+ instance FromJSON VolumeSaleInfoOffersItem where parseJSON = withObject "VolumeSaleInfoOffersItem"@@ -6015,7 +6114,8 @@ (o .:? "finskyOfferType") <*> (o .:? "rentalDuration") <*> (o .:? "listPrice")- <*> (o .:? "retailPrice"))+ <*> (o .:? "retailPrice")+ <*> (o .:? "giftable")) instance ToJSON VolumeSaleInfoOffersItem where toJSON VolumeSaleInfoOffersItem'{..}@@ -6024,7 +6124,8 @@ [("finskyOfferType" .=) <$> _vsioiFinskyOfferType, ("rentalDuration" .=) <$> _vsioiRentalDuration, ("listPrice" .=) <$> _vsioiListPrice,- ("retailPrice" .=) <$> _vsioiRetailPrice])+ ("retailPrice" .=) <$> _vsioiRetailPrice,+ ("giftable" .=) <$> _vsioiGiftable]) -- -- /See:/ 'dictlayerDataDict' smart constructor.@@ -6870,6 +6971,7 @@ -- /See:/ 'volumeVolumeInfo' smart constructor. data VolumeVolumeInfo = VolumeVolumeInfo' { _vviImageLinks :: !(Maybe VolumeVolumeInfoImageLinks)+ , _vviPanelizationSummary :: !(Maybe VolumeVolumeInfoPanelizationSummary) , _vviAverageRating :: !(Maybe (Textual Double)) , _vviRatingsCount :: !(Maybe (Textual Int32)) , _vviCanonicalVolumeLink :: !(Maybe Text)@@ -6903,6 +7005,8 @@ -- -- * 'vviImageLinks' --+-- * 'vviPanelizationSummary'+-- -- * 'vviAverageRating' -- -- * 'vviRatingsCount'@@ -6957,6 +7061,7 @@ volumeVolumeInfo = VolumeVolumeInfo' { _vviImageLinks = Nothing+ , _vviPanelizationSummary = Nothing , _vviAverageRating = Nothing , _vviRatingsCount = Nothing , _vviCanonicalVolumeLink = Nothing@@ -6991,6 +7096,12 @@ = lens _vviImageLinks (\ s a -> s{_vviImageLinks = a}) +-- | A top-level summary of the panelization info in this volume.+vviPanelizationSummary :: Lens' VolumeVolumeInfo (Maybe VolumeVolumeInfoPanelizationSummary)+vviPanelizationSummary+ = lens _vviPanelizationSummary+ (\ s a -> s{_vviPanelizationSummary = a})+ -- | The mean review rating for this volume. (min = 1.0, max = 5.0) vviAverageRating :: Lens' VolumeVolumeInfo (Maybe Double) vviAverageRating@@ -7154,8 +7265,10 @@ = withObject "VolumeVolumeInfo" (\ o -> VolumeVolumeInfo' <$>- (o .:? "imageLinks") <*> (o .:? "averageRating") <*>- (o .:? "ratingsCount")+ (o .:? "imageLinks") <*>+ (o .:? "panelizationSummary")+ <*> (o .:? "averageRating")+ <*> (o .:? "ratingsCount") <*> (o .:? "canonicalVolumeLink") <*> (o .:? "readingModes") <*> (o .:? "industryIdentifiers" .!= mempty)@@ -7185,6 +7298,8 @@ = object (catMaybes [("imageLinks" .=) <$> _vviImageLinks,+ ("panelizationSummary" .=) <$>+ _vviPanelizationSummary, ("averageRating" .=) <$> _vviAverageRating, ("ratingsCount" .=) <$> _vviRatingsCount, ("canonicalVolumeLink" .=) <$>@@ -7454,6 +7569,44 @@ ("isSharingAllowed" .=) <$> _vuifsIsSharingAllowed, ("isSharingDisabledByFop" .=) <$> _vuifsIsSharingDisabledByFop])++--+-- /See:/ 'userSettingsNotificationMoreFromSeries' smart constructor.+newtype UserSettingsNotificationMoreFromSeries = UserSettingsNotificationMoreFromSeries'+ { _usnmfsOptedState :: Maybe Text+ } deriving (Eq,Show,Data,Typeable,Generic)++-- | Creates a value of 'UserSettingsNotificationMoreFromSeries' with the minimum fields required to make a request.+--+-- Use one of the following lenses to modify other fields as desired:+--+-- * 'usnmfsOptedState'+userSettingsNotificationMoreFromSeries+ :: UserSettingsNotificationMoreFromSeries+userSettingsNotificationMoreFromSeries =+ UserSettingsNotificationMoreFromSeries'+ { _usnmfsOptedState = Nothing+ }++usnmfsOptedState :: Lens' UserSettingsNotificationMoreFromSeries (Maybe Text)+usnmfsOptedState+ = lens _usnmfsOptedState+ (\ s a -> s{_usnmfsOptedState = a})++instance FromJSON+ UserSettingsNotificationMoreFromSeries where+ parseJSON+ = withObject "UserSettingsNotificationMoreFromSeries"+ (\ o ->+ UserSettingsNotificationMoreFromSeries' <$>+ (o .:? "opted_state"))++instance ToJSON+ UserSettingsNotificationMoreFromSeries where+ toJSON UserSettingsNotificationMoreFromSeries'{..}+ = object+ (catMaybes+ [("opted_state" .=) <$> _usnmfsOptedState]) -- -- /See:/ 'volumeVolumeInfoIndustryIdentifiersItem' smart constructor.
gen/Network/Google/Books/Types/Sum.hs view
@@ -500,9 +500,12 @@ instance ToJSON MyLibraryBookshelvesAddVolumeReason where toJSON = toJSONText --- | How the book was aquired+-- | How the book was acquired data VolumesMybooksListAcquireMethod- = PreOrdered+ = FamilyShared+ -- ^ @FAMILY_SHARED@+ -- Books acquired via Family Sharing+ | PreOrdered -- ^ @PREORDERED@ -- Preordered books (not yet available) | PreviouslyRented@@ -529,6 +532,7 @@ instance FromHttpApiData VolumesMybooksListAcquireMethod where parseQueryParam = \case+ "FAMILY_SHARED" -> Right FamilyShared "PREORDERED" -> Right PreOrdered "PREVIOUSLY_RENTED" -> Right PreviouslyRented "PUBLIC_DOMAIN" -> Right PublicDomain@@ -540,6 +544,7 @@ instance ToHttpApiData VolumesMybooksListAcquireMethod where toQueryParam = \case+ FamilyShared -> "FAMILY_SHARED" PreOrdered -> "PREORDERED" PreviouslyRented -> "PREVIOUSLY_RENTED" PublicDomain -> "PUBLIC_DOMAIN"@@ -735,4 +740,34 @@ parseJSON = parseJSONText "MyLibraryReadingPositionsSetPositionAction" instance ToJSON MyLibraryReadingPositionsSetPositionAction where+ toJSON = toJSONText++-- | The maximum allowed maturity rating of returned recommendations. Books+-- with a higher maturity rating are filtered out.+data VolumesListMaxAllowedMaturityRating+ = VLMAMRMature+ -- ^ @mature@+ -- Show books which are rated mature or lower.+ | VLMAMRNotMature+ -- ^ @not-mature@+ -- Show books which are rated not mature.+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)++instance Hashable VolumesListMaxAllowedMaturityRating++instance FromHttpApiData VolumesListMaxAllowedMaturityRating where+ parseQueryParam = \case+ "mature" -> Right VLMAMRMature+ "not-mature" -> Right VLMAMRNotMature+ x -> Left ("Unable to parse VolumesListMaxAllowedMaturityRating from: " <> x)++instance ToHttpApiData VolumesListMaxAllowedMaturityRating where+ toQueryParam = \case+ VLMAMRMature -> "mature"+ VLMAMRNotMature -> "not-mature"++instance FromJSON VolumesListMaxAllowedMaturityRating where+ parseJSON = parseJSONText "VolumesListMaxAllowedMaturityRating"++instance ToJSON VolumesListMaxAllowedMaturityRating where toJSON = toJSONText
gen/Network/Google/Resource/Books/Volumes/List.hs view
@@ -34,6 +34,7 @@ -- * Request Lenses , vlOrderBy+ , vlMaxAllowedMaturityRating , vlLibraryRestrict , vlPartner , vlQ@@ -59,40 +60,44 @@ "volumes" :> QueryParam "q" Text :> QueryParam "orderBy" VolumesListOrderBy :>- QueryParam "libraryRestrict"- VolumesListLibraryRestrict+ QueryParam "maxAllowedMaturityRating"+ VolumesListMaxAllowedMaturityRating :>- QueryParam "partner" Text :>- QueryParam "download" VolumesListDownload :>- QueryParam "source" Text :>- QueryParam "projection" VolumesListProjection :>- QueryParam "filter" VolumesListFilter :>- QueryParam "langRestrict" Text :>- QueryParam "startIndex" (Textual Word32) :>- QueryParam "maxResults" (Textual Word32) :>- QueryParam "showPreorders" Bool :>- QueryParam "printType" VolumesListPrintType- :>- QueryParam "alt" AltJSON :>- Get '[JSON] Volumes+ QueryParam "libraryRestrict"+ VolumesListLibraryRestrict+ :>+ QueryParam "partner" Text :>+ QueryParam "download" VolumesListDownload :>+ QueryParam "source" Text :>+ QueryParam "projection" VolumesListProjection :>+ QueryParam "filter" VolumesListFilter :>+ QueryParam "langRestrict" Text :>+ QueryParam "startIndex" (Textual Word32) :>+ QueryParam "maxResults" (Textual Word32) :>+ QueryParam "showPreorders" Bool :>+ QueryParam "printType" VolumesListPrintType+ :>+ QueryParam "alt" AltJSON :>+ Get '[JSON] Volumes -- | Performs a book search. -- -- /See:/ 'volumesList' smart constructor. data VolumesList = VolumesList'- { _vlOrderBy :: !(Maybe VolumesListOrderBy)- , _vlLibraryRestrict :: !(Maybe VolumesListLibraryRestrict)- , _vlPartner :: !(Maybe Text)- , _vlQ :: !Text- , _vlDownload :: !(Maybe VolumesListDownload)- , _vlSource :: !(Maybe Text)- , _vlProjection :: !(Maybe VolumesListProjection)- , _vlFilter :: !(Maybe VolumesListFilter)- , _vlLangRestrict :: !(Maybe Text)- , _vlStartIndex :: !(Maybe (Textual Word32))- , _vlMaxResults :: !(Maybe (Textual Word32))- , _vlShowPreOrders :: !(Maybe Bool)- , _vlPrintType :: !(Maybe VolumesListPrintType)+ { _vlOrderBy :: !(Maybe VolumesListOrderBy)+ , _vlMaxAllowedMaturityRating :: !(Maybe VolumesListMaxAllowedMaturityRating)+ , _vlLibraryRestrict :: !(Maybe VolumesListLibraryRestrict)+ , _vlPartner :: !(Maybe Text)+ , _vlQ :: !Text+ , _vlDownload :: !(Maybe VolumesListDownload)+ , _vlSource :: !(Maybe Text)+ , _vlProjection :: !(Maybe VolumesListProjection)+ , _vlFilter :: !(Maybe VolumesListFilter)+ , _vlLangRestrict :: !(Maybe Text)+ , _vlStartIndex :: !(Maybe (Textual Word32))+ , _vlMaxResults :: !(Maybe (Textual Word32))+ , _vlShowPreOrders :: !(Maybe Bool)+ , _vlPrintType :: !(Maybe VolumesListPrintType) } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'VolumesList' with the minimum fields required to make a request.@@ -101,6 +106,8 @@ -- -- * 'vlOrderBy' --+-- * 'vlMaxAllowedMaturityRating'+-- -- * 'vlLibraryRestrict' -- -- * 'vlPartner'@@ -130,6 +137,7 @@ volumesList pVlQ_ = VolumesList' { _vlOrderBy = Nothing+ , _vlMaxAllowedMaturityRating = Nothing , _vlLibraryRestrict = Nothing , _vlPartner = Nothing , _vlQ = pVlQ_@@ -149,6 +157,13 @@ vlOrderBy = lens _vlOrderBy (\ s a -> s{_vlOrderBy = a}) +-- | The maximum allowed maturity rating of returned recommendations. Books+-- with a higher maturity rating are filtered out.+vlMaxAllowedMaturityRating :: Lens' VolumesList (Maybe VolumesListMaxAllowedMaturityRating)+vlMaxAllowedMaturityRating+ = lens _vlMaxAllowedMaturityRating+ (\ s a -> s{_vlMaxAllowedMaturityRating = a})+ -- | Restrict search to this user\'s library. vlLibraryRestrict :: Lens' VolumesList (Maybe VolumesListLibraryRestrict) vlLibraryRestrict@@ -216,7 +231,9 @@ type Scopes VolumesList = '["https://www.googleapis.com/auth/books"] requestClient VolumesList'{..}- = go (Just _vlQ) _vlOrderBy _vlLibraryRestrict+ = go (Just _vlQ) _vlOrderBy+ _vlMaxAllowedMaturityRating+ _vlLibraryRestrict _vlPartner _vlDownload _vlSource
gen/Network/Google/Resource/Books/Volumes/Mybooks/List.hs view
@@ -117,7 +117,7 @@ . _Default . _Coerce --- | How the book was aquired+-- | How the book was acquired vmlAcquireMethod :: Lens' VolumesMybooksList [VolumesMybooksListAcquireMethod] vmlAcquireMethod = lens _vmlAcquireMethod
gogol-books.cabal view
@@ -1,5 +1,5 @@ name: gogol-books-version: 0.1.0+version: 0.1.1 synopsis: Google Books SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues@@ -11,10 +11,10 @@ category: Network, Google, Cloud build-type: Simple cabal-version: >= 1.10-extra-source-files: README.md+extra-source-files: README.md src/.gitkeep description:- Lets you search for books and manage your Google Books library.+ Searches for books and manages your Google Books library. . /Warning:/ This is an experimental prototype/preview release which is still under exploratory development and not intended for public use, caveat emptor!@@ -89,5 +89,5 @@ , Network.Google.Books.Types.Sum build-depends:- gogol-core == 0.1.0.*+ gogol-core == 0.1.1.* , base >= 4.7 && < 5
+ src/.gitkeep view