このページは2008年 2月 22日, 16:35に更新されました by stanaka

Google

From $1

このライブラリは Google maps と widgetsを埋め込む関数を含んでいます。  関連リンク: Extension Overview, DekiScript Overview, Extension Demos.

Assembly: mindtouch.deki.services
SID: http://services.mindtouch.com/deki/d...2007/06/google

設定:

Google serviceを使う前に、 Google API keyを設定する必要があります。  未取得の場合は こちら から登録して取得してください。

Config Key 説明
api-key Google API key

Functions:

  1. google.calendar
  2. google.feed
  3. google.feedentries
  4. google.feeds
  5. google.findfeeds
  6. google.gadgetscript
  7. google.map
  8. google.search
  9. google.searchblogs
  10. google.searchnews
  11. google.searchvideos
  12. google.spreadsheet
  13. google.barchart
  14. google.linechart
  15. google.piechart

google.calendar(uri : uri, startdate : str, enddate : str, width : num, height : num) : xml

Google カレンダーの埋め込み.

引数:

名前 説明
uri
uri
Google カレンダーのフィード uri.
startdate
str オプション  開始日 (デフォルト: 本日)
enddate str オプション  終了日 (デフォルト: 本日から7日後)
width num オプション  カレンダの幅 (デフォルト: 800)
height num オプション  カレンダの高さ(デフォルト: 800)

注記:  Google Calendarについての詳細は こちら を参照してください。 

サンプル:


表示

カレンダをデフォルトで埋め込み:

{{ google.calendar("http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic") }}

./GoogleCalendar1.JPG

カレンダを 400 x 400 で埋め込み
:

 {{ google.calendar("http://www.google.com/calendar/feeds/ht3jlfaac5lfd6263ulfh4tql8%40group.calendar.google.com/public/basic", _, _, 400, 400) }}

./GoogleCalendar2.JPG


google.feed(feed : uri, max : num, label : str) : xml

Atom/RSS フィードの示制御の埋め込み

引数:

名前 説明
feed
uri
Feed uri (Atom もしくは RSS)
max
num オプション  最大エントリー数 (デフォルト: 4)
label
str
オプション  フィードのラベル (default: "")

サンプル:


表示

MindTouch のフィードをデフォルト設定で埋め込み:

{{ google.feed("http://feeds.feedburner.com/Mindtouch") }}

./GoogleFeed1.JPG

MindTouch のフィードをラベル付で最新から5つの内容表示で埋め込み:

{{ google.feed("http://feeds.feedburner.com/Mindtouch", 5, "Mindtouch Feed") }}

./GoogleFeed2.JPG


google.feedentries(feed : uri, max : num, publish : str, subscribe : str) : xml

RSS/Atom フィードのエントリーを公開

引数:

名前 説明
feed
uri
オプション  フィード uri (Atom もしくは RSS)
max
num オプション  読み込むエントリーの最大数 (デフォルト: 20)
publish
str
オプション  公開するチャネルl (デフォルト: "default")
subscribe
str
オプション  購読するチャネル (デフォルト: nil)

公開するフォーマット:

名前 説明
label
str
フィードのエントリのタイトル
uri
str
フィードのエントリのリンク
html
str
書式化されたフィードのエントリーテキスト
text 
str
フィードのエントリの要約
date
str
フィードのエントリーの日付
name
str
フィードのエントリーの著者

購読フォーマット:

名前 説明
uri
str
フィードのリンク

サンプル:


表示

表形式でMindtouchのフィードを表示する:

{{ google.feedentries("http://feeds.feedburner.com/Mindtouch", _, "feeds") }}
{{ dhtml.table([{ label: "Title", field: "label" }, { label: "Contents", field: "text" }], "feeds") }} 

./GoogleFeedEntry1.JPG

フィード URIの入力欄と表形式でその結果を表示:

