on develop help sign in
Renaming pagespeed acronyms
commit2a639837e9d5891dfa6ec3a44962291f540e3f21 authorBrendan Hay <brendan.g.hay@gmail.com> dateWed 7 Oct 2015, 11:28 (11 years ago) parent9ea0bb9
7 files changed+276−265
gen/src/Gen/Text.hs+24−21 gogol-pagespeed/gen/Network/Google/PageSpeed.hs+6−6 gogol-pagespeed/gen/Network/Google/PageSpeed/Types.hs+2−2 gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Sum.hs+7−7 gogol-pagespeed/gen/Network/Google/Resource/PagespeedOnline/PagespeedAPI/RunPagespeed.hs+236 gogol-pagespeed/gen/Network/Google/Resource/Pagespeedonline/Pagespeedapi/Runpagespeed.hs−228 gogol-pagespeed/gogol-pagespeed.cabal+1−1
gen/src/Gen/Text.hs+24−21
@@ -160,33 +160,50 @@ upperAcronym x = Fold.foldl' (flip (uncurry RE.replaceAll)) x xs
160160 , ("Adm([^i]|$)", "ADM$1")
161161 , ("Aes", "AES")
162162 , ("Api", "API")
163+ , ("Apk", "APK")
163164 , ("Apns", "APNS")
164165 , ("Asn", "ASN")
165166 , ("Bgp", "BGP")
166167 , ("Cidr", "CIDR")
168+ , ("Cnc", "CNC")
167169 , ("Cors", "CORS")
168− , ("Csv", "CSV")
169170 , ("Cpu", "CPU")
171+ , ("Cse$", "CSE")
172+ , ("Csv", "CSV")
170173 , ("Db", "DB")
171174 , ("Dhcp", "DHCP")
172175 , ("Dns", "DNS")
176+ , ("Dto", "DTO")
177+ , ("Eq([^u]|$)", "EQ$1")
178+ , ("Gan$", "GAN")
173179 , ("Gcm", "GCM")
180+ , ("Gt$", "GT")
181+ , ("Hsm", "HSM")
174182 , ("Html", "HTML")
175− , ("Https", "HTTPS")
176183 , ("Http([^s]|$)", "HTTP$1")
177− , ("Hsm", "HSM")
184+ , ("Https", "HTTPS")
178185 , ("Hvm", "HVM")
186+ , ("ID", "Id")
179187 , ("Iam", "IAM")
180188 , ("Icmp", "ICMP")
181189 , ("Ip", "IP")
182190 , ("Json", "JSON")
183191 , ("Jvm", "JVM")
192+ , ("Jwk", "JWK")
193+ , ("Lt$", "LT")
184194 , ("Mac([^hr]|$)", "MAC$1")
185195 , ("Md5", "MD5")
196+ , ("Nat", "NAT")
197+ , ("Oauth", "OAuth")
198+ , ("Ocr", "OCR")
199+ , ("Oob", "OOB")
200+ , ("Os", "OS")
186201 , ("Raid", "RAID")
187202 , ("Ramdisk", "RAMDisk")
188203 , ("Sgd", "SGD")
204+ , ("Sku", "SKU")
189205 , ("Sni([^p]|$)", "SNI$1")
206+ , ("Sql", "SQL")
190207 , ("Ssh", "SSH")
191208 , ("Ssl", "SSL")
192209 , ("Svn", "SVN")
@@ -202,24 +219,7 @@ upperAcronym x = Fold.foldl' (flip (uncurry RE.replaceAll)) x xs
202219 , ("Vpc", "VPC")
203220 , ("Vpn", "VPN")
204221 , ("Xml", "XML")
205− , ("ID", "Id")
206− , ("Eq([^u]|$)", "EQ$1")
207− , ("Lt$", "LT")
208− , ("Gt$", "GT")
209− , ("Nat", "NAT")
210222 , ("Youtube", "YouTube")
211− , ("Cnc", "CNC")
212− , ("Oauth", "OAuth")
213− , ("Ocr", "OCR")
214− , ("Sql", "SQL")
215− , ("Apk", "APK")
216− , ("Os", "OS")
217− , ("Oob", "OOB")
218− , ("Jwk", "JWK")
219− , ("Dto", "DTO")
220− , ("Sku", "SKU")
221− , ("Cse$", "CSE")
222− , ("Gan$", "GAN")
223223
224224 , ("([^ypn])load", "$1Load")
225225 , ("access", "Access")
@@ -240,6 +240,7 @@ upperAcronym x = Fold.foldl' (flip (uncurry RE.replaceAll)) x xs
240240 , ("engine", "Engine")
241241 , ("enterprise", "Enterprise")
242242 , ("error", "Error")
243+ , ("file", "File")
243244 , ("info", "Info")
244245 , ("library", "Library")
245246 , ("list", "List")
@@ -249,6 +250,7 @@ upperAcronym x = Fold.foldl' (flip (uncurry RE.replaceAll)) x xs
249250 , ("note", "Note")
250251 , ("observe", "Observe")
251252 , ("offer", "Offer")
253+ , ("online", "Online")
252254 , ("order", "Order")
253255 , ("part", "Part")
254256 , ("position", "Position")
@@ -265,7 +267,8 @@ upperAcronym x = Fold.foldl' (flip (uncurry RE.replaceAll)) x xs
265267 , ("unit", "Unit")
266268 , ("upload", "Upload")
267269 , ("user", "User")
268− , ("file", "File")
270+ , ("pagespeed", "Pagespeed")
271+ , ("dapi", "dAPI")
269272 ]
270273
271274acronyms :: [(String, String)]
gogol-pagespeed/gen/Network/Google/PageSpeed.hs+6−6
@@ -28,8 +28,8 @@ module Network.Google.PageSpeed
2828
2929 -- * REST Resources
3030
31− -- ** PagespeedonlinePagespeedapiRunpagespeed
32− , module Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed
31+ -- ** PagespeedOnlinePagespeedAPIRunPagespeed
32+ , module Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed
3333
3434 -- * Types
3535
@@ -59,8 +59,8 @@ module Network.Google.PageSpeed
5959 , pafsvairiWidth
6060 , pafsvairiTop
6161
62− -- ** PagespeedapiRunpagespeedStrategy
63− , PagespeedapiRunpagespeedStrategy (..)
62+ -- ** PagespeedAPIRunPagespeedStrategy
63+ , PagespeedAPIRunPagespeedStrategy (..)
6464
6565 -- ** ResultVersion
6666 , ResultVersion
@@ -139,13 +139,13 @@ module Network.Google.PageSpeed
139139
140140import Network.Google.PageSpeed.Types
141141import Network.Google.Prelude
142−import Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed
142+import Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed
143143
144144{- $resources
145145TODO
146146-}
147147
148−type PageSpeedAPI = PagespeedapiRunpagespeedResource
148+type PageSpeedAPI = PagespeedAPIRunPagespeedResource
149149
150150pageSpeedAPI :: Proxy PageSpeedAPI
151151pageSpeedAPI = Proxy
gogol-pagespeed/gen/Network/Google/PageSpeed/Types.hs+2−2
@@ -44,8 +44,8 @@ module Network.Google.PageSpeed.Types
4444 , pafsvairiWidth
4545 , pafsvairiTop
4646
47− -- * PagespeedapiRunpagespeedStrategy
48− , PagespeedapiRunpagespeedStrategy (..)
47+ -- * PagespeedAPIRunPagespeedStrategy
48+ , PagespeedAPIRunPagespeedStrategy (..)
4949
5050 -- * ResultVersion
5151 , ResultVersion
gogol-pagespeed/gen/Network/Google/PageSpeed/Types/Sum.hs+7−7
@@ -19,7 +19,7 @@ module Network.Google.PageSpeed.Types.Sum where
1919import Network.Google.Prelude
2020
2121-- | The analysis strategy to use
22−data PagespeedapiRunpagespeedStrategy
22+data PagespeedAPIRunPagespeedStrategy
2323 = Desktop
2424 -- ^ @desktop@
2525 -- Fetch and analyze the URL for desktop browsers
@@ -28,21 +28,21 @@ data PagespeedapiRunpagespeedStrategy
2828 -- Fetch and analyze the URL for mobile devices
2929 deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
3030
31−instance Hashable PagespeedapiRunpagespeedStrategy
31+instance Hashable PagespeedAPIRunPagespeedStrategy
3232
33−instance FromText PagespeedapiRunpagespeedStrategy where
33+instance FromText PagespeedAPIRunPagespeedStrategy where
3434 fromText = \case
3535 "desktop" -> Just Desktop
3636 "mobile" -> Just Mobile
3737 _ -> Nothing
3838
39−instance ToText PagespeedapiRunpagespeedStrategy where
39+instance ToText PagespeedAPIRunPagespeedStrategy where
4040 toText = \case
4141 Desktop -> "desktop"
4242 Mobile -> "mobile"
4343
44−instance FromJSON PagespeedapiRunpagespeedStrategy where
45− parseJSON = parseJSONText "PagespeedapiRunpagespeedStrategy"
44+instance FromJSON PagespeedAPIRunPagespeedStrategy where
45+ parseJSON = parseJSONText "PagespeedAPIRunPagespeedStrategy"
4646
47−instance ToJSON PagespeedapiRunpagespeedStrategy where
47+instance ToJSON PagespeedAPIRunPagespeedStrategy where
4848 toJSON = toJSONText
gogol-pagespeed/gen/Network/Google/Resource/PagespeedOnline/PagespeedAPI/RunPagespeed.hsnew file+236
@@ -0,0 +1,236 @@
1+{-# LANGUAGE DataKinds #-}
2+{-# LANGUAGE DeriveDataTypeable #-}
3+{-# LANGUAGE DeriveGeneric #-}
4+{-# LANGUAGE FlexibleInstances #-}
5+{-# LANGUAGE NoImplicitPrelude #-}
6+{-# LANGUAGE OverloadedStrings #-}
7+{-# LANGUAGE RecordWildCards #-}
8+{-# LANGUAGE TypeFamilies #-}
9+{-# LANGUAGE TypeOperators #-}
10+
11+{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12+{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14+
15+-- |
16+-- Module : Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed
17+-- Copyright : (c) 2015 Brendan Hay
18+-- License : Mozilla Public License, v. 2.0.
19+-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20+-- Stability : auto-generated
21+-- Portability : non-portable (GHC extensions)
22+--
23+-- | Runs PageSpeed analysis on the page at the specified URL, and returns
24+-- PageSpeed scores, a list of suggestions to make that page faster, and
25+-- other information.
26+--
27+-- /See:/ <https://developers.google.com/speed/docs/insights/v2/getting-started PageSpeed Insights API Reference> for @PagespeedOnlinePagespeedAPIRunPagespeed@.
28+module Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed
29+ (
30+ -- * REST Resource
31+ PagespeedAPIRunPagespeedResource
32+
33+ -- * Creating a Request
34+ , pagespeedAPIRunPagespeed'
35+ , PagespeedAPIRunPagespeed'
36+
37+ -- * Request Lenses
38+ , parpScreenshot
39+ , parpQuotaUser
40+ , parpPrettyPrint
41+ , parpUserIP
42+ , parpLocale
43+ , parpURL
44+ , parpFilterThirdPartyResources
45+ , parpStrategy
46+ , parpRule
47+ , parpKey
48+ , parpOAuthToken
49+ , parpFields
50+ ) where
51+
52+import Network.Google.PageSpeed.Types
53+import Network.Google.Prelude
54+
55+-- | A resource alias for @PagespeedOnlinePagespeedAPIRunPagespeed@ which the
56+-- 'PagespeedAPIRunPagespeed'' request conforms to.
57+type PagespeedAPIRunPagespeedResource =
58+ "runPagespeed" :>
59+ QueryParam "url" Text :>
60+ QueryParam "screenshot" Bool :>
61+ QueryParam "locale" Text :>
62+ QueryParam "filter_third_party_resources" Bool :>
63+ QueryParam "strategy"
64+ PagespeedAPIRunPagespeedStrategy
65+ :>
66+ QueryParams "rule" Text :>
67+ QueryParam "quotaUser" Text :>
68+ QueryParam "prettyPrint" Bool :>
69+ QueryParam "userIp" Text :>
70+ QueryParam "fields" Text :>
71+ QueryParam "key" AuthKey :>
72+ QueryParam "oauth_token" OAuthToken :>
73+ QueryParam "alt" AltJSON :> Get '[JSON] Result
74+
75+-- | Runs PageSpeed analysis on the page at the specified URL, and returns
76+-- PageSpeed scores, a list of suggestions to make that page faster, and
77+-- other information.
78+--
79+-- /See:/ 'pagespeedAPIRunPagespeed'' smart constructor.
80+data PagespeedAPIRunPagespeed' = PagespeedAPIRunPagespeed'
81+ { _parpScreenshot :: !Bool
82+ , _parpQuotaUser :: !(Maybe Text)
83+ , _parpPrettyPrint :: !Bool
84+ , _parpUserIP :: !(Maybe Text)
85+ , _parpLocale :: !(Maybe Text)
86+ , _parpURL :: !Text
87+ , _parpFilterThirdPartyResources :: !Bool
88+ , _parpStrategy :: !(Maybe PagespeedAPIRunPagespeedStrategy)
89+ , _parpRule :: !(Maybe [Text])
90+ , _parpKey :: !(Maybe AuthKey)
91+ , _parpOAuthToken :: !(Maybe OAuthToken)
92+ , _parpFields :: !(Maybe Text)
93+ } deriving (Eq,Show,Data,Typeable,Generic)
94+
95+-- | Creates a value of 'PagespeedAPIRunPagespeed'' with the minimum fields required to make a request.
96+--
97+-- Use one of the following lenses to modify other fields as desired:
98+--
99+-- * 'parpScreenshot'
100+--
101+-- * 'parpQuotaUser'
102+--
103+-- * 'parpPrettyPrint'
104+--
105+-- * 'parpUserIP'
106+--
107+-- * 'parpLocale'
108+--
109+-- * 'parpURL'
110+--
111+-- * 'parpFilterThirdPartyResources'
112+--
113+-- * 'parpStrategy'
114+--
115+-- * 'parpRule'
116+--
117+-- * 'parpKey'
118+--
119+-- * 'parpOAuthToken'
120+--
121+-- * 'parpFields'
122+pagespeedAPIRunPagespeed'
123+ :: Text -- ^ 'url'
124+ -> PagespeedAPIRunPagespeed'
125+pagespeedAPIRunPagespeed' pParpURL_ =
126+ PagespeedAPIRunPagespeed'
127+ { _parpScreenshot = False
128+ , _parpQuotaUser = Nothing
129+ , _parpPrettyPrint = True
130+ , _parpUserIP = Nothing
131+ , _parpLocale = Nothing
132+ , _parpURL = pParpURL_
133+ , _parpFilterThirdPartyResources = False
134+ , _parpStrategy = Nothing
135+ , _parpRule = Nothing
136+ , _parpKey = Nothing
137+ , _parpOAuthToken = Nothing
138+ , _parpFields = Nothing
139+ }
140+
141+-- | Indicates if binary data containing a screenshot should be included
142+parpScreenshot :: Lens' PagespeedAPIRunPagespeed' Bool
143+parpScreenshot
144+ = lens _parpScreenshot
145+ (\ s a -> s{_parpScreenshot = a})
146+
147+-- | Available to use for quota purposes for server-side applications. Can be
148+-- any arbitrary string assigned to a user, but should not exceed 40
149+-- characters. Overrides userIp if both are provided.
150+parpQuotaUser :: Lens' PagespeedAPIRunPagespeed' (Maybe Text)
151+parpQuotaUser
152+ = lens _parpQuotaUser
153+ (\ s a -> s{_parpQuotaUser = a})
154+
155+-- | Returns response with indentations and line breaks.
156+parpPrettyPrint :: Lens' PagespeedAPIRunPagespeed' Bool
157+parpPrettyPrint
158+ = lens _parpPrettyPrint
159+ (\ s a -> s{_parpPrettyPrint = a})
160+
161+-- | IP address of the site where the request originates. Use this if you
162+-- want to enforce per-user limits.
163+parpUserIP :: Lens' PagespeedAPIRunPagespeed' (Maybe Text)
164+parpUserIP
165+ = lens _parpUserIP (\ s a -> s{_parpUserIP = a})
166+
167+-- | The locale used to localize formatted results
168+parpLocale :: Lens' PagespeedAPIRunPagespeed' (Maybe Text)
169+parpLocale
170+ = lens _parpLocale (\ s a -> s{_parpLocale = a})
171+
172+-- | The URL to fetch and analyze
173+parpURL :: Lens' PagespeedAPIRunPagespeed' Text
174+parpURL = lens _parpURL (\ s a -> s{_parpURL = a})
175+
176+-- | Indicates if third party resources should be filtered out before
177+-- PageSpeed analysis.
178+parpFilterThirdPartyResources :: Lens' PagespeedAPIRunPagespeed' Bool
179+parpFilterThirdPartyResources
180+ = lens _parpFilterThirdPartyResources
181+ (\ s a -> s{_parpFilterThirdPartyResources = a})
182+
183+-- | The analysis strategy to use
184+parpStrategy :: Lens' PagespeedAPIRunPagespeed' (Maybe PagespeedAPIRunPagespeedStrategy)
185+parpStrategy
186+ = lens _parpStrategy (\ s a -> s{_parpStrategy = a})
187+
188+-- | A PageSpeed rule to run; if none are given, all rules are run
189+parpRule :: Lens' PagespeedAPIRunPagespeed' [Text]
190+parpRule
191+ = lens _parpRule (\ s a -> s{_parpRule = a}) .
192+ _Default
193+ . _Coerce
194+
195+-- | API key. Your API key identifies your project and provides you with API
196+-- access, quota, and reports. Required unless you provide an OAuth 2.0
197+-- token.
198+parpKey :: Lens' PagespeedAPIRunPagespeed' (Maybe AuthKey)
199+parpKey = lens _parpKey (\ s a -> s{_parpKey = a})
200+
201+-- | OAuth 2.0 token for the current user.
202+parpOAuthToken :: Lens' PagespeedAPIRunPagespeed' (Maybe OAuthToken)
203+parpOAuthToken
204+ = lens _parpOAuthToken
205+ (\ s a -> s{_parpOAuthToken = a})
206+
207+-- | Selector specifying which fields to include in a partial response.
208+parpFields :: Lens' PagespeedAPIRunPagespeed' (Maybe Text)
209+parpFields
210+ = lens _parpFields (\ s a -> s{_parpFields = a})
211+
212+instance GoogleAuth PagespeedAPIRunPagespeed' where
213+ _AuthKey = parpKey . _Just
214+ _AuthToken = parpOAuthToken . _Just
215+
216+instance GoogleRequest PagespeedAPIRunPagespeed'
217+ where
218+ type Rs PagespeedAPIRunPagespeed' = Result
219+ request = requestWith pageSpeedRequest
220+ requestWith rq PagespeedAPIRunPagespeed'{..}
221+ = go (Just _parpURL) (Just _parpScreenshot)
222+ _parpLocale
223+ (Just _parpFilterThirdPartyResources)
224+ _parpStrategy
225+ (_parpRule ^. _Default)
226+ _parpQuotaUser
227+ (Just _parpPrettyPrint)
228+ _parpUserIP
229+ _parpFields
230+ _parpKey
231+ _parpOAuthToken
232+ (Just AltJSON)
233+ where go
234+ = clientBuild
235+ (Proxy :: Proxy PagespeedAPIRunPagespeedResource)
236+ rq
gogol-pagespeed/gen/Network/Google/Resource/Pagespeedonline/Pagespeedapi/Runpagespeed.hsdeleted−228
@@ -1,228 +0,0 @@
1−{-# LANGUAGE DataKinds #-}
2−{-# LANGUAGE DeriveDataTypeable #-}
3−{-# LANGUAGE DeriveGeneric #-}
4−{-# LANGUAGE FlexibleInstances #-}
5−{-# LANGUAGE NoImplicitPrelude #-}
6−{-# LANGUAGE OverloadedStrings #-}
7−{-# LANGUAGE RecordWildCards #-}
8−{-# LANGUAGE TypeFamilies #-}
9−{-# LANGUAGE TypeOperators #-}
10−
11−{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
12−{-# OPTIONS_GHC -fno-warn-unused-binds #-}
13−{-# OPTIONS_GHC -fno-warn-unused-imports #-}
14−
15−-- |
16−-- Module : Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed
17−-- Copyright : (c) 2015 Brendan Hay
18−-- License : Mozilla Public License, v. 2.0.
19−-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>
20−-- Stability : auto-generated
21−-- Portability : non-portable (GHC extensions)
22−--
23−-- | Runs PageSpeed analysis on the page at the specified URL, and returns
24−-- PageSpeed scores, a list of suggestions to make that page faster, and
25−-- other information.
26−--
27−-- /See:/ <https://developers.google.com/speed/docs/insights/v2/getting-started PageSpeed Insights API Reference> for @PagespeedonlinePagespeedapiRunpagespeed@.
28−module Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed
29− (
30− -- * REST Resource
31− PagespeedapiRunpagespeedResource
32−
33− -- * Creating a Request
34− , pagespeedapiRunpagespeed'
35− , PagespeedapiRunpagespeed'
36−
37− -- * Request Lenses
38− , prScreenshot
39− , prQuotaUser
40− , prPrettyPrint
41− , prUserIP
42− , prLocale
43− , prURL
44− , prFilterThirdPartyResources
45− , prStrategy
46− , prRule
47− , prKey
48− , prOAuthToken
49− , prFields
50− ) where
51−
52−import Network.Google.PageSpeed.Types
53−import Network.Google.Prelude
54−
55−-- | A resource alias for @PagespeedonlinePagespeedapiRunpagespeed@ which the
56−-- 'PagespeedapiRunpagespeed'' request conforms to.
57−type PagespeedapiRunpagespeedResource =
58− "runPagespeed" :>
59− QueryParam "url" Text :>
60− QueryParam "screenshot" Bool :>
61− QueryParam "locale" Text :>
62− QueryParam "filter_third_party_resources" Bool :>
63− QueryParam "strategy"
64− PagespeedapiRunpagespeedStrategy
65− :>
66− QueryParams "rule" Text :>
67− QueryParam "quotaUser" Text :>
68− QueryParam "prettyPrint" Bool :>
69− QueryParam "userIp" Text :>
70− QueryParam "fields" Text :>
71− QueryParam "key" AuthKey :>
72− QueryParam "oauth_token" OAuthToken :>
73− QueryParam "alt" AltJSON :> Get '[JSON] Result
74−
75−-- | Runs PageSpeed analysis on the page at the specified URL, and returns
76−-- PageSpeed scores, a list of suggestions to make that page faster, and
77−-- other information.
78−--
79−-- /See:/ 'pagespeedapiRunpagespeed'' smart constructor.
80−data PagespeedapiRunpagespeed' = PagespeedapiRunpagespeed'
81− { _prScreenshot :: !Bool
82− , _prQuotaUser :: !(Maybe Text)
83− , _prPrettyPrint :: !Bool
84− , _prUserIP :: !(Maybe Text)
85− , _prLocale :: !(Maybe Text)
86− , _prURL :: !Text
87− , _prFilterThirdPartyResources :: !Bool
88− , _prStrategy :: !(Maybe PagespeedapiRunpagespeedStrategy)
89− , _prRule :: !(Maybe [Text])
90− , _prKey :: !(Maybe AuthKey)
91− , _prOAuthToken :: !(Maybe OAuthToken)
92− , _prFields :: !(Maybe Text)
93− } deriving (Eq,Show,Data,Typeable,Generic)
94−
95−-- | Creates a value of 'PagespeedapiRunpagespeed'' with the minimum fields required to make a request.
96−--
97−-- Use one of the following lenses to modify other fields as desired:
98−--
99−-- * 'prScreenshot'
100−--
101−-- * 'prQuotaUser'
102−--
103−-- * 'prPrettyPrint'
104−--
105−-- * 'prUserIP'
106−--
107−-- * 'prLocale'
108−--
109−-- * 'prURL'
110−--
111−-- * 'prFilterThirdPartyResources'
112−--
113−-- * 'prStrategy'
114−--
115−-- * 'prRule'
116−--
117−-- * 'prKey'
118−--
119−-- * 'prOAuthToken'
120−--
121−-- * 'prFields'
122−pagespeedapiRunpagespeed'
123− :: Text -- ^ 'url'
124− -> PagespeedapiRunpagespeed'
125−pagespeedapiRunpagespeed' pPrURL_ =
126− PagespeedapiRunpagespeed'
127− { _prScreenshot = False
128− , _prQuotaUser = Nothing
129− , _prPrettyPrint = True
130− , _prUserIP = Nothing
131− , _prLocale = Nothing
132− , _prURL = pPrURL_
133− , _prFilterThirdPartyResources = False
134− , _prStrategy = Nothing
135− , _prRule = Nothing
136− , _prKey = Nothing
137− , _prOAuthToken = Nothing
138− , _prFields = Nothing
139− }
140−
141−-- | Indicates if binary data containing a screenshot should be included
142−prScreenshot :: Lens' PagespeedapiRunpagespeed' Bool
143−prScreenshot
144− = lens _prScreenshot (\ s a -> s{_prScreenshot = a})
145−
146−-- | Available to use for quota purposes for server-side applications. Can be
147−-- any arbitrary string assigned to a user, but should not exceed 40
148−-- characters. Overrides userIp if both are provided.
149−prQuotaUser :: Lens' PagespeedapiRunpagespeed' (Maybe Text)
150−prQuotaUser
151− = lens _prQuotaUser (\ s a -> s{_prQuotaUser = a})
152−
153−-- | Returns response with indentations and line breaks.
154−prPrettyPrint :: Lens' PagespeedapiRunpagespeed' Bool
155−prPrettyPrint
156− = lens _prPrettyPrint
157− (\ s a -> s{_prPrettyPrint = a})
158−
159−-- | IP address of the site where the request originates. Use this if you
160−-- want to enforce per-user limits.
161−prUserIP :: Lens' PagespeedapiRunpagespeed' (Maybe Text)
162−prUserIP = lens _prUserIP (\ s a -> s{_prUserIP = a})
163−
164−-- | The locale used to localize formatted results
165−prLocale :: Lens' PagespeedapiRunpagespeed' (Maybe Text)
166−prLocale = lens _prLocale (\ s a -> s{_prLocale = a})
167−
168−-- | The URL to fetch and analyze
169−prURL :: Lens' PagespeedapiRunpagespeed' Text
170−prURL = lens _prURL (\ s a -> s{_prURL = a})
171−
172−-- | Indicates if third party resources should be filtered out before
173−-- PageSpeed analysis.
174−prFilterThirdPartyResources :: Lens' PagespeedapiRunpagespeed' Bool
175−prFilterThirdPartyResources
176− = lens _prFilterThirdPartyResources
177− (\ s a -> s{_prFilterThirdPartyResources = a})
178−
179−-- | The analysis strategy to use
180−prStrategy :: Lens' PagespeedapiRunpagespeed' (Maybe PagespeedapiRunpagespeedStrategy)
181−prStrategy
182− = lens _prStrategy (\ s a -> s{_prStrategy = a})
183−
184−-- | A PageSpeed rule to run; if none are given, all rules are run
185−prRule :: Lens' PagespeedapiRunpagespeed' [Text]
186−prRule
187− = lens _prRule (\ s a -> s{_prRule = a}) . _Default .
188− _Coerce
189−
190−-- | API key. Your API key identifies your project and provides you with API
191−-- access, quota, and reports. Required unless you provide an OAuth 2.0
192−-- token.
193−prKey :: Lens' PagespeedapiRunpagespeed' (Maybe AuthKey)
194−prKey = lens _prKey (\ s a -> s{_prKey = a})
195−
196−-- | OAuth 2.0 token for the current user.
197−prOAuthToken :: Lens' PagespeedapiRunpagespeed' (Maybe OAuthToken)
198−prOAuthToken
199− = lens _prOAuthToken (\ s a -> s{_prOAuthToken = a})
200−
201−-- | Selector specifying which fields to include in a partial response.
202−prFields :: Lens' PagespeedapiRunpagespeed' (Maybe Text)
203−prFields = lens _prFields (\ s a -> s{_prFields = a})
204−
205−instance GoogleAuth PagespeedapiRunpagespeed' where
206− _AuthKey = prKey . _Just
207− _AuthToken = prOAuthToken . _Just
208−
209−instance GoogleRequest PagespeedapiRunpagespeed'
210− where
211− type Rs PagespeedapiRunpagespeed' = Result
212− request = requestWith pageSpeedRequest
213− requestWith rq PagespeedapiRunpagespeed'{..}
214− = go (Just _prURL) (Just _prScreenshot) _prLocale
215− (Just _prFilterThirdPartyResources)
216− _prStrategy
217− (_prRule ^. _Default)
218− _prQuotaUser
219− (Just _prPrettyPrint)
220− _prUserIP
221− _prFields
222− _prKey
223− _prOAuthToken
224− (Just AltJSON)
225− where go
226− = clientBuild
227− (Proxy :: Proxy PagespeedapiRunpagespeedResource)
228− rq
gogol-pagespeed/gogol-pagespeed.cabal+1−1
@@ -33,7 +33,7 @@ library
3333 exposed-modules:
3434 Network.Google.PageSpeed
3535 , Network.Google.PageSpeed.Types
36− , Network.Google.Resource.Pagespeedonline.Pagespeedapi.Runpagespeed
36+ , Network.Google.Resource.PagespeedOnline.PagespeedAPI.RunPagespeed
3737
3838 other-modules:
3939 Network.Google.PageSpeed.Types.Product