gogol-pagespeed-0.0.1: Google PageSpeed Insights SDK.

Copyright(c) 2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.Google.PageSpeed

Contents

Description

Lets you analyze the performance of a web page and get tailored suggestions to make that page faster.

See: PageSpeed Insights API Reference

Synopsis

Service Configuration

pageSpeedService :: Service Source

Default request referring to version v2 of the PageSpeed Insights API. This contains the host and root path used as a starting point for constructing service requests.

API Declaration

type PageSpeedAPI = PagespeedAPIRunPagespeedResource Source

Represents the entirety of the methods and resources available for the PageSpeed Insights API service.

Resources

pagespeedonline.pagespeedapi.runpagespeed

Types

ResultFormattedResultsRuleResultsAdditionalURLBlocksItem

resultFormattedResultsRuleResultsAdditionalURLBlocksItem :: ResultFormattedResultsRuleResultsAdditionalURLBlocksItem Source

Creates a value of ResultFormattedResultsRuleResultsAdditionalURLBlocksItem with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem

pafsvaisiLeft :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32) Source

The left coordinate of the rect, in page coordinates.

pafsvaisiTop :: Lens' PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem (Maybe Int32) Source

The top coordinate of the rect, in page coordinates.

PagespeedAPIImageV2

pagespeedAPIImageV2 :: PagespeedAPIImageV2 Source

Creates a value of PagespeedAPIImageV2 with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

paivHeight :: Lens' PagespeedAPIImageV2 (Maybe Int32) Source

Height of screenshot in pixels.

paivData :: Lens' PagespeedAPIImageV2 (Maybe Word8) Source

Image data base64 encoded.

paivMimeType :: Lens' PagespeedAPIImageV2 (Maybe Text) Source

Mime type of image data (e.g. "image/jpeg").

paivWidth :: Lens' PagespeedAPIImageV2 (Maybe Int32) Source

Width of screenshot in pixels.

paivPageRect :: Lens' PagespeedAPIImageV2 (Maybe PagespeedAPIImageV2Page_rect) Source

The region of the page that is captured by this image, with dimensions measured in CSS pixels.

paivKey :: Lens' PagespeedAPIImageV2 (Maybe Text) Source

Unique string key, if any, identifying this image.

PagespeedAPIFormatStringV2ArgsItemRectsItem

pagespeedAPIFormatStringV2ArgsItemRectsItem :: PagespeedAPIFormatStringV2ArgsItemRectsItem Source

Creates a value of PagespeedAPIFormatStringV2ArgsItemRectsItem with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pafsvairiLeft :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32) Source

The left coordinate of the rect, in page coordinates.

pafsvairiTop :: Lens' PagespeedAPIFormatStringV2ArgsItemRectsItem (Maybe Int32) Source

The top coordinate of the rect, in page coordinates.

PagespeedAPIRunPagespeedStrategy

ResultVersion

resultVersion :: ResultVersion Source

Creates a value of ResultVersion with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rvMinor :: Lens' ResultVersion (Maybe Int32) Source

The minor version number of PageSpeed used to generate these results.

rvMajor :: Lens' ResultVersion (Maybe Int32) Source

The major version number of PageSpeed used to generate these results.

ResultPageStats

data ResultPageStats Source

Summary statistics for the page, such as number of JavaScript bytes, number of HTML bytes, etc.

See: resultPageStats smart constructor.

rpsHTMLResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of uncompressed response bytes for the main HTML document and all iframes on the page.

rpsTotalRequestBytes :: Lens' ResultPageStats (Maybe Int64) Source

Total size of all request bytes sent by the page.

rpsNumberResources :: Lens' ResultPageStats (Maybe Int32) Source

Number of HTTP resources loaded by the page.

rpsNumberStaticResources :: Lens' ResultPageStats (Maybe Int32) Source

Number of static (i.e. cacheable) resources on the page.

rpsNumberHosts :: Lens' ResultPageStats (Maybe Int32) Source