{{ dhtml.inputbox{ publish: "inputbox1", length: 100, label: "Feed URI:  ", field: "uri" } }}
{{ google.feedentries{ publish:  "feeds", subscribe:  "inputbox1" } }}
{{ dhtml.table([{ label: "Title", field: "label" }, { label: "Contents", field: "text" }], "feeds") }} 


./GoogleFeedEntry2.JPG


google.feeds(feeds : list, max : num, tabbed : bool, subscribe : str) : xml

Atom/RSS フィードの表示のコントロールを埋め込む

引数:

名前 説明
feeds
list
オプション  フィード・オブジェクトのリスト (Atom もしくは RSS) ({ uri : uri, label: str })
max
num オプション  収集するエントリーの最大数 (デフォルト: 4)
tabbed
bool
オプション  タブ表示T (デフォルト: false)
subscribe
str
オプション  購読チャネル (デフォルト: nil)

購読フォーマット:

名前 説明
uri
str
フィード・リンク
label
str
フィード・ラベル

サンプル:


表示

デフォルトで2つのフィードの使用を埋め込む:

{{ google.feeds( [
    { uri: "http://feeds.feedburner.com/Mindtouch", label: "Mindtouch"}, 
    { uri: "http://wiki.opengarden.org/index.php?title=Special:Recentchanges&feed=rss", label: "OpenGarden"}
] ) }}

./GoogleFeeds1.JPG

フィードのURI/lラベルの入力欄とその結果表示を埋め込む:

{{ dhtml.form{ publish: "form1", length: 100, inputs: [ { label: "Feed URI:  ", value: "http://feeds.feedburner.com/Mindtouch", field: "uri", hidden: false }, { label: "Feed Label:  ", value: "Mindtouch", field: "label", hidden: false } ] } }} 
{{ google.feeds{ tabbed: true, subscribe: "form1"} }} 

./GoogleFeedEntry2.JPG


google.findfeeds(search : str, max : num, publish : str, subscribe : str) : xml

検索語にマッチした RSS/Atom フィードを一覧表示

引数:

名前 説明
search
str
オプション  検索語 (デフォルト: nil)
max
num オプション  検索結果の最大フィード数 (デフォルト: 4)
publish
str
オプション  公開するチャネル (デフォルト: "default")
subscribe
str
オプション  購読するチャネル (デフォルト: nil)

公開フォーマット:

名前
説明
uri
str
フィード・リンク
label
str
フィード・ラベル

購読フォーマット:

名前 説明
text
str
検索語

サンプル:


表示

検索語の入力欄とその結果表示を埋め込む:

{{ dhtml.inputbox{ publish: "inputbox1", length: 100, field: "text", label: "Find feeds about:" } }} 
{{ google.findfeeds{ publish: "feeds", subscribe: "inputbox1"} }} 
{{ google.feeds{ subscribe: "feeds", tabbed: true} }} 

./GoogleFindFeeds1.JPG


google.gadgetscript(script : str) : xml

Google Gadget スクリプトの埋め込み

引数:

名前 説明
script str Google Gadget スクリプト

注記:  

始めるには こちらへ行きあなたの望むガジェットを見つけてその設定をカスタマイズしてください。  一度行えば、"Get the Code"をクリックし、 google.gadgetscriptへ引数としてこの結果を引き渡します。.

サンプル:


表示

Google Live Weatherガジェットを埋め込みます:

