packages feed

gogol-fonts 0.5.0 → 1.0.0

raw patch · 13 files changed

+714/−544 lines, 13 filesdep −basedep ~gogol-coresetup-changed

Dependencies removed: base

Dependency ranges changed: gogol-core

Files

README.md view
@@ -8,12 +8,12 @@  ## Version -`0.5.0`+`1.0.0`   ## Description -A client library for the Google Fonts Developer.+A client library for the Google Web Fonts Developer.   ## Contribute
Setup.hs view
@@ -1,2 +1,3 @@-import           Distribution.Simple+import Distribution.Simple+ main = defaultMain
+ gen/Gogol/Fonts.hs view
@@ -0,0 +1,71 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module      : Gogol.Fonts+-- Copyright   : (c) 2015-2025 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>+--               Toni Cebrián <toni@tonicebrian.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.+--+-- /See:/ <https://developers.google.com/fonts/docs/developer_api Web Fonts Developer API Reference>+module Gogol.Fonts+  ( -- * Configuration+    fontsService,++    -- * Resources++    -- ** webfonts.webfonts.list+    WebfontsWebfontsListResource,+    WebfontsWebfontsList (..),+    newWebfontsWebfontsList,++    -- * Types++    -- ** Xgafv+    Xgafv (..),++    -- ** Axis+    Axis (..),+    newAxis,++    -- ** Webfont+    Webfont (..),+    newWebfont,++    -- ** Webfont_Files+    Webfont_Files (..),+    newWebfont_Files,++    -- ** WebfontList+    WebfontList (..),+    newWebfontList,++    -- ** WebfontsListCapability+    WebfontsListCapability (..),++    -- ** WebfontsListSort+    WebfontsListSort (..),+  )+where++import Gogol.Fonts.Types+import Gogol.Fonts.Webfonts.List
+ gen/Gogol/Fonts/Internal/Product.hs view
@@ -0,0 +1,233 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module      : Gogol.Fonts.Internal.Product+-- Copyright   : (c) 2015-2025 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>+--               Toni Cebrián <toni@tonicebrian.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Gogol.Fonts.Internal.Product+  ( -- * Axis+    Axis (..),+    newAxis,++    -- * Webfont+    Webfont (..),+    newWebfont,++    -- * Webfont_Files+    Webfont_Files (..),+    newWebfont_Files,++    -- * WebfontList+    WebfontList (..),+    newWebfontList,+  )+where++import Gogol.Fonts.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Metadata for a variable font axis.+--+-- /See:/ 'newAxis' smart constructor.+data Axis = Axis+  { -- | maximum value+    end :: (Core.Maybe Core.Double),+    -- | minimum value+    start :: (Core.Maybe Core.Double),+    -- | tag name.+    tag :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Axis' with the minimum fields required to make a request.+newAxis ::+  Axis+newAxis =+  Axis+    { end = Core.Nothing,+      start = Core.Nothing,+      tag = Core.Nothing+    }++instance Core.FromJSON Axis where+  parseJSON =+    Core.withObject+      "Axis"+      ( \o ->+          Axis+            Core.<$> (o Core..:? "end")+            Core.<*> (o Core..:? "start")+            Core.<*> (o Core..:? "tag")+      )++instance Core.ToJSON Axis where+  toJSON Axis {..} =+    Core.object+      ( Core.catMaybes+          [ ("end" Core..=) Core.<$> end,+            ("start" Core..=) Core.<$> start,+            ("tag" Core..=) Core.<$> tag+          ]+      )++-- | Metadata describing a family of fonts.+--+-- /See:/ 'newWebfont' smart constructor.+data Webfont = Webfont+  { -- | Axis for variable fonts.+    axes :: (Core.Maybe [Axis]),+    -- | The category of the font.+    category :: (Core.Maybe Core.Text),+    -- | The color format(s) available for this family.+    colorCapabilities :: (Core.Maybe [Core.Text]),+    -- | The name of the font.+    family :: (Core.Maybe Core.Text),+    -- | The font files (with all supported scripts) for each one of the available variants, as a key : value map.+    files :: (Core.Maybe Webfont_Files),+    -- | This kind represents a webfont object in the webfonts service.+    kind :: (Core.Maybe Core.Text),+    -- | The date (format \"yyyy-MM-dd\") the font was modified for the last time.+    lastModified :: (Core.Maybe Core.Text),+    -- | Font URL for menu subset, a subset of the font that is enough to display the font name+    menu :: (Core.Maybe Core.Text),+    -- | The scripts supported by the font.+    subsets :: (Core.Maybe [Core.Text]),+    -- | The available variants for the font.+    variants :: (Core.Maybe [Core.Text]),+    -- | The font version.+    version :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Webfont' with the minimum fields required to make a request.+newWebfont ::+  Webfont+newWebfont =+  Webfont+    { axes = Core.Nothing,+      category = Core.Nothing,+      colorCapabilities = Core.Nothing,+      family = Core.Nothing,+      files = Core.Nothing,+      kind = Core.Nothing,+      lastModified = Core.Nothing,+      menu = Core.Nothing,+      subsets = Core.Nothing,+      variants = Core.Nothing,+      version = Core.Nothing+    }++instance Core.FromJSON Webfont where+  parseJSON =+    Core.withObject+      "Webfont"+      ( \o ->+          Webfont+            Core.<$> (o Core..:? "axes")+            Core.<*> (o Core..:? "category")+            Core.<*> (o Core..:? "colorCapabilities")+            Core.<*> (o Core..:? "family")+            Core.<*> (o Core..:? "files")+            Core.<*> (o Core..:? "kind")+            Core.<*> (o Core..:? "lastModified")+            Core.<*> (o Core..:? "menu")+            Core.<*> (o Core..:? "subsets")+            Core.<*> (o Core..:? "variants")+            Core.<*> (o Core..:? "version")+      )++instance Core.ToJSON Webfont where+  toJSON Webfont {..} =+    Core.object+      ( Core.catMaybes+          [ ("axes" Core..=) Core.<$> axes,+            ("category" Core..=) Core.<$> category,+            ("colorCapabilities" Core..=) Core.<$> colorCapabilities,+            ("family" Core..=) Core.<$> family,+            ("files" Core..=) Core.<$> files,+            ("kind" Core..=) Core.<$> kind,+            ("lastModified" Core..=) Core.<$> lastModified,+            ("menu" Core..=) Core.<$> menu,+            ("subsets" Core..=) Core.<$> subsets,+            ("variants" Core..=) Core.<$> variants,+            ("version" Core..=) Core.<$> version+          ]+      )++-- | The font files (with all supported scripts) for each one of the available variants, as a key : value map.+--+-- /See:/ 'newWebfont_Files' smart constructor.+newtype Webfont_Files = Webfont_Files+  { additional :: (Core.HashMap Core.Text Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'Webfont_Files' with the minimum fields required to make a request.+newWebfont_Files ::+  -- |  See 'additional'.+  Core.HashMap Core.Text Core.Text ->+  Webfont_Files+newWebfont_Files additional =+  Webfont_Files {additional = additional}++instance Core.FromJSON Webfont_Files where+  parseJSON =+    Core.withObject+      "Webfont_Files"+      (\o -> Webfont_Files Core.<$> (Core.parseJSONObject o))++instance Core.ToJSON Webfont_Files where+  toJSON Webfont_Files {..} = Core.toJSON additional++-- | Response containing the list of fonts currently served by the Google Fonts API.+--+-- /See:/ 'newWebfontList' smart constructor.+data WebfontList = WebfontList+  { -- | The list of fonts currently served by the Google Fonts API.+    items :: (Core.Maybe [Webfont]),+    -- | This kind represents a list of webfont objects in the webfonts service.+    kind :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'WebfontList' with the minimum fields required to make a request.+newWebfontList ::+  WebfontList+newWebfontList =+  WebfontList {items = Core.Nothing, kind = Core.Nothing}++instance Core.FromJSON WebfontList where+  parseJSON =+    Core.withObject+      "WebfontList"+      ( \o ->+          WebfontList+            Core.<$> (o Core..:? "items")+            Core.<*> (o Core..:? "kind")+      )++instance Core.ToJSON WebfontList where+  toJSON WebfontList {..} =+    Core.object+      ( Core.catMaybes+          [("items" Core..=) Core.<$> items, ("kind" Core..=) Core.<$> kind]+      )
+ gen/Gogol/Fonts/Internal/Sum.hs view
@@ -0,0 +1,161 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module      : Gogol.Fonts.Internal.Sum+-- Copyright   : (c) 2015-2025 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>+--               Toni Cebrián <toni@tonicebrian.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Gogol.Fonts.Internal.Sum+  ( -- * Xgafv+    Xgafv+      ( Xgafv_1,+        Xgafv_2,+        ..+      ),++    -- * WebfontsListCapability+    WebfontsListCapability+      ( WebfontsListCapability_CAPABILITYUNSPECIFIED,+        WebfontsListCapability_WOFF2,+        WebfontsListCapability_VF,+        ..+      ),++    -- * WebfontsListSort+    WebfontsListSort+      ( WebfontsListSort_SORTUNDEFINED,+        WebfontsListSort_Alpha,+        WebfontsListSort_Date,+        WebfontsListSort_Popularity,+        WebfontsListSort_Style,+        WebfontsListSort_Trending,+        ..+      ),+  )+where++import Gogol.Prelude qualified as Core++-- | V1 error format.+newtype Xgafv = Xgafv {fromXgafv :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | v1 error format+pattern Xgafv_1 :: Xgafv+pattern Xgafv_1 = Xgafv "1"++-- | v2 error format+pattern Xgafv_2 :: Xgafv+pattern Xgafv_2 = Xgafv "2"++{-# COMPLETE+  Xgafv_1,+  Xgafv_2,+  Xgafv+  #-}++-- | Controls the font urls in @Webfont.files@, by default, static ttf fonts are sent.+newtype WebfontsListCapability = WebfontsListCapability {fromWebfontsListCapability :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | Default means static ttf fonts.+pattern WebfontsListCapability_CAPABILITYUNSPECIFIED :: WebfontsListCapability+pattern WebfontsListCapability_CAPABILITYUNSPECIFIED = WebfontsListCapability "CAPABILITY_UNSPECIFIED"++-- | Use WOFF2(Compressed)instead of ttf.+pattern WebfontsListCapability_WOFF2 :: WebfontsListCapability+pattern WebfontsListCapability_WOFF2 = WebfontsListCapability "WOFF2"++-- | Prefer variable font files instead of static fonts instantiated at standard weights.+pattern WebfontsListCapability_VF :: WebfontsListCapability+pattern WebfontsListCapability_VF = WebfontsListCapability "VF"++{-# COMPLETE+  WebfontsListCapability_CAPABILITYUNSPECIFIED,+  WebfontsListCapability_WOFF2,+  WebfontsListCapability_VF,+  WebfontsListCapability+  #-}++-- | Enables sorting of the list.+newtype WebfontsListSort = WebfontsListSort {fromWebfontsListSort :: Core.Text}+  deriving stock (Core.Show, Core.Read, Core.Eq, Core.Ord, Core.Generic)+  deriving newtype+    ( Core.Hashable,+      Core.ToHttpApiData,+      Core.FromHttpApiData,+      Core.ToJSON,+      Core.ToJSONKey,+      Core.FromJSON,+      Core.FromJSONKey+    )++-- | No sorting specified, use the default sorting method.+pattern WebfontsListSort_SORTUNDEFINED :: WebfontsListSort+pattern WebfontsListSort_SORTUNDEFINED = WebfontsListSort "SORT_UNDEFINED"++-- | Sort alphabetically+pattern WebfontsListSort_Alpha :: WebfontsListSort+pattern WebfontsListSort_Alpha = WebfontsListSort "ALPHA"++-- | Sort by date added+pattern WebfontsListSort_Date :: WebfontsListSort+pattern WebfontsListSort_Date = WebfontsListSort "DATE"++-- | Sort by popularity+pattern WebfontsListSort_Popularity :: WebfontsListSort+pattern WebfontsListSort_Popularity = WebfontsListSort "POPULARITY"++-- | Sort by number of styles+pattern WebfontsListSort_Style :: WebfontsListSort+pattern WebfontsListSort_Style = WebfontsListSort "STYLE"++-- | Sort by trending+pattern WebfontsListSort_Trending :: WebfontsListSort+pattern WebfontsListSort_Trending = WebfontsListSort "TRENDING"++{-# COMPLETE+  WebfontsListSort_SORTUNDEFINED,+  WebfontsListSort_Alpha,+  WebfontsListSort_Date,+  WebfontsListSort_Popularity,+  WebfontsListSort_Style,+  WebfontsListSort_Trending,+  WebfontsListSort+  #-}
+ gen/Gogol/Fonts/Types.hs view
@@ -0,0 +1,68 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module      : Gogol.Fonts.Types+-- Copyright   : (c) 2015-2025 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>+--               Toni Cebrián <toni@tonicebrian.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+module Gogol.Fonts.Types+  ( -- * Configuration+    fontsService,++    -- * Types++    -- ** Xgafv+    Xgafv (..),++    -- ** Axis+    Axis (..),+    newAxis,++    -- ** Webfont+    Webfont (..),+    newWebfont,++    -- ** Webfont_Files+    Webfont_Files (..),+    newWebfont_Files,++    -- ** WebfontList+    WebfontList (..),+    newWebfontList,++    -- ** WebfontsListCapability+    WebfontsListCapability (..),++    -- ** WebfontsListSort+    WebfontsListSort (..),+  )+where++import Gogol.Fonts.Internal.Product+import Gogol.Fonts.Internal.Sum+import Gogol.Prelude qualified as Core++-- | Default request referring to version @v1@ of the Web Fonts Developer API. This contains the host and root path used as a starting point for constructing service requests.+fontsService :: Core.ServiceConfig+fontsService =+  Core.defaultService+    (Core.ServiceId "webfonts:v1")+    "webfonts.googleapis.com"
+ gen/Gogol/Fonts/Webfonts/List.hs view
@@ -0,0 +1,126 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE DuplicateRecordFields #-}+{-# LANGUAGE ImportQualifiedPost #-}+{-# LANGUAGE LambdaCase #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE PatternSynonyms #-}+{-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE StrictData #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE NoImplicitPrelude #-}+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}+{-# OPTIONS_GHC -fno-warn-name-shadowing #-}+{-# OPTIONS_GHC -fno-warn-unused-binds #-}+{-# OPTIONS_GHC -fno-warn-unused-imports #-}+{-# OPTIONS_GHC -fno-warn-unused-matches #-}++-- |+-- Module      : Gogol.Fonts.Webfonts.List+-- Copyright   : (c) 2015-2025 Brendan Hay+-- License     : Mozilla Public License, v. 2.0.+-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>+--               Toni Cebrián <toni@tonicebrian.com>+-- Stability   : auto-generated+-- Portability : non-portable (GHC extensions)+--+-- Retrieves the list of fonts currently served by the Google Fonts Developer API.+--+-- /See:/ <https://developers.google.com/fonts/docs/developer_api Web Fonts Developer API Reference> for @webfonts.webfonts.list@.+module Gogol.Fonts.Webfonts.List+  ( -- * Resource+    WebfontsWebfontsListResource,++    -- ** Constructing a Request+    WebfontsWebfontsList (..),+    newWebfontsWebfontsList,+  )+where++import Gogol.Fonts.Types+import Gogol.Prelude qualified as Core++-- | A resource alias for @webfonts.webfonts.list@ method which the+-- 'WebfontsWebfontsList' request conforms to.+type WebfontsWebfontsListResource =+  "v1"+    Core.:> "webfonts"+    Core.:> Core.QueryParam "$.xgafv" Xgafv+    Core.:> Core.QueryParam "access_token" Core.Text+    Core.:> Core.QueryParam "callback" Core.Text+    Core.:> Core.QueryParams "capability" WebfontsListCapability+    Core.:> Core.QueryParam "category" Core.Text+    Core.:> Core.QueryParams "family" Core.Text+    Core.:> Core.QueryParam "sort" WebfontsListSort+    Core.:> Core.QueryParam "subset" Core.Text+    Core.:> Core.QueryParam "uploadType" Core.Text+    Core.:> Core.QueryParam "upload_protocol" Core.Text+    Core.:> Core.QueryParam "alt" Core.AltJSON+    Core.:> Core.Get '[Core.JSON] WebfontList++-- | Retrieves the list of fonts currently served by the Google Fonts Developer API.+--+-- /See:/ 'newWebfontsWebfontsList' smart constructor.+data WebfontsWebfontsList = WebfontsWebfontsList+  { -- | V1 error format.+    xgafv :: (Core.Maybe Xgafv),+    -- | OAuth access token.+    accessToken :: (Core.Maybe Core.Text),+    -- | JSONP+    callback :: (Core.Maybe Core.Text),+    -- | Controls the font urls in @Webfont.files@, by default, static ttf fonts are sent.+    capability :: (Core.Maybe [WebfontsListCapability]),+    -- | Filters by Webfont.category, if category is found in Webfont.categories. If not set, returns all families.+    category :: (Core.Maybe Core.Text),+    -- | Filters by Webfont.family, using literal match. If not set, returns all families+    family :: (Core.Maybe [Core.Text]),+    -- | Enables sorting of the list.+    sort :: (Core.Maybe WebfontsListSort),+    -- | Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.+    subset :: (Core.Maybe Core.Text),+    -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").+    uploadType :: (Core.Maybe Core.Text),+    -- | Upload protocol for media (e.g. \"raw\", \"multipart\").+    uploadProtocol :: (Core.Maybe Core.Text)+  }+  deriving (Core.Eq, Core.Show, Core.Generic)++-- | Creates a value of 'WebfontsWebfontsList' with the minimum fields required to make a request.+newWebfontsWebfontsList ::+  WebfontsWebfontsList+newWebfontsWebfontsList =+  WebfontsWebfontsList+    { xgafv = Core.Nothing,+      accessToken = Core.Nothing,+      callback = Core.Nothing,+      capability = Core.Nothing,+      category = Core.Nothing,+      family = Core.Nothing,+      sort = Core.Nothing,+      subset = Core.Nothing,+      uploadType = Core.Nothing,+      uploadProtocol = Core.Nothing+    }++instance Core.GoogleRequest WebfontsWebfontsList where+  type Rs WebfontsWebfontsList = WebfontList+  type Scopes WebfontsWebfontsList = '[]+  requestClient WebfontsWebfontsList {..} =+    go+      xgafv+      accessToken+      callback+      (capability Core.^. Core._Default)+      category+      (family Core.^. Core._Default)+      sort+      subset+      uploadType+      uploadProtocol+      (Core.Just Core.AltJSON)+      fontsService+    where+      go =+        Core.buildClient+          (Core.Proxy :: Core.Proxy WebfontsWebfontsListResource)+          Core.mempty
− gen/Network/Google/Fonts.hs
@@ -1,72 +0,0 @@-{-# LANGUAGE DataKinds         #-}-{-# LANGUAGE NoImplicitPrelude #-}-{-# LANGUAGE TypeOperators     #-}--{-# OPTIONS_GHC -fno-warn-unused-imports    #-}-{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}---- |--- Module      : Network.Google.Fonts--- 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)------ 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-    (-    -- * Service Configuration-      fontsService--    -- * API Declaration-    , FontsAPI--    -- * Resources--    -- ** webfonts.webfonts.list-    , module Network.Google.Resource.Webfonts.Webfonts.List--    -- * Types--    -- ** Webfont-    , Webfont-    , webfont-    , wVariants-    , wKind-    , wCategory-    , wFamily-    , wVersion-    , wFiles-    , wSubSets-    , wLastModified--    -- ** WebfontList-    , WebfontList-    , webfontList-    , wlKind-    , wlItems--    -- ** WebfontsListSort-    , WebfontsListSort (..)--    -- ** WebfontFiles-    , WebfontFiles-    , webfontFiles-    , wfAddtional-    ) where--import           Network.Google.Fonts.Types-import           Network.Google.Prelude-import           Network.Google.Resource.Webfonts.Webfonts.List--{- $resources-TODO--}---- | Represents the entirety of the methods and resources available for the Google Fonts Developer API service.-type FontsAPI = WebfontsListResource
− gen/Network/Google/Fonts/Types.hs
@@ -1,57 +0,0 @@-{-# LANGUAGE DataKinds          #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.Fonts.Types--- 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)----module Network.Google.Fonts.Types-    (-    -- * Service Configuration-      fontsService--    -- * Webfont-    , Webfont-    , webfont-    , wVariants-    , wKind-    , wCategory-    , wFamily-    , wVersion-    , wFiles-    , wSubSets-    , wLastModified--    -- * WebfontList-    , WebfontList-    , webfontList-    , wlKind-    , wlItems--    -- * WebfontsListSort-    , WebfontsListSort (..)--    -- * WebfontFiles-    , WebfontFiles-    , webfontFiles-    , wfAddtional-    ) where--import           Network.Google.Fonts.Types.Product-import           Network.Google.Fonts.Types.Sum-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 :: ServiceConfig-fontsService-  = defaultService (ServiceId "webfonts:v1")-      "www.googleapis.com"
− gen/Network/Google/Fonts/Types/Product.hs
@@ -1,227 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}--{-# OPTIONS_GHC -fno-warn-unused-binds   #-}-{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.Fonts.Types.Product--- 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)----module Network.Google.Fonts.Types.Product where--import           Network.Google.Fonts.Types.Sum-import           Network.Google.Prelude------- /See:/ 'webfont' smart constructor.-data Webfont =-  Webfont'-    { _wVariants     :: !(Maybe [Text])-    , _wKind         :: !Text-    , _wCategory     :: !(Maybe Text)-    , _wFamily       :: !(Maybe Text)-    , _wVersion      :: !(Maybe Text)-    , _wFiles        :: !(Maybe WebfontFiles)-    , _wSubSets      :: !(Maybe [Text])-    , _wLastModified :: !(Maybe Date')-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'Webfont' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'wVariants'------ * 'wKind'------ * 'wCategory'------ * 'wFamily'------ * 'wVersion'------ * 'wFiles'------ * 'wSubSets'------ * 'wLastModified'-webfont-    :: Webfont-webfont =-  Webfont'-    { _wVariants = Nothing-    , _wKind = "webfonts#webfont"-    , _wCategory = Nothing-    , _wFamily = Nothing-    , _wVersion = Nothing-    , _wFiles = Nothing-    , _wSubSets = Nothing-    , _wLastModified = Nothing-    }----- | The available variants for the font.-wVariants :: Lens' Webfont [Text]-wVariants-  = lens _wVariants (\ s a -> s{_wVariants = a}) .-      _Default-      . _Coerce---- | This kind represents a webfont object in the webfonts service.-wKind :: Lens' Webfont Text-wKind = lens _wKind (\ s a -> s{_wKind = a})---- | The category of the font.-wCategory :: Lens' Webfont (Maybe Text)-wCategory-  = lens _wCategory (\ s a -> s{_wCategory = a})---- | The name of the font.-wFamily :: Lens' Webfont (Maybe Text)-wFamily = lens _wFamily (\ s a -> s{_wFamily = a})---- | The font version.-wVersion :: Lens' Webfont (Maybe Text)-wVersion = lens _wVersion (\ s a -> s{_wVersion = a})---- | The font files (with all supported scripts) for each one of the--- available variants, as a key : value map.-wFiles :: Lens' Webfont (Maybe WebfontFiles)-wFiles = lens _wFiles (\ s a -> s{_wFiles = a})---- | The scripts supported by the font.-wSubSets :: Lens' Webfont [Text]-wSubSets-  = lens _wSubSets (\ s a -> s{_wSubSets = a}) .-      _Default-      . _Coerce---- | The date (format \"yyyy-MM-dd\") the font was modified for the last--- time.-wLastModified :: Lens' Webfont (Maybe Day)-wLastModified-  = lens _wLastModified-      (\ s a -> s{_wLastModified = a})-      . mapping _Date--instance FromJSON Webfont where-        parseJSON-          = withObject "Webfont"-              (\ o ->-                 Webfont' <$>-                   (o .:? "variants" .!= mempty) <*>-                     (o .:? "kind" .!= "webfonts#webfont")-                     <*> (o .:? "category")-                     <*> (o .:? "family")-                     <*> (o .:? "version")-                     <*> (o .:? "files")-                     <*> (o .:? "subsets" .!= mempty)-                     <*> (o .:? "lastModified"))--instance ToJSON Webfont where-        toJSON Webfont'{..}-          = object-              (catMaybes-                 [("variants" .=) <$> _wVariants,-                  Just ("kind" .= _wKind),-                  ("category" .=) <$> _wCategory,-                  ("family" .=) <$> _wFamily,-                  ("version" .=) <$> _wVersion,-                  ("files" .=) <$> _wFiles,-                  ("subsets" .=) <$> _wSubSets,-                  ("lastModified" .=) <$> _wLastModified])------- /See:/ 'webfontList' smart constructor.-data WebfontList =-  WebfontList'-    { _wlKind  :: !Text-    , _wlItems :: !(Maybe [Webfont])-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'WebfontList' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'wlKind'------ * 'wlItems'-webfontList-    :: WebfontList-webfontList =-  WebfontList' {_wlKind = "webfonts#webfontList", _wlItems = Nothing}----- | This kind represents a list of webfont objects in the webfonts service.-wlKind :: Lens' WebfontList Text-wlKind = lens _wlKind (\ s a -> s{_wlKind = a})---- | The list of fonts currently served by the Google Fonts API.-wlItems :: Lens' WebfontList [Webfont]-wlItems-  = lens _wlItems (\ s a -> s{_wlItems = a}) . _Default-      . _Coerce--instance FromJSON WebfontList where-        parseJSON-          = withObject "WebfontList"-              (\ o ->-                 WebfontList' <$>-                   (o .:? "kind" .!= "webfonts#webfontList") <*>-                     (o .:? "items" .!= mempty))--instance ToJSON WebfontList where-        toJSON WebfontList'{..}-          = object-              (catMaybes-                 [Just ("kind" .= _wlKind),-                  ("items" .=) <$> _wlItems])---- | The font files (with all supported scripts) for each one of the--- available variants, as a key : value map.------ /See:/ 'webfontFiles' smart constructor.-newtype WebfontFiles =-  WebfontFiles'-    { _wfAddtional :: HashMap Text Text-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'WebfontFiles' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'wfAddtional'-webfontFiles-    :: HashMap Text Text -- ^ 'wfAddtional'-    -> WebfontFiles-webfontFiles pWfAddtional_ =-  WebfontFiles' {_wfAddtional = _Coerce # pWfAddtional_}----- | The font file URL (value) for an specific variant (key).-wfAddtional :: Lens' WebfontFiles (HashMap Text Text)-wfAddtional-  = lens _wfAddtional (\ s a -> s{_wfAddtional = a}) .-      _Coerce--instance FromJSON WebfontFiles where-        parseJSON-          = withObject "WebfontFiles"-              (\ o -> WebfontFiles' <$> (parseJSONObject o))--instance ToJSON WebfontFiles where-        toJSON = toJSON . _wfAddtional
− gen/Network/Google/Fonts/Types/Sum.hs
@@ -1,63 +0,0 @@-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE LambdaCase         #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}--{-# OPTIONS_GHC -fno-warn-unused-imports #-}---- |--- Module      : Network.Google.Fonts.Types.Sum--- 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)----module Network.Google.Fonts.Types.Sum where--import           Network.Google.Prelude hiding (Bytes)---- | Enables sorting of the list-data WebfontsListSort-    = Alpha-      -- ^ @alpha@-      -- Sort alphabetically-    | Date-      -- ^ @date@-      -- Sort by date added-    | Popularity-      -- ^ @popularity@-      -- Sort by popularity-    | Style-      -- ^ @style@-      -- Sort by number of styles-    | Trending-      -- ^ @trending@-      -- Sort by trending-      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)--instance Hashable WebfontsListSort--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 ToHttpApiData WebfontsListSort where-    toQueryParam = \case-        Alpha -> "alpha"-        Date -> "date"-        Popularity -> "popularity"-        Style -> "style"-        Trending -> "trending"--instance FromJSON WebfontsListSort where-    parseJSON = parseJSONText "WebfontsListSort"--instance ToJSON WebfontsListSort where-    toJSON = toJSONText
− gen/Network/Google/Resource/Webfonts/Webfonts/List.hs
@@ -1,84 +0,0 @@-{-# LANGUAGE DataKinds          #-}-{-# LANGUAGE DeriveDataTypeable #-}-{-# LANGUAGE DeriveGeneric      #-}-{-# LANGUAGE FlexibleInstances  #-}-{-# LANGUAGE NoImplicitPrelude  #-}-{-# LANGUAGE OverloadedStrings  #-}-{-# LANGUAGE RecordWildCards    #-}-{-# LANGUAGE TypeFamilies       #-}-{-# LANGUAGE TypeOperators      #-}--{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}-{-# OPTIONS_GHC -fno-warn-unused-binds      #-}-{-# OPTIONS_GHC -fno-warn-unused-imports    #-}---- |--- Module      : Network.Google.Resource.Webfonts.Webfonts.List--- 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)------ Retrieves the list of fonts currently served by the Google Fonts--- Developer API------ /See:/ <https://developers.google.com/fonts/docs/developer_api Google Fonts Developer API Reference> for @webfonts.webfonts.list@.-module Network.Google.Resource.Webfonts.Webfonts.List-    (-    -- * REST Resource-      WebfontsListResource--    -- * Creating a Request-    , webfontsList-    , WebfontsList--    -- * Request Lenses-    , wlSort-    ) where--import           Network.Google.Fonts.Types-import           Network.Google.Prelude---- | A resource alias for @webfonts.webfonts.list@ method which the--- 'WebfontsList' request conforms to.-type WebfontsListResource =-     "webfonts" :>-       "v1" :>-         "webfonts" :>-           QueryParam "sort" WebfontsListSort :>-             QueryParam "alt" AltJSON :> Get '[JSON] WebfontList---- | Retrieves the list of fonts currently served by the Google Fonts--- Developer API------ /See:/ 'webfontsList' smart constructor.-newtype WebfontsList =-  WebfontsList'-    { _wlSort :: Maybe WebfontsListSort-    }-  deriving (Eq, Show, Data, Typeable, Generic)----- | Creates a value of 'WebfontsList' with the minimum fields required to make a request.------ Use one of the following lenses to modify other fields as desired:------ * 'wlSort'-webfontsList-    :: WebfontsList-webfontsList = WebfontsList' {_wlSort = Nothing}----- | Enables sorting of the list-wlSort :: Lens' WebfontsList (Maybe WebfontsListSort)-wlSort = lens _wlSort (\ s a -> s{_wlSort = a})--instance GoogleRequest WebfontsList where-        type Rs WebfontsList = WebfontList-        type Scopes WebfontsList = '[]-        requestClient WebfontsList'{..}-          = go _wlSort (Just AltJSON) fontsService-          where go-                  = buildClient (Proxy :: Proxy WebfontsListResource)-                      mempty
gogol-fonts.cabal view
@@ -1,48 +1,61 @@-name:                  gogol-fonts-version:               0.5.0-synopsis:              Google Fonts Developer SDK.-homepage:              https://github.com/brendanhay/gogol-bug-reports:           https://github.com/brendanhay/gogol/issues-license:               OtherLicense-license-file:          LICENSE-author:                Brendan Hay-maintainer:            Brendan Hay <brendan.g.hay@gmail.com>-copyright:             Copyright (c) 2015-2016 Brendan Hay-category:              Network, Google, Cloud-build-type:            Simple-cabal-version:         >= 1.10-extra-source-files:    README.md src/.gitkeep+cabal-version:      2.2+name:               gogol-fonts+version:            1.0.0+synopsis:           Google Web Fonts Developer SDK.+homepage:           https://github.com/brendanhay/gogol+bug-reports:        https://github.com/brendanhay/gogol/issues+license:            MPL-2.0+license-file:       LICENSE+author:             Brendan Hay+maintainer:+  Brendan Hay <brendan.g.hay+gogol@gmail.com>, Toni Cebrián <toni@tonicebrian.com> +copyright:          Copyright (c) 2015-2025 Brendan Hay+category:           Google+build-type:         Simple+extra-source-files:+  README.md+  src/.gitkeep+ description:-    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!-    .-    This library is compatible with version @v1@-    of the API.+  The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.+  .+  /Warning:/ This is an experimental prototype/preview release which is still+  under exploratory development and not intended for public use, caveat emptor!+  .+  This library is compatible with version @v1@+  of the API.  source-repository head-    type:     git-    location: git://github.com/brendanhay/gogol.git+  type:     git+  location: git://github.com/brendanhay/gogol.git+  subdir:   gogol-fonts +flag field-selectors+  description:+    If record field selectors should be enabled. Disabling this requires GHC >=9.2 and the NoFieldSelectors extension.++  default:     False+  manual:      True+ library-    default-language:  Haskell2010-    hs-source-dirs:    src gen+  default-language: GHC2021+  hs-source-dirs:   src gen+  ghc-options:+    -Wall -fwarn-incomplete-uni-patterns+    -fwarn-incomplete-record-updates -funbox-strict-fields+    -fwarn-unused-packages -    ghc-options:       -Wall+  if (!flag(field-selectors) && impl(ghc >=9.2))+    default-extensions: NoFieldSelectors -    exposed-modules:-          Network.Google.Fonts-        , Network.Google.Fonts.Types-        , Network.Google.Resource.Webfonts.Webfonts.List+  exposed-modules:+    Gogol.Fonts+    Gogol.Fonts.Types+    Gogol.Fonts.Webfonts.List -    other-modules:-          Network.Google.Fonts.Types.Product-        , Network.Google.Fonts.Types.Sum+  other-modules:+    Gogol.Fonts.Internal.Product+    Gogol.Fonts.Internal.Sum -    build-depends:-          gogol-core == 0.5.0.*-        , base       >= 4.7 && < 5+  build-depends:    gogol-core ^>=1.0.0