Number of unique hosts referenced by the page.

rpsNumberJsResources :: Lens' ResultPageStats (Maybe Int32) Source

Number of JavaScript resources referenced by the page.

rpsNumberCssResources :: Lens' ResultPageStats (Maybe Int32) Source

Number of CSS resources referenced by the page.

rpsTextResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of uncompressed response bytes for text resources not covered by other statistics (i.e non-HTML, non-script, non-CSS resources) on the page.

rpsFlashResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of response bytes for flash resources on the page.

rpsImageResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of response bytes for image resources on the page.

rpsOtherResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of response bytes for other resources on the page.

rpsJavascriptResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of uncompressed response bytes for JS resources on the page.

rpsCssResponseBytes :: Lens' ResultPageStats (Maybe Int64) Source

Number of uncompressed response bytes for CSS resources on the page.

PagespeedAPIImageV2Page_rect

pagespeedAPIImageV2Page_rect :: PagespeedAPIImageV2Page_rect Source

Creates a value of PagespeedAPIImageV2Page_rect with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

paivpLeft :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32) Source

The left coordinate of the rect, in page coordinates.

paivpTop :: Lens' PagespeedAPIImageV2Page_rect (Maybe Int32) Source

The top coordinate of the rect, in page coordinates.

Result

result :: Result Source

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:

rScreenshot :: Lens' Result (Maybe PagespeedAPIImageV2) Source

Base64-encoded screenshot of the page that was analyzed.

rKind :: Lens' Result Text Source

Kind of result.

rResponseCode :: Lens' Result (Maybe Int32) Source

Response code for the document. 200 indicates a normal page load. 4xx/5xx indicates an error.

rInvalidRules :: Lens' Result [Text] Source

List of rules that were specified in the request, but which the server did not know how to instantiate.

rFormattedResults :: Lens' Result (Maybe ResultFormattedResults) Source

Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed rule instantiated and run by the server.

rVersion :: Lens' Result (Maybe ResultVersion) Source

The version of PageSpeed used to generate these results.

rRuleGroups :: Lens' Result (Maybe ResultRuleGroups) Source

A map with one entry for each rule group in these results.

rPageStats :: Lens' Result (Maybe ResultPageStats) Source

Summary statistics for the page, such as number of JavaScript bytes, number of HTML bytes, etc.

rId :: Lens' Result (Maybe Text) Source

Canonicalized and final URL for the document, after following page redirects (if any).

rTitle :: Lens' Result (Maybe Text) Source

Title of the page, as displayed in the browser's title bar.

PagespeedAPIFormatStringV2ArgsItem

pagespeedAPIFormatStringV2ArgsItem :: PagespeedAPIFormatStringV2ArgsItem Source

Creates a value of PagespeedAPIFormatStringV2ArgsItem with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pafsvaiValue :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text) Source

Argument value, as a localized string.

pafsvaiRects :: Lens' PagespeedAPIFormatStringV2ArgsItem [PagespeedAPIFormatStringV2ArgsItemRectsItem] Source

The screen rectangles being referred to, with dimensions measured in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments. If this is absent for a SNAPSHOT_RECT argument, it means that that argument refers to the entire snapshot.

pafsvaiKey :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text) Source

The placeholder key for this arg, as a string.

pafsvaiType :: Lens' PagespeedAPIFormatStringV2ArgsItem (Maybe Text) Source

Type of argument. One of URL, STRING_LITERAL, INT_LITERAL, BYTES, DURATION, VERBATIM_STRING, PERCENTAGE, HYPERLINK, or SNAPSHOT_RECT.

pafsvaiSecondaryRects :: Lens' PagespeedAPIFormatStringV2ArgsItem [PagespeedAPIFormatStringV2ArgsItemSecondary_rectsItem] Source

Secondary screen rectangles being referred to, with dimensions measured in CSS pixels. This is only ever used for SNAPSHOT_RECT arguments.

ResultRuleGroupsAdditional

