lita-google-ranking
Lita (robot) handler for getting rank of DOMAIN on google web search with a KEYWORD.
Installation
Add lita-google-ranking to your Lita instance's Gemfile:
gem "lita-google-ranking"
Configuration
in lita_config.rb
config.handlers.google_ranking.gl = "tw"
config.handlers.google_ranking.lr = "lang_zh"
config.handlers.google_ranking.cr = "countryTW"
-
gl
: http://en.wikipedia.org/wiki/ISO_3166-1#Current_codes -
lr
: https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#languageCollections -
cr
: https://developers.google.com/custom-search/docs/xml_results?hl=en&csw=1#countryCollections
domain alias
config.handlers.google_ranking.domain_alias = { alias: "domain" , domain: "www.my.long.domain.name.com" }
Usage
lita gr DOMAIN KEYWORD
: send KEYWORD to google web search, and return rank of DOMAIN from search results
"KEYWORD" ranking of DOMAIN is 3