2012年6月24日日曜日

Sync Vim with Google Calendar(2/3)

Install libraries

You can install required libraries to access the Google API with RubyGems. If you have not installed RubyGems, you should install RubyGems first.

sudo aptitude install rubygems

Now you can install libraries with RubyGems as below.

sudo gem install google-api-client
sudo gem install --remote sinatra httpadapter extlib dm-sqlite-adapter

Get OAuth Token

Let's obtain an OAuth token using "Client ID" and "Client Secret" . Input below command. Please substitute your own values for {CLIENT-ID} and {CLIENT-SECRET}.

/var/lib/gems/1.8/bin/google-api oauth-2-login \
  --scope=https://www.googleapis.com/auth/calendar \
  --client-id={CLENT-ID} \
  --client-secret={CLIENT-SECRET}

Path of google-api is changed according to your environment. My mac environment, the path is a below one.

/Library/Ruby/Gems/1.8/gems/google-api-client-0.4.4/bin/google-api

Once you input the abobe command, a web browser will be launched and requires an acceptance. If you can accept, let give it an access authority.

After you accept the request, New OAuth token file ".google-aip.yaml" would be created in your home directory.

Setting of vise.vim

next step

0 件のコメント:

コメントを投稿