Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple, unofficial, ruby client API for using Google API.
Ruby
branch: master

This branch is 11 commits ahead, 21 commits behind sishen:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tests
ChangeLog
MIT-LICENSE
README
Rakefile

README

== Google API (GAPI)

A simple, unofficial, ruby client API for using Google API.

== Usage

Searching for something in the web:

require "gapi"

GAPI::Web.s("Paris Hilton")[0]["url"]
=> "http://en.wikipedia.org/wiki/Paris_Hilton"

GAPI::Web.s("Paris Hilton")[0]["content"]
=> "<b>Paris</b> Whitney <b>Hilton</b> (born February 17, 1981) is an American socialite, model, media personality, singer and occasional actress. <b>...</b>"

Translation of an english text to simplified chinese:

require "gapi"
GAPI::Language.t("Good Morning", "English", "CHINESE_SIMPLIFIED")
# => "早上好"

Detect language of a text:

require "gapi"
GAPI::Language.d("おはようございます")
# => {:language=>"ja", :is_reliable=>true, :confidence=>0.15255931}

Check test for more examples

== COPYRIGHT

Copyright (c) 2009 Daniel Bovensiepen <daniel@bovensiepen.net>
Copyright (c) 2007 Dingding Ye <yedingding@gmail.com>
Distributed under MIT License
Something went wrong with that request. Please try again.