gogol-freebasesearch 0.0.1 → 0.1.0
raw patch · 8 files changed
+91/−87 lines, 8 filesdep ~gogol-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: gogol-core
API changes (from Hackage documentation)
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Constructor Network.Google.Method.Freebase.Reconcile.C1_0Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Datatype Network.Google.Method.Freebase.Reconcile.D1Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Selector Network.Google.Method.Freebase.Reconcile.S1_0_0Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Selector Network.Google.Method.Freebase.Reconcile.S1_0_1Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Selector Network.Google.Method.Freebase.Reconcile.S1_0_2Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Selector Network.Google.Method.Freebase.Reconcile.S1_0_3Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Selector Network.Google.Method.Freebase.Reconcile.S1_0_4Reconcile
- Network.Google.Method.Freebase.Reconcile: instance GHC.Generics.Selector Network.Google.Method.Freebase.Reconcile.S1_0_5Reconcile
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Constructor Network.Google.Method.Freebase.Search.C1_0Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Datatype Network.Google.Method.Freebase.Search.D1Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_0Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_10Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_11Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_12Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_13Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_14Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_15Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_16Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_17Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_18Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_19Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_1Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_20Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_21Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_22Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_2Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_3Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_4Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_5Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_6Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_7Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_8Search
- Network.Google.Method.Freebase.Search: instance GHC.Generics.Selector Network.Google.Method.Freebase.Search.S1_0_9Search
- Network.Google.FreebaseSearch: freebaseSearchService :: Service
+ Network.Google.FreebaseSearch: freebaseSearchService :: ServiceConfig
- Network.Google.FreebaseSearch.Types: freebaseSearchService :: Service
+ Network.Google.FreebaseSearch.Types: freebaseSearchService :: ServiceConfig
Files
- README.md +3/−3
- gen/Network/Google/FreebaseSearch.hs +1/−1
- gen/Network/Google/FreebaseSearch/Types.hs +3/−2
- gen/Network/Google/FreebaseSearch/Types/Product.hs +21/−21
- gen/Network/Google/FreebaseSearch/Types/Sum.hs +48/−48
- gen/Network/Google/Method/Freebase/Reconcile.hs +5/−4
- gen/Network/Google/Method/Freebase/Search.hs +7/−5
- gogol-freebasesearch.cabal +3/−3
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/FreebaseSearch.hs view
@@ -7,7 +7,7 @@ -- | -- Module : Network.Google.FreebaseSearch--- 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
gen/Network/Google/FreebaseSearch/Types.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE NoImplicitPrelude #-}@@ -7,7 +8,7 @@ -- | -- Module : Network.Google.FreebaseSearch.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@@ -75,7 +76,7 @@ import Network.Google.Prelude -- | Default request referring to version 'v1' of the Freebase Search. This contains the host and root path used as a starting point for constructing service requests.-freebaseSearchService :: Service+freebaseSearchService :: ServiceConfig freebaseSearchService = defaultService (ServiceId "freebase:v1") "www.googleapis.com"
gen/Network/Google/FreebaseSearch/Types/Product.hs view
@@ -9,7 +9,7 @@ -- | -- Module : Network.Google.FreebaseSearch.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:/ 'reconcileGetWarningItem' smart constructor.-data ReconcileGetWarningItem = ReconcileGetWarningItem+data ReconcileGetWarningItem = ReconcileGetWarningItem' { _rgwiLocation :: !(Maybe Text) , _rgwiReason :: !(Maybe Text) , _rgwiMessage :: !(Maybe Text)@@ -40,7 +40,7 @@ reconcileGetWarningItem :: ReconcileGetWarningItem reconcileGetWarningItem =- ReconcileGetWarningItem+ ReconcileGetWarningItem' { _rgwiLocation = Nothing , _rgwiReason = Nothing , _rgwiMessage = Nothing@@ -65,12 +65,12 @@ parseJSON = withObject "ReconcileGetWarningItem" (\ o ->- ReconcileGetWarningItem <$>+ ReconcileGetWarningItem' <$> (o .:? "location") <*> (o .:? "reason") <*> (o .:? "message")) instance ToJSON ReconcileGetWarningItem where- toJSON ReconcileGetWarningItem{..}+ toJSON ReconcileGetWarningItem'{..} = object (catMaybes [("location" .=) <$> _rgwiLocation,@@ -80,7 +80,7 @@ -- | Server costs for reconciling. -- -- /See:/ 'reconcileGetCosts' smart constructor.-data ReconcileGetCosts = ReconcileGetCosts+data ReconcileGetCosts = ReconcileGetCosts' { _rgcHits :: !(Maybe (Textual Int32)) , _rgcMs :: !(Maybe (Textual Int32)) } deriving (Eq,Show,Data,Typeable,Generic)@@ -95,7 +95,7 @@ reconcileGetCosts :: ReconcileGetCosts reconcileGetCosts =- ReconcileGetCosts+ ReconcileGetCosts' { _rgcHits = Nothing , _rgcMs = Nothing }@@ -116,18 +116,18 @@ parseJSON = withObject "ReconcileGetCosts" (\ o ->- ReconcileGetCosts <$>+ ReconcileGetCosts' <$> (o .:? "hits") <*> (o .:? "ms")) instance ToJSON ReconcileGetCosts where- toJSON ReconcileGetCosts{..}+ toJSON ReconcileGetCosts'{..} = object (catMaybes [("hits" .=) <$> _rgcHits, ("ms" .=) <$> _rgcMs]) -- -- /See:/ 'reconcileGet' smart constructor.-data ReconcileGet = ReconcileGet+data ReconcileGet = ReconcileGet' { _rgCandidate :: !(Maybe [ReconcileCandidate]) , _rgCosts :: !(Maybe ReconcileGetCosts) , _rgWarning :: !(Maybe [ReconcileGetWarningItem])@@ -148,7 +148,7 @@ reconcileGet :: ReconcileGet reconcileGet =- ReconcileGet+ ReconcileGet' { _rgCandidate = Nothing , _rgCosts = Nothing , _rgWarning = Nothing@@ -189,13 +189,13 @@ parseJSON = withObject "ReconcileGet" (\ o ->- ReconcileGet <$>+ ReconcileGet' <$> (o .:? "candidate" .!= mempty) <*> (o .:? "costs") <*> (o .:? "warning" .!= mempty) <*> (o .:? "match")) instance ToJSON ReconcileGet where- toJSON ReconcileGet{..}+ toJSON ReconcileGet'{..} = object (catMaybes [("candidate" .=) <$> _rgCandidate,@@ -206,7 +206,7 @@ -- | Type or profession the candidate is notable for. -- -- /See:/ 'reconcileCandidateNotable' smart constructor.-data ReconcileCandidateNotable = ReconcileCandidateNotable+data ReconcileCandidateNotable = ReconcileCandidateNotable' { _rcnName :: !(Maybe Text) , _rcnId :: !(Maybe Text) } deriving (Eq,Show,Data,Typeable,Generic)@@ -221,7 +221,7 @@ reconcileCandidateNotable :: ReconcileCandidateNotable reconcileCandidateNotable =- ReconcileCandidateNotable+ ReconcileCandidateNotable' { _rcnName = Nothing , _rcnId = Nothing }@@ -238,18 +238,18 @@ parseJSON = withObject "ReconcileCandidateNotable" (\ o ->- ReconcileCandidateNotable <$>+ ReconcileCandidateNotable' <$> (o .:? "name") <*> (o .:? "id")) instance ToJSON ReconcileCandidateNotable where- toJSON ReconcileCandidateNotable{..}+ toJSON ReconcileCandidateNotable'{..} = object (catMaybes [("name" .=) <$> _rcnName, ("id" .=) <$> _rcnId]) -- -- /See:/ 'reconcileCandidate' smart constructor.-data ReconcileCandidate = ReconcileCandidate+data ReconcileCandidate = ReconcileCandidate' { _rcLang :: !(Maybe Text) , _rcConfidence :: !(Maybe (Textual Double)) , _rcName :: !(Maybe Text)@@ -273,7 +273,7 @@ reconcileCandidate :: ReconcileCandidate reconcileCandidate =- ReconcileCandidate+ ReconcileCandidate' { _rcLang = Nothing , _rcConfidence = Nothing , _rcName = Nothing@@ -309,14 +309,14 @@ parseJSON = withObject "ReconcileCandidate" (\ o ->- ReconcileCandidate <$>+ ReconcileCandidate' <$> (o .:? "lang") <*> (o .:? "confidence") <*> (o .:? "name") <*> (o .:? "notable") <*> (o .:? "mid")) instance ToJSON ReconcileCandidate where- toJSON ReconcileCandidate{..}+ toJSON ReconcileCandidate'{..} = object (catMaybes [("lang" .=) <$> _rcLang,
gen/Network/Google/FreebaseSearch/Types/Sum.hs view
@@ -8,7 +8,7 @@ -- | -- Module : Network.Google.FreebaseSearch.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@@ -38,22 +38,22 @@ | Mids -- ^ @mids@ -- Ordered list of freebase mids.- deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) instance Hashable FreebaseSearchFormat -instance FromText FreebaseSearchFormat where- fromText = \case- "ac" -> Just AC- "classic" -> Just Classic- "entity" -> Just Entity- "guids" -> Just Guids- "ids" -> Just Ids- "mids" -> Just Mids- _ -> Nothing+instance FromHttpApiData FreebaseSearchFormat where+ parseQueryParam = \case+ "ac" -> Right AC+ "classic" -> Right Classic+ "entity" -> Right Entity+ "guids" -> Right Guids+ "ids" -> Right Ids+ "mids" -> Right Mids+ x -> Left ("Unable to parse FreebaseSearchFormat from: " <> x) -instance ToText FreebaseSearchFormat where- toText = \case+instance ToHttpApiData FreebaseSearchFormat where+ toQueryParam = \case AC -> "ac" Classic -> "classic" Entity -> "entity"@@ -78,19 +78,19 @@ | FSSSchema -- ^ @schema@ -- Use schema ranking for properties and types.- deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) instance Hashable FreebaseSearchScoring -instance FromText FreebaseSearchScoring where- fromText = \case- "entity" -> Just FSSEntity- "freebase" -> Just FSSFreebase- "schema" -> Just FSSSchema- _ -> Nothing+instance FromHttpApiData FreebaseSearchScoring where+ parseQueryParam = \case+ "entity" -> Right FSSEntity+ "freebase" -> Right FSSFreebase+ "schema" -> Right FSSSchema+ x -> Left ("Unable to parse FreebaseSearchScoring from: " <> x) -instance ToText FreebaseSearchScoring where- toText = \case+instance ToHttpApiData FreebaseSearchScoring where+ toQueryParam = \case FSSEntity -> "entity" FSSFreebase -> "freebase" FSSSchema -> "schema"@@ -112,18 +112,18 @@ -- ^ @off@ -- No encoding of the response. You should not print the results directly -- on an web page without html-escaping the content first.- deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) instance Hashable FreebaseSearchEncode -instance FromText FreebaseSearchEncode where- fromText = \case- "html" -> Just HTML- "off" -> Just Off- _ -> Nothing+instance FromHttpApiData FreebaseSearchEncode where+ parseQueryParam = \case+ "html" -> Right HTML+ "off" -> Right Off+ x -> Left ("Unable to parse FreebaseSearchEncode from: " <> x) -instance ToText FreebaseSearchEncode where- toText = \case+instance ToHttpApiData FreebaseSearchEncode where+ toQueryParam = \case HTML -> "html" Off -> "off" @@ -146,19 +146,19 @@ -- ^ @predicates@ -- The predicates and path-terminating properties supported by the filter -- and output request parameters.- deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) instance Hashable FreebaseSearchHelp -instance FromText FreebaseSearchHelp where- fromText = \case- "langs" -> Just Langs- "mappings" -> Just MAppings- "predicates" -> Just Predicates- _ -> Nothing+instance FromHttpApiData FreebaseSearchHelp where+ parseQueryParam = \case+ "langs" -> Right Langs+ "mappings" -> Right MAppings+ "predicates" -> Right Predicates+ x -> Left ("Unable to parse FreebaseSearchHelp from: " <> x) -instance ToText FreebaseSearchHelp where- toText = \case+instance ToHttpApiData FreebaseSearchHelp where+ toQueryParam = \case Langs -> "langs" MAppings -> "mappings" Predicates -> "predicates"@@ -181,19 +181,19 @@ | NoSpelling -- ^ @no_spelling@ -- Don\'t request spelling suggestions.- deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)+ deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic) instance Hashable FreebaseSearchSpell -instance FromText FreebaseSearchSpell where- fromText = \case- "always" -> Just Always- "no_results" -> Just NoResults- "no_spelling" -> Just NoSpelling- _ -> Nothing+instance FromHttpApiData FreebaseSearchSpell where+ parseQueryParam = \case+ "always" -> Right Always+ "no_results" -> Right NoResults+ "no_spelling" -> Right NoSpelling+ x -> Left ("Unable to parse FreebaseSearchSpell from: " <> x) -instance ToText FreebaseSearchSpell where- toText = \case+instance ToHttpApiData FreebaseSearchSpell where+ toQueryParam = \case Always -> "always" NoResults -> "no_results" NoSpelling -> "no_spelling"
gen/Network/Google/Method/Freebase/Reconcile.hs view
@@ -14,7 +14,7 @@ -- | -- Module : Network.Google.Method.Freebase.Reconcile--- 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@@ -61,7 +61,7 @@ -- | Reconcile entities to Freebase open data. -- -- /See:/ 'reconcile' smart constructor.-data Reconcile = Reconcile+data Reconcile = Reconcile' { _rKind :: !(Maybe [Text]) , _rLang :: !(Maybe [Text]) , _rConfidence :: !(Textual Double)@@ -88,7 +88,7 @@ reconcile :: Reconcile reconcile =- Reconcile+ Reconcile' { _rKind = Nothing , _rLang = Nothing , _rConfidence = 0.99@@ -133,7 +133,8 @@ instance GoogleRequest Reconcile where type Rs Reconcile = ReconcileGet- requestClient Reconcile{..}+ type Scopes Reconcile = '[]+ requestClient Reconcile'{..} = go (_rKind ^. _Default) (_rLang ^. _Default) (Just _rConfidence) _rName
gen/Network/Google/Method/Freebase/Search.hs view
@@ -14,7 +14,7 @@ -- | -- Module : Network.Google.Method.Freebase.Search--- 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@@ -145,7 +145,7 @@ -- | Search Freebase open data. -- -- /See:/ 'search' smart constructor.-data Search = Search+data Search = Search' { _sWithout :: !(Maybe [Text]) , _sCursor :: !(Maybe (Textual Int32)) , _sWith :: !(Maybe [Text])@@ -223,7 +223,7 @@ search :: Search search =- Search+ Search' { _sWithout = Nothing , _sCursor = Nothing , _sWith = Nothing@@ -366,7 +366,8 @@ instance GoogleRequest Search where type Rs Search = ()- requestClient Search{..}+ type Scopes Search = '[]+ requestClient Search'{..} = go (_sWithout ^. _Default) _sCursor (_sWith ^. _Default) (_sDomain ^. _Default)@@ -396,7 +397,8 @@ instance GoogleRequest (MediaDownload Search) where type Rs (MediaDownload Search) = Stream- requestClient (MediaDownload Search{..})+ type Scopes (MediaDownload Search) = Scopes Search+ requestClient (MediaDownload Search'{..}) = go (_sWithout ^. _Default) _sCursor (_sWith ^. _Default) (_sDomain ^. _Default)
gogol-freebasesearch.cabal view
@@ -1,5 +1,5 @@ name: gogol-freebasesearch-version: 0.0.1+version: 0.1.0 synopsis: Google Freebase Search SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues@@ -7,7 +7,7 @@ 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@@ -43,5 +43,5 @@ , Network.Google.FreebaseSearch.Types.Sum build-depends:- gogol-core == 0.0.1.*+ gogol-core == 0.1.0.* , base >= 4.7 && < 5