haskell-google-trends: Simple library for accessing Google Trends

[ library, public-domain, web ] [ Propose Tags ] [ Report a vulnerability ]

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2
Dependencies base (>=4.8 && <5), bytestring, haskell-fake-user-agent (>=0.0.2), lens, regex-base, regex-posix, tagsoup, text, wreq [details]
License LicenseRef-PublicDomain
Author grzegorzgoldapl
Maintainer contact@grzegorzgolda.com
Revised Revision 1 made by grzegorzgolda at 2016-06-20T04:22:17Z
Category Web
Home page https://github.com/grzegorzgoldapl/haskell-google-trends
Source repo head: git clone git://github.com/grzegorzgoldapl/haskell-google-trends.git
Uploaded by grzegorzgolda at 2016-06-17T08:55:23Z
Distributions NixOS:0.0.2
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1752 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-23 [all 1 reports]

Readme for haskell-google-trends-0.0.2

[back to package description]

Very simple library for accessing Google Trends

INSTALL

cabal install haskell-google-trends

HOW TO USE

Currently library exports two functions. Both return maybe a list of tuples of form (Year, Month, Value).

queryTrendsWithLogin :: String -> String -> Maybe (String, Int) -> String -> IO (Maybe [(Integer, String, Integer)])
queryTrendsWithLogin email password maybeProxy keywords

queryTrendsNoLogin :: Maybe (String, Int) -> String -> IO (Maybe [(Integer, String, Integer)])
queryTrendsNoLogin maybeProxy keywords

Example (No proxy):

import Google.Trends

main = do
    Just results <- queryTrendsWithLogin "your-login@gmail.com" "password" Nothing "pizza"
    print [(month, value) | (year, month, value) <- results, year == 2010]

Example (With proxy):

import Google.Trends

main = do
    Just results <- queryTrendsNoLogin (Just ("54.153.7.21", 8083)) "pizza"
    print [(month, value) | (year, month, value) <- results, year == 2010]