{{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://www.labpixies.com/campaigns/weather/weather.xml&amp;up_degree_unit_type=0&amp;up_city_code=none&amp;up_zip_code=none&amp;synd=open&amp;w=320&amp;h=240&amp;title=Live+Weather&amp;border=%23ffffff%7C1px%2C1px+solid+%2366ccff%7C1px%2C2px+solid+%2366ccff&amp;output=js"></script>') }}

./GoogleGadget1.JPG

Google Microsoft Outlook ガジェットを埋め込みます

{{ google.gadgetscript('<script src="http://gmodules.com/ig/ifr?url=http://andyast.googlepages.com/MSOutlookWidget.xml&amp;up_DefaultView=Inbox&amp;synd=open&amp;w=800&amp;h=400&amp;title=Microsoft+Outlook&amp;border=%23ffffff%7C0px%2C1px+solid+%23004488%7C0px%2C1px+solid+%23005599%7C0px%2C1px+solid+%230077BB%7C0px%2C1px+solid+%230088CC&amp;output=js"></script>') }} 

./GoogleGadget2.JPG


google.map(address : str, zoom : num, width : num, height : num, title : str, subscribe : str) : xml

マップ・マーカ付のGoogle Mapを埋め込む

引数:

名前 説明
address
str
オプション  住所 (デフォルト: nil)
zoom
num オプション   地図のズームレベル (1-17; デフォルト: 14)
width
num
オプション  地図の幅 (デフォルト: 450)
height
num
オプション   地図の高さ (デフォルト: 300)
title
str
オプション  目印ツールのタイトル (デフォルト: nil)
subscribe
str
オプション  購読チャネル (デフォルト: nil)

購読フォーマット:

名前 説明
latitude
str
緯度 
longitude
str
軽度
label
str
目印ツールのタイトル
info
str
目印ツールの説明
名前 説明
address
str
住所
label
str
目印ツールのタイトル
info
str
目印ツールの説明

サンプル:


表示

デフォルトで地図を埋め込み:

{{ google.map("555 W. Beech St., San Diego, CA 92101") }}

./GoogleMap1.JPG

説明を入れた目印ツール付 400 x 400 の地図を埋め込む
:

{{ google.map("555 W. Beech St., San Diego, CA 92101", _, 400, 400, "MindTouch Offices") }}
./GoogleMap2.JPG

住所入力欄とその結果を表示:

{{ dhtml.inputbox{ publish: "inputbox1", length: 70, label: "Address: ", field: "address" } }}
{{ google.map{ subscribe: "inputbox1", zoom: 10, width: 500, height: 500 } }}

./GoogleMap3.JPG


google.search(search : str, options : map, tabbed : bool, publish : str, subscribe : str) : xml

Google の ウェブ, 画像, ビデオ, ニュース, ブログ, ブック検索 結果を埋め込む

引数:

名前 説明
search
str
オプション  検索語 (デフォルト: nil)
options
map オプション  検索オプション (デフォルト: { web: true, local: true, images: true, videos: true, news: true, blogs: true, books: true })
tabbed
bool
オプション  タブ表示 (デフォルト: false)
publish
str
オプション  公開チャネル (デフォルト: nil)
subscribe
str
オプション  購読チャネル (デフォルト: nil)

公開フォーマット:

名前
説明
label
str
検索結果のタイトル
uri
str
検索結果のURI.
latitude
str
検索結果のl緯度.
longitude
str
検索結果の経度
address
str
検索結果の住所
phone
str
検索結果の電話
text
str
検索結果のテキスト
date
str
検索結果の日付

購読フォーマット:

名前 説明
text
str
Search terms.

サンプル:


表示

デフォルトの Google 検索を埋め込む:

{{ google.search() }}

./GoogleSearch1.JPG

タブ表示でGoogle ビデオと画像検索を埋め込む:

{{ google.search{options: { images: true, videos: true }, tabbed: true} }}
./GoogleSearch2.JPG


google.searchblogs(search : str, horizontal : bool, title : str, subscribe : str) : xml

Embed Google Blog results.

Parameters:

Name Type Description
search
str
Optional.  Search terms (default: nil)
horizontal
bool
Optional.  Horizontal layout (default: false)
title
str
Optional.  Search title (default: nil)
subscribe
str
Optional.  Subscribe to channel (default: nil)

Subscribe Format:

Name Type Description
text
str
Search terms.

Samples:


Output

To prompt for search terms and embed the Google Blog search results:

{{ dhtml.inputbox{ publish: "inputbox1", length: 70, label: "Search terms: ", field: "text" } }}
{{ google.searchblogs{ subscribe: "inputbox1" } }}

./GoogleSearchBlogs1.JPG


google.searchnews(search : str, horizontal : bool, title : str, subscribe : str) : xml

Embed Google News results.

Parameters:

Name Type Description
search
str
Optional.  Search terms (default: nil)
horizontal
bool
Optional.  Horizontal layout (default: false)
title
str
Optional.  Search title (default: nil)
subscribe
str
Optional.  Subscribe to channel (default: nil)

Subscribe Format:

Name Type Description
text
str
Search terms.

Samples:


Output

To prompt for search terms and embed the Google News search results:

{{ dhtml.inputbox{ publish: "inputbox1", length: 70, label: "Search terms: ", field: "text" } }}
{{ google.searchnews{ subscribe: "inputbox1" } }}

./GoogleSearchNews1.JPG


google.searchvideos(search : str, width : num, height : num, subscribe : str) : xml

Embed Google Video results.

Parameters:

Name Type Description
search
str
Optional.  Search terms (default: nil)
width
num
Optional.  Video search width (default: 260)
height
num
Optional.  Video search height (default: nil)
subscribe
str
Optional.  Subscribe to channel (default: nil)

Subscribe Format:

Name Type Description
text
str
Search terms.

Samples:


Output

To embed a Google Video search using the defaults:

{{ google.searchvideos() }}

./GoogleSearchVideos1.JPG


google.spreadsheet(uri : uri, width : num, height : num) : xml

Embed Google Spreadsheet.

Parameters:

Name Type Description
uri
uri
Google spreadsheet uri.
width
num
Optional.  Spreadsheet width (default: 800)
height
num
Optional.  Spreadsheet height (default: 800)

Remarks:  Refer here for more information about Google Spreadsheets.

Samples:


Output
To embed a 850 by 600 Google Spreadsheet:
{{ google.spreadsheet("http://spreadsheets.google.com/ccc?key=pbVievtsJlkQzdI7yjYs7SQ&hl=en", 850, 600) }}
./GoogleSpreadSheet1.JPG


 

 

google.barchart(width : num, height : num, values : list, legends : list, colors : list, vertical : bool, stacked : bool, xaxis : list, yaxis : list) : xml

Embed a Google Bar Chart 

Parameters:

Name Type Description
width
num
chart width
height
num
chart height
values
list
chart values (e.g. [ 1, 2, 3 ])
legends
list
Optional.  Chart legends (e.g. [ "first", "secong", "third" ]; default: nil)
colors
list
Optional.  Chart colors (e.g. [ "ff0000", "00ff00", "0000ff" ]; default: nil)
vertical
bool
Optional.  Draw bars vertically (default: true)
stacked
bool
Optional.  Draw bars stacked (default: false)
xaxis
list
Optional.  Chart x-axis labels (e.g. [ "first", "second", "third" ]; default: [ 1, 2, 3, ... ])
yaxis
list
Optional.  Chart y-axis labels (e.g. [ 0, 50, 100 ]; default: [ 0, max/2, max ])

 

Samples:


Output
To embed a Google Bar Chart
{{google.barchart(400,200,[[10,20,30,50,40],[40,50,30,20,10]],["fake","real"],["ff0000","0000ff"],true,false)}}
http://www.mindtouch.com/blog/wp-content/uploads/2007/12/bar-chart2.png

 


google.linechart(width : num, height : num, values : list, legends : list, colors : list, xaxis : list, yaxis : list) : xml

Embed a Google Line Chart 

Parameters:

Name Type Description
width
num
Chart width.
height
num
Chart height
values
list
chart values (e.g. [ 1, 2, 3 ])
legends
list
Optional.  Chart legends (e.g. [ "first", "secong", "third" ]; default: nil)
colors
list
Optional.  Chart colors (e.g. [ "ff0000", "00ff00", "0000ff" ]; default: nil)
xaxis
list
Optional.  Chart x-axis labels (e.g. [ "first", "second", "third" ]; default: [ 1, 2, 3, ... ])
yaxis
list
Optional.  Chart y-axis labels (e.g. [ 0, 50, 100 ]; default: [ 0, max/2, max ])

Samples:


Output
To embed a Google Line Chart
{{google.linechart(400,200,[[10,20,30,50,40],[40,50,30,20,10]],["fake","real"],["ff0000","0000ff"])}}


http://www.mindtouch.com/blog/wp-content/uploads/2007/12/line-chart.png

 


google.piechart(width : num, height : num, values : list, labels : list, colors : list, threed : bool) : xml

Embed a Google Pie Chart 

Parameters:

Name Type Description
width
num
Chart width
height
num
Chart height
values
list
chart values (e.g. [ 1, 2, 3 ])
labels
list
Optional.  Chart labels (e.g. [ "first", "secong", "third" ]; default: nil)
colors
list
Optional.  Chart colors (e.g. [ "ff0000", "00ff00", "0000ff" ]; default: nil)
threed
bool
Optional.  Draw 3D chart (default: true)

Samples:


Output
To embed a Google Pie Chart
{{google.piechart(400,200,[10,20,30],[‘you’,‘him’,‘me’], _,true)}}


http://www.mindtouch.com/blog/wp-content/uploads/2007/12/piechart-3d.png
ファイルサイズ日付添付したユーザ 
 GoogleCalendar1.JPG
説明なし
37.37 kB2007年 10月 16日, 21:26BrigetteKアクション
 GoogleCalendar2.JPG
説明なし
20.03 kB2007年 10月 16日, 22:11BrigetteKアクション
 GoogleFeed1.JPG
説明なし
49.7 kB2007年 10月 16日, 21:03BrigetteKアクション
 GoogleFeed2.JPG
説明なし
65.65 kB2007年 10月 16日, 21:09BrigetteKアクション
 GoogleFeedEntry1.JPG
説明なし
111.02 kB2007年 10月 16日, 22:57BrigetteKアクション
GoogleFeedEntry2.JPG
説明なし
62.73 kB2007年 10月 17日, 01:20BrigetteKアクション
 GoogleFeeds1.JPG
説明なし
94.42 kB2007年 10月 16日, 23:57BrigetteKアクション
 GoogleFindFeeds1.JPG
説明なし
63.87 kB2007年 10月 17日, 00:58BrigetteKアクション
 GoogleGadget1.JPG
説明なし
17.45 kB2007年 10月 17日, 18:04BrigetteKアクション
 GoogleGadget2.JPG
説明なし
26.4 kB2007年 10月 17日, 18:22BrigetteKアクション
GoogleMap1.JPG
説明なし
39.15 kB2007年 10月 17日, 19:23BrigetteKアクション
GoogleMap2.JPG
説明なし
41.56 kB2007年 10月 17日, 19:23BrigetteKアクション
GoogleMap3.JPG
説明なし
78.85 kB2007年 10月 17日, 19:16BrigetteKアクション
 GoogleSearch1.JPG
説明なし
10.82 kB2007年 10月 17日, 19:40BrigetteKアクション
 GoogleSearch2.JPG
説明なし
44.68 kB2007年 10月 17日, 19:48BrigetteKアクション
 GoogleSearchBlogs1.JPG
説明なし
149.42 kB2007年 10月 17日, 20:06BrigetteKアクション
 GoogleSearchNews1.JPG
説明なし
51.25 kB2007年 10月 17日, 20:09BrigetteKアクション
 GoogleSearchVideos1.JPG
説明なし
26.13 kB2007年 10月 17日, 20:15BrigetteKアクション
 GoogleSpreadSheet1.JPG
説明なし
72.19 kB2007年 10月 17日, 20:32BrigetteKアクション
コメント(0)
あなたはコメントを投稿するには ログイン しなければなりません。