resultRuleGroupsAdditional :: ResultRuleGroupsAdditional Source

Creates a value of ResultRuleGroupsAdditional with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rrgaScore :: Lens' ResultRuleGroupsAdditional (Maybe Int32) Source

The score (0-100) for this rule group, which indicates how much better a page could be in that category (e.g. how much faster, or how much more usable). A high score indicates little room for improvement, while a lower score indicates more room for improvement.

ResultFormattedResults

data ResultFormattedResults Source

Localized PageSpeed results. Contains a ruleResults entry for each PageSpeed rule instantiated and run by the server.

See: resultFormattedResults smart constructor.

resultFormattedResults :: ResultFormattedResults Source

Creates a value of ResultFormattedResults with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rfrLocale :: Lens' ResultFormattedResults (Maybe Text) Source

The locale of the formattedResults, e.g. "en_US".

rfrRuleResults :: Lens' ResultFormattedResults (Maybe ResultFormattedResultsRuleResults) Source

Dictionary of formatted rule results, with one entry for each PageSpeed rule instantiated and run by the server.

ResultFormattedResultsRuleResultsAdditional

rfrrraSummary :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe PagespeedAPIFormatStringV2) Source

A brief summary description for the rule, indicating at a high level what should be done to follow the rule and what benefit can be gained by doing so.

rfrrraRuleImpact :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe Double) Source

The impact (unbounded floating point value) that implementing the suggestions for this rule would have on making the page faster. Impact is comparable between rules to determine which rule's suggestions would have a higher or lower impact on making a page faster. For instance, if enabling compression would save 1MB, while optimizing images would save 500kB, the enable compression rule would have 2x the impact of the image optimization rule, all other things being equal.

rfrrraGroups :: Lens' ResultFormattedResultsRuleResultsAdditional [Text] Source

List of rule groups that this rule belongs to. Each entry in the list is one of "SPEED" or "USABILITY".

rfrrraLocalizedRuleName :: Lens' ResultFormattedResultsRuleResultsAdditional (Maybe Text) Source

Localized name of the rule, intended for presentation to a user.

rfrrraURLBlocks :: Lens' ResultFormattedResultsRuleResultsAdditional [ResultFormattedResultsRuleResultsAdditionalURLBlocksItem] Source

List of blocks of URLs. Each block may contain a heading and a list of URLs. Each URL may optionally include additional details.

ResultRuleGroups

resultRuleGroups Source

Creates a value of ResultRuleGroups with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rrgAddtional :: Lens' ResultRuleGroups (HashMap Text ResultRuleGroupsAdditional) Source

The name of this rule group: one of "SPEED" or "USABILITY".

PagespeedAPIFormatStringV2

pagespeedAPIFormatStringV2 :: PagespeedAPIFormatStringV2 Source

Creates a value of PagespeedAPIFormatStringV2 with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

pafsvFormat :: Lens' PagespeedAPIFormatStringV2 (Maybe Text) Source

A localized format string with {{FOO}} placeholders, where 'FOO' is the key of the argument whose value should be substituted. For HYPERLINK arguments, the format string will instead contain {{BEGIN_FOO}} and {{END_FOO}} for the argument with key 'FOO'.

ResultFormattedResultsRuleResults

resultFormattedResultsRuleResults Source

Creates a value of ResultFormattedResultsRuleResults with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

rfrrrAddtional :: Lens' ResultFormattedResultsRuleResults (HashMap Text ResultFormattedResultsRuleResultsAdditional) Source

The enum-like identifier for this rule. For instance "EnableKeepAlive" or "AvoidCssImport". Not localized.

ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem

rfrrraubiuiResult :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem (Maybe PagespeedAPIFormatStringV2) Source

A format string that gives information about the URL, and a list of arguments for that format string.

rfrrraubiuiDetails :: Lens' ResultFormattedResultsRuleResultsAdditionalURLBlocksItemURLsItem [PagespeedAPIFormatStringV2] Source

List of entries that provide additional details about a single URL. Optional.