The haskell-google-trends package

[ Tags: library, public-domain, web ] [ Propose Tags ]

[Skip to Readme]

Properties

Versions 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 PublicDomain
Author grzegorzgoldapl
Maintainer contact@grzegorzgolda.com
Category Web
Home page https://github.com/grzegorzgoldapl/haskell-google-trends
Source repository head: git clone git://github.com/grzegorzgoldapl/haskell-google-trends.git
Uploaded Fri Jun 17 08:55:23 UTC 2016 by grzegorzgolda
Updated Mon Jun 20 04:22:17 UTC 2016 by grzegorzgolda to revision 1   [What is this?]
Distributions NixOS:0.0.2
Downloads 195 total (50 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-23 [all 1 reports]
Hackage Matrix CI

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

For package maintainers and hackage trustees


Readme for haskell-google-trends-0.0.2

[back to package description]

GOOGLE TRENDS

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]