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) |
Safe Haskell | None |
Language | Haskell2010 |
Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
See: AdSense Host API Reference for adsensehost.reports.generate
.
Synopsis
- type ReportsGenerateResource = "adsensehost" :> ("v4.1" :> ("reports" :> (QueryParam "startDate" Text :> (QueryParam "endDate" Text :> (QueryParams "dimension" Text :> (QueryParam "locale" Text :> (QueryParams "metric" Text :> (QueryParams "sort" Text :> (QueryParams "filter" Text :> (QueryParam "startIndex" (Textual Word32) :> (QueryParam "maxResults" (Textual Word32) :> (QueryParam "alt" AltJSON :> Get '[JSON] Report))))))))))))
- reportsGenerate :: Text -> Text -> ReportsGenerate
- data ReportsGenerate
- rgDimension :: Lens' ReportsGenerate [Text]
- rgLocale :: Lens' ReportsGenerate (Maybe Text)
- rgEndDate :: Lens' ReportsGenerate Text
- rgStartDate :: Lens' ReportsGenerate Text
- rgMetric :: Lens' ReportsGenerate [Text]
- rgSort :: Lens' ReportsGenerate [Text]
- rgFilter :: Lens' ReportsGenerate [Text]
- rgStartIndex :: Lens' ReportsGenerate (Maybe Word32)
- rgMaxResults :: Lens' ReportsGenerate (Maybe Word32)
REST Resource
type ReportsGenerateResource = "adsensehost" :> ("v4.1" :> ("reports" :> (QueryParam "startDate" Text :> (QueryParam "endDate" Text :> (QueryParams "dimension" Text :> (QueryParam "locale" Text :> (QueryParams "metric" Text :> (QueryParams "sort" Text :> (QueryParams "filter" Text :> (QueryParam "startIndex" (Textual Word32) :> (QueryParam "maxResults" (Textual Word32) :> (QueryParam "alt" AltJSON :> Get '[JSON] Report)))))))))))) Source #
A resource alias for adsensehost.reports.generate
method which the
ReportsGenerate
request conforms to.
Creating a Request
Creates a value of ReportsGenerate
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data ReportsGenerate Source #
Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
See: reportsGenerate
smart constructor.
Instances
Request Lenses
rgDimension :: Lens' ReportsGenerate [Text] Source #
Dimensions to base the report on.
rgLocale :: Lens' ReportsGenerate (Maybe Text) Source #
Optional locale to use for translating report output to a local language. Defaults to "en_US" if not specified.
rgEndDate :: Lens' ReportsGenerate Text Source #
End of the date range to report on in "YYYY-MM-DD" format, inclusive.
rgStartDate :: Lens' ReportsGenerate Text Source #
Start of the date range to report on in "YYYY-MM-DD" format, inclusive.
rgSort :: Lens' ReportsGenerate [Text] Source #
The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted ascending.
rgStartIndex :: Lens' ReportsGenerate (Maybe Word32) Source #
Index of the first row of report data to return.
rgMaxResults :: Lens' ReportsGenerate (Maybe Word32) Source #
The maximum number of rows of report data to return.