gogol-customsearch 0.4.0 → 0.5.0
raw patch · 5 files changed
+133/−83 lines, 5 filesdep ~gogol-corePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: gogol-core
API changes (from Hackage documentation)
Files
- README.md +1/−1
- gen/Network/Google/CustomSearch/Types/Product.hs +116/−74
- gen/Network/Google/Resource/Search/CSE/List.hs +7/−3
- gen/Network/Google/Resource/Search/CSE/Siterestrict/List.hs +7/−3
- gogol-customsearch.cabal +2/−2
README.md view
@@ -8,7 +8,7 @@ ## Version -`0.3.0`+`0.5.0` ## Description
gen/Network/Google/CustomSearch/Types/Product.hs view
@@ -22,12 +22,15 @@ -- -- /See:/ 'promotionImage' smart constructor.-data PromotionImage = PromotionImage'+data PromotionImage =+ PromotionImage' { _piHeight :: !(Maybe (Textual Int32)) , _piWidth :: !(Maybe (Textual Int32)) , _piSource :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'PromotionImage' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -40,12 +43,9 @@ promotionImage :: PromotionImage promotionImage =- PromotionImage'- { _piHeight = Nothing- , _piWidth = Nothing- , _piSource = Nothing- }+ PromotionImage' {_piHeight = Nothing, _piWidth = Nothing, _piSource = Nothing} + piHeight :: Lens' PromotionImage (Maybe Int32) piHeight = lens _piHeight (\ s a -> s{_piHeight = a}) .@@ -77,11 +77,14 @@ -- -- /See:/ 'context' smart constructor.-data Context = Context'+data Context =+ Context' { _cFacets :: !(Maybe [[ContextFacetsItemItem]]) , _cTitle :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'Context' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -91,12 +94,9 @@ -- * 'cTitle' context :: Context-context =- Context'- { _cFacets = Nothing- , _cTitle = Nothing- }+context = Context' {_cFacets = Nothing, _cTitle = Nothing} + cFacets :: Lens' Context [[ContextFacetsItemItem]] cFacets = lens _cFacets (\ s a -> s{_cFacets = a}) . _Default@@ -121,10 +121,13 @@ -- -- /See:/ 'searchQueries' smart constructor.-newtype SearchQueries = SearchQueries'+newtype SearchQueries =+ SearchQueries' { _sqAddtional :: HashMap Text [Query]- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'SearchQueries' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -134,10 +137,9 @@ :: HashMap Text [Query] -- ^ 'sqAddtional' -> SearchQueries searchQueries pSqAddtional_ =- SearchQueries'- { _sqAddtional = _Coerce # pSqAddtional_- }+ SearchQueries' {_sqAddtional = _Coerce # pSqAddtional_} + sqAddtional :: Lens' SearchQueries (HashMap Text [Query]) sqAddtional = lens _sqAddtional (\ s a -> s{_sqAddtional = a}) .@@ -153,10 +155,13 @@ -- -- /See:/ 'resultPagemapAdditionalItem' smart constructor.-newtype ResultPagemapAdditionalItem = ResultPagemapAdditionalItem'+newtype ResultPagemapAdditionalItem =+ ResultPagemapAdditionalItem' { _rpaiAddtional :: HashMap Text JSONValue- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'ResultPagemapAdditionalItem' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -166,10 +171,9 @@ :: HashMap Text JSONValue -- ^ 'rpaiAddtional' -> ResultPagemapAdditionalItem resultPagemapAdditionalItem pRpaiAddtional_ =- ResultPagemapAdditionalItem'- { _rpaiAddtional = _Coerce # pRpaiAddtional_- }+ ResultPagemapAdditionalItem' {_rpaiAddtional = _Coerce # pRpaiAddtional_} + rpaiAddtional :: Lens' ResultPagemapAdditionalItem (HashMap Text JSONValue) rpaiAddtional = lens _rpaiAddtional@@ -187,11 +191,14 @@ -- -- /See:/ 'searchURL' smart constructor.-data SearchURL = SearchURL'+data SearchURL =+ SearchURL' { _suType :: !Text , _suTemplate :: !Text- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'SearchURL' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -202,11 +209,13 @@ searchURL :: SearchURL searchURL =- SearchURL'+ SearchURL' { _suType = "application/json"- , _suTemplate = "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json"+ , _suTemplate =+ "https://www.googleapis.com/customsearch/v1?q={searchTerms}&num={count?}&start={startIndex?}&lr={language?}&safe={safe?}&cx={cx?}&sort={sort?}&filter={filter?}&gl={gl?}&cr={cr?}&googlehost={googleHost?}&c2coff={disableCnTwTranslation?}&hq={hq?}&hl={hl?}&siteSearch={siteSearch?}&siteSearchFilter={siteSearchFilter?}&exactTerms={exactTerms?}&excludeTerms={excludeTerms?}&linkSite={linkSite?}&orTerms={orTerms?}&relatedSite={relatedSite?}&dateRestrict={dateRestrict?}&lowRange={lowRange?}&highRange={highRange?}&searchType={searchType}&fileType={fileType?}&rights={rights?}&imgSize={imgSize?}&imgType={imgType?}&imgColorType={imgColorType?}&imgDominantColor={imgDominantColor?}&alt=json" } + suType :: Lens' SearchURL Text suType = lens _suType (\ s a -> s{_suType = a}) @@ -232,11 +241,14 @@ -- -- /See:/ 'searchSpelling' smart constructor.-data SearchSpelling = SearchSpelling'+data SearchSpelling =+ SearchSpelling' { _ssCorrectedQuery :: !(Maybe Text) , _ssHTMLCorrectedQuery :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'SearchSpelling' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -247,11 +259,9 @@ searchSpelling :: SearchSpelling searchSpelling =- SearchSpelling'- { _ssCorrectedQuery = Nothing- , _ssHTMLCorrectedQuery = Nothing- }+ SearchSpelling' {_ssCorrectedQuery = Nothing, _ssHTMLCorrectedQuery = Nothing} + ssCorrectedQuery :: Lens' SearchSpelling (Maybe Text) ssCorrectedQuery = lens _ssCorrectedQuery@@ -279,7 +289,8 @@ -- -- /See:/ 'resultImage' smart constructor.-data ResultImage = ResultImage'+data ResultImage =+ ResultImage' { _riThumbnailLink :: !(Maybe Text) , _riHeight :: !(Maybe (Textual Int32)) , _riByteSize :: !(Maybe (Textual Int32))@@ -287,8 +298,10 @@ , _riThumbnailHeight :: !(Maybe (Textual Int32)) , _riWidth :: !(Maybe (Textual Int32)) , _riThumbnailWidth :: !(Maybe (Textual Int32))- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'ResultImage' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -309,7 +322,7 @@ resultImage :: ResultImage resultImage =- ResultImage'+ ResultImage' { _riThumbnailLink = Nothing , _riHeight = Nothing , _riByteSize = Nothing@@ -319,6 +332,7 @@ , _riThumbnailWidth = Nothing } + riThumbnailLink :: Lens' ResultImage (Maybe Text) riThumbnailLink = lens _riThumbnailLink@@ -382,10 +396,13 @@ -- -- /See:/ 'resultPagemap' smart constructor.-newtype ResultPagemap = ResultPagemap'+newtype ResultPagemap =+ ResultPagemap' { _rpAddtional :: HashMap Text [ResultPagemapAdditionalItem]- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'ResultPagemap' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -395,10 +412,9 @@ :: HashMap Text [ResultPagemapAdditionalItem] -- ^ 'rpAddtional' -> ResultPagemap resultPagemap pRpAddtional_ =- ResultPagemap'- { _rpAddtional = _Coerce # pRpAddtional_- }+ ResultPagemap' {_rpAddtional = _Coerce # pRpAddtional_} + rpAddtional :: Lens' ResultPagemap (HashMap Text [ResultPagemapAdditionalItem]) rpAddtional = lens _rpAddtional (\ s a -> s{_rpAddtional = a}) .@@ -414,7 +430,8 @@ -- -- /See:/ 'result' smart constructor.-data Result = Result'+data Result =+ Result' { _rMime :: !(Maybe Text) , _rImage :: !(Maybe ResultImage) , _rPagemap :: !(Maybe ResultPagemap)@@ -430,8 +447,10 @@ , _rHTMLTitle :: !(Maybe Text) , _rLabels :: !(Maybe [ResultLabelsItem]) , _rTitle :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'Result' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -468,7 +487,7 @@ result :: Result result =- Result'+ Result' { _rMime = Nothing , _rImage = Nothing , _rPagemap = Nothing@@ -486,6 +505,7 @@ , _rTitle = Nothing } + rMime :: Lens' Result (Maybe Text) rMime = lens _rMime (\ s a -> s{_rMime = a}) @@ -581,12 +601,15 @@ -- -- /See:/ 'resultLabelsItem' smart constructor.-data ResultLabelsItem = ResultLabelsItem'+data ResultLabelsItem =+ ResultLabelsItem' { _rliName :: !(Maybe Text) , _rliDisplayName :: !(Maybe Text) , _rliLabelWithOp :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'ResultLabelsItem' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -599,12 +622,10 @@ resultLabelsItem :: ResultLabelsItem resultLabelsItem =- ResultLabelsItem'- { _rliName = Nothing- , _rliDisplayName = Nothing- , _rliLabelWithOp = Nothing- }+ ResultLabelsItem'+ {_rliName = Nothing, _rliDisplayName = Nothing, _rliLabelWithOp = Nothing} + rliName :: Lens' ResultLabelsItem (Maybe Text) rliName = lens _rliName (\ s a -> s{_rliName = a}) @@ -636,13 +657,16 @@ -- -- /See:/ 'searchSearchInformation' smart constructor.-data SearchSearchInformation = SearchSearchInformation'+data SearchSearchInformation =+ SearchSearchInformation' { _ssiSearchTime :: !(Maybe (Textual Double)) , _ssiFormattedSearchTime :: !(Maybe Text) , _ssiTotalResults :: !(Maybe (Textual Int64)) , _ssiFormattedTotalResults :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'SearchSearchInformation' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -657,13 +681,14 @@ searchSearchInformation :: SearchSearchInformation searchSearchInformation =- SearchSearchInformation'+ SearchSearchInformation' { _ssiSearchTime = Nothing , _ssiFormattedSearchTime = Nothing , _ssiTotalResults = Nothing , _ssiFormattedTotalResults = Nothing } + ssiSearchTime :: Lens' SearchSearchInformation (Maybe Double) ssiSearchTime = lens _ssiSearchTime@@ -709,7 +734,8 @@ -- -- /See:/ 'query' smart constructor.-data Query = Query'+data Query =+ Query' { _qImgDominantColor :: !(Maybe Text) , _qOutputEncoding :: !(Maybe Text) , _qSiteSearchFilter :: !(Maybe Text)@@ -746,8 +772,10 @@ , _qSafe :: !(Maybe Text) , _qHq :: !(Maybe Text) , _qHighRange :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'Query' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -826,7 +854,7 @@ query :: Query query =- Query'+ Query' { _qImgDominantColor = Nothing , _qOutputEncoding = Nothing , _qSiteSearchFilter = Nothing@@ -865,6 +893,7 @@ , _qHighRange = Nothing } + qImgDominantColor :: Lens' Query (Maybe Text) qImgDominantColor = lens _qImgDominantColor@@ -1091,13 +1120,16 @@ -- -- /See:/ 'promotionBodyLinesItem' smart constructor.-data PromotionBodyLinesItem = PromotionBodyLinesItem'+data PromotionBodyLinesItem =+ PromotionBodyLinesItem' { _pbliLink :: !(Maybe Text) , _pbliURL :: !(Maybe Text) , _pbliHTMLTitle :: !(Maybe Text) , _pbliTitle :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'PromotionBodyLinesItem' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -1112,13 +1144,14 @@ promotionBodyLinesItem :: PromotionBodyLinesItem promotionBodyLinesItem =- PromotionBodyLinesItem'+ PromotionBodyLinesItem' { _pbliLink = Nothing , _pbliURL = Nothing , _pbliHTMLTitle = Nothing , _pbliTitle = Nothing } + pbliLink :: Lens' PromotionBodyLinesItem (Maybe Text) pbliLink = lens _pbliLink (\ s a -> s{_pbliLink = a}) @@ -1153,15 +1186,18 @@ -- -- /See:/ 'promotion' smart constructor.-data Promotion = Promotion'+data Promotion =+ Promotion' { _pImage :: !(Maybe PromotionImage) , _pDisplayLink :: !(Maybe Text) , _pBodyLines :: !(Maybe [PromotionBodyLinesItem]) , _pLink :: !(Maybe Text) , _pHTMLTitle :: !(Maybe Text) , _pTitle :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'Promotion' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -1180,7 +1216,7 @@ promotion :: Promotion promotion =- Promotion'+ Promotion' { _pImage = Nothing , _pDisplayLink = Nothing , _pBodyLines = Nothing@@ -1189,6 +1225,7 @@ , _pTitle = Nothing } + pImage :: Lens' Promotion (Maybe PromotionImage) pImage = lens _pImage (\ s a -> s{_pImage = a}) @@ -1236,7 +1273,8 @@ -- -- /See:/ 'search' smart constructor.-data Search = Search'+data Search =+ Search' { _sQueries :: !(Maybe SearchQueries) , _sContext :: !(Maybe Context) , _sKind :: !Text@@ -1245,8 +1283,10 @@ , _sSearchInformation :: !(Maybe SearchSearchInformation) , _sPromotions :: !(Maybe [Promotion]) , _sSpelling :: !(Maybe SearchSpelling)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'Search' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -1269,7 +1309,7 @@ search :: Search search =- Search'+ Search' { _sQueries = Nothing , _sContext = Nothing , _sKind = "customsearch#search"@@ -1280,6 +1320,7 @@ , _sSpelling = Nothing } + sQueries :: Lens' Search (Maybe SearchQueries) sQueries = lens _sQueries (\ s a -> s{_sQueries = a}) @@ -1339,12 +1380,15 @@ -- -- /See:/ 'contextFacetsItemItem' smart constructor.-data ContextFacetsItemItem = ContextFacetsItemItem'+data ContextFacetsItemItem =+ ContextFacetsItemItem' { _cfiiAnchor :: !(Maybe Text) , _cfiiLabelWithOp :: !(Maybe Text) , _cfiiLabel :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'ContextFacetsItemItem' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -1357,11 +1401,9 @@ contextFacetsItemItem :: ContextFacetsItemItem contextFacetsItemItem =- ContextFacetsItemItem'- { _cfiiAnchor = Nothing- , _cfiiLabelWithOp = Nothing- , _cfiiLabel = Nothing- }+ ContextFacetsItemItem'+ {_cfiiAnchor = Nothing, _cfiiLabelWithOp = Nothing, _cfiiLabel = Nothing}+ cfiiAnchor :: Lens' ContextFacetsItemItem (Maybe Text) cfiiAnchor
gen/Network/Google/Resource/Search/CSE/List.hs view
@@ -141,7 +141,8 @@ -- search engine used for the search, and the search results. -- -- /See:/ 'cSEList' smart constructor.-data CSEList = CSEList'+data CSEList =+ CSEList' { _cselImgDominantColor :: !(Maybe CSEListImgDominantColor) , _cselSiteSearchFilter :: !(Maybe CSEListSiteSearchFilter) , _cselC2coff :: !(Maybe Text)@@ -173,8 +174,10 @@ , _cselSafe :: !CSEListSafe , _cselHq :: !(Maybe Text) , _cselHighRange :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'CSEList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -244,7 +247,7 @@ :: Text -- ^ 'cselQ' -> CSEList cSEList pCselQ_ =- CSEList'+ CSEList' { _cselImgDominantColor = Nothing , _cselSiteSearchFilter = Nothing , _cselC2coff = Nothing@@ -277,6 +280,7 @@ , _cselHq = Nothing , _cselHighRange = Nothing }+ -- | Returns images of a specific dominant color: red, orange, yellow, green, -- teal, blue, purple, pink, white, gray, black and brown.
gen/Network/Google/Resource/Search/CSE/Siterestrict/List.hs view
@@ -151,7 +151,8 @@ -- set of url patterns. -- -- /See:/ 'cSESiterestrictList' smart constructor.-data CSESiterestrictList = CSESiterestrictList'+data CSESiterestrictList =+ CSESiterestrictList' { _cseslImgDominantColor :: !(Maybe CSESiterestrictListImgDominantColor) , _cseslSiteSearchFilter :: !(Maybe CSESiterestrictListSiteSearchFilter) , _cseslC2coff :: !(Maybe Text)@@ -183,8 +184,10 @@ , _cseslSafe :: !CSESiterestrictListSafe , _cseslHq :: !(Maybe Text) , _cseslHighRange :: !(Maybe Text)- } deriving (Eq,Show,Data,Typeable,Generic)+ }+ deriving (Eq, Show, Data, Typeable, Generic) + -- | Creates a value of 'CSESiterestrictList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired:@@ -254,7 +257,7 @@ :: Text -- ^ 'cseslQ' -> CSESiterestrictList cSESiterestrictList pCseslQ_ =- CSESiterestrictList'+ CSESiterestrictList' { _cseslImgDominantColor = Nothing , _cseslSiteSearchFilter = Nothing , _cseslC2coff = Nothing@@ -287,6 +290,7 @@ , _cseslHq = Nothing , _cseslHighRange = Nothing }+ -- | Returns images of a specific dominant color: red, orange, yellow, green, -- teal, blue, purple, pink, white, gray, black and brown.
gogol-customsearch.cabal view
@@ -1,5 +1,5 @@ name: gogol-customsearch-version: 0.4.0+version: 0.5.0 synopsis: Google CustomSearch SDK. homepage: https://github.com/brendanhay/gogol bug-reports: https://github.com/brendanhay/gogol/issues@@ -43,5 +43,5 @@ , Network.Google.CustomSearch.Types.Sum build-depends:- gogol-core == 0.4.0.*+ gogol-core == 0.5.0.* , base >= 4.7 && < 5