352.5. サンプル
352.5.1. 例 1 リンクのコピーリンクがクリップボードにコピーされました!
この例では、YQL にクエリーを実行して、シカゴの現在の風と大気のデータを取得します。
from("direct:start") .to("yql://select wind, atmosphere from weather.forecast where woeid in (select woeid from geo.places(1) where text='chicago, il'");
from("direct:start")
.to("yql://select wind, atmosphere from weather.forecast where woeid in (select woeid from geo.places(1) where text='chicago, il'");
本文を次のように設定します。
およびヘッダー:
352.5.2. 例 2 リンクのコピーリンクがクリップボードにコピーされました!
この例では、YQL にクエリーを実行して Google の見積もりを取得します。
from("direct:start") .to("yql://select symbol, Ask, Bid, AverageDailyVolume from yahoo.finance.quotes where symbol in ('GOOG')?env=store://datatables.org/alltableswithkeys&https=false&callback=yqlCallback");
from("direct:start")
.to("yql://select symbol, Ask, Bid, AverageDailyVolume from yahoo.finance.quotes where symbol in ('GOOG')?env=store://datatables.org/alltableswithkeys&https=false&callback=yqlCallback");
本文を次のように設定します。
およびヘッダー:
ヘッダー | 値 |
---|---|
| |
| 200 |
352.5.3. 例 3 リンクのコピーリンクがクリップボードにコピーされました!
この例では、YQL にクエリーを実行して、Barack Obama が書いた 1 冊の本を取得します。
from("direct:start") .to("yql://select * from google.books where q='barack obama' and maxResults=1?format=xml&crossProduct=optimized&env=store://datatables.org/alltableswithkeys");
from("direct:start")
.to("yql://select * from google.books where q='barack obama' and maxResults=1?format=xml&crossProduct=optimized&env=store://datatables.org/alltableswithkeys");
本文を次のように設定します。
およびヘッダー:
ヘッダー | 値 |
---|---|
| |
| 200 |