Weather API
01. Weather API
About this API:
This api takes latitude and longitude as input, and return url(s) of Yahoo! Weather RSS (and/or Livedoor Weather service) for the most closest "location id". You can then retrieve weather information from those links.
URL:
- http://ongmap.com/api
Parameters:
- v : version number (required. currently only ‘1.0′ is available)
- data : data type (required. currently only ‘weather’ is avaliable)
- lat: latitude (required. from -90 to 90 in WGS84)
- lng: longitude (required. from -180 to 180 in WGS84)
- source: data source (optional. ‘yahoo’ or ‘livedoor’ can be specified. If not specified, both data source will be searched and closest one(s) will be returned. If ‘Livedoor’ is specified, output will be limited to the locations in Japan territory)
- lang: output language (optional. ‘jp’[Japanese] or ‘en’[English]. default to ‘jp’. Japanse output is only available for the locations in Japan)
- num: number of locations for output (optinal. from 1 to 5 nearest points to given lat/lng. default is 1.)
- unit: temperature unit (optional. ‘c’ forCelcius, ‘f’ for Fahrenheit. default to ‘c’)
- out: output format(optional. ‘xml’ for XML, ‘json’ for JSON output. default to ‘xml’)
Example:
http://ongmap.com/api?v=1.0&data=weather&lat=34.32&lng=133.22&num=5
Note:
- If error occurs, the response will be in XML format.
- For Livedoor links, you need to supply ‘day’ parameter to complete the request to Livedoor.
- My server is hosted in a shared environment, and resource is limited. So, please do not make serial requests to this api.
- No warranty on the ouput.
- If you have any questions, please comment on this page.
Comments
Comment from Taichiro Yoshida
Time: 2007/12/13 木曜日, 17:16:56
初めまして、吉田と申します。
貴殿のAPIですが、立ち上げたサイトでは使用可能でしょうか?
RBC長崎(http://rbc-nagasaki.blogspot.com/)という立ち上がったばかりのRubyコミュでアイデアが挙がったものを実装したサイトで、広告モデル、課金モデルなどではなく、ただ楽しめるように立ち上げる予定のサイトです。
ご検討よろしくお願いいたします。
Comment from yuki
Time: 2007/12/14 金曜日, 14:33:20
吉田さん、初めまして
APIどんどん使っちゃってください。ただ、サーバーが貧弱なので、アクセスが多くなりそうな場合はご連絡ください。あ、あと、使い方がわかりにくい部分が多々あると思いますのでお気軽にご連絡くださいね(バグも・・・)
Comment from Taichiro Yoshida
Time: 2007/12/15 土曜日, 19:18:58
yukiさん、ありがとうございます!!
正式に公開が始まったら、ご連絡させていただきます!!
もちろんRailsで組んでます。
ちなみにtwitter、skypeともに、dataichってハンドルでいますんで、
良かったら声掛けてみてください!!
Comment from Taichiro Yoshida
Time: 2007/12/25 火曜日, 11:00:02
何度もすいません!
クレジット表示または、リンク表示等してもよろしいですか?
Comment from yuki
Time: 2007/12/25 火曜日, 11:03:17
はい!
あと、LivedoorあるいはYahooのクレジット表示もどこかにお願いしますね
Comment from Tony DiPollina
Time: 2008/2/26 火曜日, 9:47:42
Nice work. Is the source code available?
thanks,
Tony
Write a comment