gogol-fonts 0.0.1 → 0.1.0
raw patch · 7 files changed
+45/−39 lines, 7 filesdep ~gogol-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: gogol-core
API changes (from Hackage documentation)
- Network.Google.Resource.Webfonts.Webfonts.List: instance GHC.Generics.Constructor Network.Google.Resource.Webfonts.Webfonts.List.C1_0WebfontsList
- Network.Google.Resource.Webfonts.Webfonts.List: instance GHC.Generics.Datatype Network.Google.Resource.Webfonts.Webfonts.List.D1WebfontsList
- Network.Google.Resource.Webfonts.Webfonts.List: instance GHC.Generics.Selector Network.Google.Resource.Webfonts.Webfonts.List.S1_0_0WebfontsList
- Network.Google.Fonts: fontsService :: Service
+ Network.Google.Fonts: fontsService :: ServiceConfig
- Network.Google.Fonts.Types: fontsService :: Service
+ Network.Google.Fonts.Types: fontsService :: ServiceConfig
Files
- README.md +3/−3
- gen/Network/Google/Fonts.hs +4/−2
- gen/Network/Google/Fonts/Types.hs +3/−2
- gen/Network/Google/Fonts/Types/Product.hs +12/−12
- gen/Network/Google/Fonts/Types/Sum.hs +12/−12
- gen/Network/Google/Resource/Webfonts/Webfonts/List.hs +5/−4
- gogol-fonts.cabal +6/−4
README.md view
@@ -8,7 +8,7 @@ ## Version -`0.0.1`+`0.1.0` ## Description@@ -18,9 +18,9 @@ ## Contribute -For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/amazonka/issues).+For any problems, comments, or feedback please create an issue [here on GitHub](https://github.com/brendanhay/gogol/issues). -> _Note:_ this library is an auto-generated Haskell package. Please see `amazonka-gen` for more information.+> _Note:_ this library is an auto-generated Haskell package. Please see `gogol-gen` for more information. ## Licence
gen/Network/Google/Fonts.hs view
@@ -7,13 +7,15 @@ -- | -- Module : Network.Google.Fonts--- Copyright : (c) 2015 Brendan Hay+-- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated -- Portability : non-portable (GHC extensions) ----- The Google Fonts Developer API.+-- Accesses the metadata for all families served by Google Fonts, providing+-- a list of families currently available (including available styles and a+-- list of supported script subsets). -- -- /See:/ <https://developers.google.com/fonts/docs/developer_api Google Fonts Developer API Reference> module Network.Google.Fonts
gen/Network/Google/Fonts/Types.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-}@@ -7,7 +8,7 @@ -- | -- Module : Network.Google.Fonts.Types--- Copyright : (c) 2015 Brendan Hay+-- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated@@ -50,7 +51,7 @@ import Network.Google.Prelude -- | Default request referring to version 'v1' of the Google Fonts Developer API. This contains the host and root path used as a starting point for constructing service requests.-fontsService :: Service+fontsService :: ServiceConfig fontsService = defaultService (ServiceId "webfonts:v1") "www.googleapis.com"
gen/Network/Google/Fonts/Types/Product.hs view
@@ -9,7 +9,7 @@ -- | -- Module : Network.Google.Fonts.Types.Product--- Copyright : (c) 2015 Brendan Hay+-- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated@@ -22,7 +22,7 @@ -- -- /See:/ 'webfont' smart constructor.-data Webfont = Webfont+data Webfont = Webfont' { _wVariants :: !(Maybe [Text]) , _wKind :: !Text , _wCategory :: !(Maybe Text)@@ -55,7 +55,7 @@ webfont :: Webfont webfont =- Webfont+ Webfont' { _wVariants = Nothing , _wKind = "webfonts#webfont" , _wCategory = Nothing@@ -114,7 +114,7 @@ parseJSON = withObject "Webfont" (\ o ->- Webfont <$>+ Webfont' <$> (o .:? "variants" .!= mempty) <*> (o .:? "kind" .!= "webfonts#webfont") <*> (o .:? "category")@@ -125,7 +125,7 @@ <*> (o .:? "lastModified")) instance ToJSON Webfont where- toJSON Webfont{..}+ toJSON Webfont'{..} = object (catMaybes [("variants" .=) <$> _wVariants,@@ -139,7 +139,7 @@ -- -- /See:/ 'webfontList' smart constructor.-data WebfontList = WebfontList+data WebfontList = WebfontList' { _wlKind :: !Text , _wlItems :: !(Maybe [Webfont]) } deriving (Eq,Show,Data,Typeable,Generic)@@ -154,7 +154,7 @@ webfontList :: WebfontList webfontList =- WebfontList+ WebfontList' { _wlKind = "webfonts#webfontList" , _wlItems = Nothing }@@ -173,12 +173,12 @@ parseJSON = withObject "WebfontList" (\ o ->- WebfontList <$>+ WebfontList' <$> (o .:? "kind" .!= "webfonts#webfontList") <*> (o .:? "items" .!= mempty)) instance ToJSON WebfontList where- toJSON WebfontList{..}+ toJSON WebfontList'{..} = object (catMaybes [Just ("kind" .= _wlKind),@@ -188,7 +188,7 @@ -- available variants, as a key : value map. -- -- /See:/ 'webfontFiles' smart constructor.-newtype WebfontFiles = WebfontFiles+newtype WebfontFiles = WebfontFiles' { _wfAddtional :: HashMap Text Text } deriving (Eq,Show,Data,Typeable,Generic) @@ -201,7 +201,7 @@ :: HashMap Text Text -- ^ 'wfAddtional' -> WebfontFiles webfontFiles pWfAddtional_ =- WebfontFiles+ WebfontFiles' { _wfAddtional = _Coerce # pWfAddtional_ } @@ -214,7 +214,7 @@ instance FromJSON WebfontFiles where parseJSON = withObject "WebfontFiles"- (\ o -> WebfontFiles <$> (parseJSONObject o))+ (\ o -> WebfontFiles' <$> (parseJSONObject o)) instance ToJSON WebfontFiles where toJSON = toJSON . _wfAddtional
gen/Network/Google/Fonts/Types/Sum.hs view
@@ -8,7 +8,7 @@ -- | -- Module : Network.Google.Fonts.Types.Sum--- Copyright : (c) 2015 Brendan Hay+-- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated@@ -35,21 +35,21 @@ | Trending -- ^ @trending@ -- Sort by trending- deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) instance Hashable WebfontsListSort -instance FromText WebfontsListSort where- fromText = \case- "alpha" -> Just Alpha- "date" -> Just Date- "popularity" -> Just Popularity- "style" -> Just Style- "trending" -> Just Trending- _ -> Nothing+instance FromHttpApiData WebfontsListSort where+ parseQueryParam = \case+ "alpha" -> Right Alpha+ "date" -> Right Date+ "popularity" -> Right Popularity+ "style" -> Right Style+ "trending" -> Right Trending+ x -> Left ("Unable to parse WebfontsListSort from: " <> x) -instance ToText WebfontsListSort where- toText = \case+instance ToHttpApiData WebfontsListSort where+ toQueryParam = \case Alpha -> "alpha" Date -> "date" Popularity -> "popularity"
gen/Network/Google/Resource/Webfonts/Webfonts/List.hs view
@@ -14,7 +14,7 @@ -- | -- Module : Network.Google.Resource.Webfonts.Webfonts.List--- Copyright : (c) 2015 Brendan Hay+-- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay <brendan.g.hay@gmail.com> -- Stability : auto-generated@@ -53,7 +53,7 @@ -- Developer API -- -- /See:/ 'webfontsList' smart constructor.-newtype WebfontsList = WebfontsList+newtype WebfontsList = WebfontsList' { _wlSort :: Maybe WebfontsListSort } deriving (Eq,Show,Data,Typeable,Generic) @@ -65,7 +65,7 @@ webfontsList :: WebfontsList webfontsList =- WebfontsList+ WebfontsList' { _wlSort = Nothing } @@ -75,7 +75,8 @@ instance GoogleRequest WebfontsList where type Rs WebfontsList = WebfontList- requestClient WebfontsList{..}+ type Scopes WebfontsList = '[]+ requestClient WebfontsList'{..} = go _wlSort (Just AltJSON) fontsService where go = buildClient (Proxy :: Proxy WebfontsListResource)
gogol-fonts.cabal view
@@ -1,5 +1,5 @@ name: gogol-fonts-version: 0.0.1+version: 0.1.0 synopsis: Google Fonts Developer SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues@@ -7,14 +7,16 @@ license-file: LICENSE author: Brendan Hay maintainer: Brendan Hay <brendan.g.hay@gmail.com>-copyright: Copyright (c) 2015 Brendan Hay+copyright: Copyright (c) 2015-2016 Brendan Hay category: Network, Google, Cloud build-type: Simple cabal-version: >= 1.10 extra-source-files: README.md description:- The Google Fonts Developer API.+ Accesses the metadata for all families served by Google Fonts, providing+ a list of families currently available (including available styles and a+ list of supported script subsets). . /Warning:/ This is an experimental prototype/preview release which is still under exploratory development and not intended for public use, caveat emptor!@@ -42,5 +44,5 @@ , Network.Google.Fonts.Types.Sum build-depends:- gogol-core == 0.0.1.*+ gogol-core == 0.1.0.* , base >= 4.7 && < 5