Project

weatai

0.0
No commit activity in last 3 years
No release in over 3 years
Extracts temperature and humidity for different city
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 2.8
~> 4.4
~> 5.9
~> 11.3
~> 0.42
~> 0.12
~> 3.0
~> 2.1

Runtime

>= 4.2.6, ~> 4.2
~> 2.0
 Project Readme

weatai Gem

Gem Version Build Status

weatai is a gem that specializes in getting data from Central Weather Bureau(Taiwan).

Installation

If you are working on a project, add this to your Gemfile: gem 'weatai'

For ad hoc installation from command line:

$ gem install weatai

Setup Central Weather Bureau(Taiwan) Credentials

Please setup your Central Weather Bureau credentials by creating an account on Central Weather Bureau Website: http://www.cwb.gov.tw – creating an CWB member account and go to :http://opendata.cwb.gov.tw - login by CWB member account and get credentials (資料使用說明->取得驗證碼)

Usage

Require weatai gem in your code: require 'weatai'

Supply your CWB credentials to our library in one of two ways:

  • Setup environment variables: ENV['DATA_ID1'] , ENV['DATA_ID2'],ENV['AUTH_KEY'],ENV['FORMAT'],ENV['TOKEN']
  • Or, provide them directly to weatai:
weatai::Config = { dataid1: ENV['DATA_ID1'],
                   dataid2: ENV['DATA_ID2'],
                   key:    ENV['AUTH_KEY'], 
                   format: ENV['FORMAT'],
                   token:  ENV['TOKEN']}