このページは2007年 10月 24日, 23:15に更新されました by BrigetteK

Yahoo

From $1

This library contains functions for embedding Yahoo! widgets.  関連リンク: Extension Overview, DekiScript Overview, Extension Demos.

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

Configuration:

The Yahoo service must be configured before it can be used.  To get the application key and signature, follow these steps:

  1. Go to the Yahoo! Finance badges page.
  2. Click on Start Now in the top right corner
  3. Select any stock chart type
  4. Click on I agree to the Terms of Service above
  5. Click on Get Code
  6. From within the text area, select the following two strings (make sure to copy all the text starting at '=' and ending at '&', not including '=' and '&'):
    • AppID=(some-long-cryptic-text)
    • sig=(some-long-cryptic-text)
Config Key Description
finance-app-id This is the assigned AppId key.
finance-sig This is the assigned sig key.

Functions:

  1. yahoo.extractterms
  2. yahoo.stockchart
  3. yahoo.stockquote

yahoo.extractterms(content : str, max : num, publish : str, subscribe : str) : xml

Publish terms extracted from content.

Parameters:

Name Type Description
content
str
Optional.  Content to extract terms from (default: nil)
max
num
Optional.  Max number of terms to extract (default: 3)
publish
str
Optional.  Publish on channel (default: "default")
subscribe
str
Optional.  Subscribe to channel (default: nil)

Publish Format:

Name Type Description
text
str
Extracted terms.

Subscribe Formats:

Name Type Description
text
str
Content to extract terms from.

Samples:


Output

To prompt for text and publish terms extracted from it:

{{ dhtml.inputbox{ length: 50, label: "Enter text: ", field: "text", publish: "inputbox1"} }}
{{ yahoo.extractterms{ subscribe: "inputbox1", publish: "output"} }}
{{ dhtml.table([{ label: "Results", field: "text" }], "output") }}


./YahooExtractTerms1.JPG


yahoo.stockchart(symbol : str) : xml

Embed Yahoo! finance stock chart widget.

Parameters:

Name Type Description
symbol
str
Stock ticker symbol.

Samples:

Output

To embed the Yahoo! finance stock chart widget:

{{yahoo.stockchart("YHOO")}} 


./YahooStockChart1.JPG


yahoo.stockquote(symbol : str) : xml

Embed Yahoo! finance stock quote widget.

Parameters:

Name Type Description
symbol
str
Stock ticker symbol.

Samples:

Output

To embed the Yahoo! finance stock quote widget:

{{yahoo.stockquote("YHOO")}} 


./YahooStockQuote1.JPG

ファイルサイズ日付添付したユーザ 
 YahooExtractTerms1.JPG
説明なし
13.95 kB2007年 10月 24日, 22:51BrigetteKアクション
 YahooStockChart1.JPG
説明なし
19.4 kB2007年 10月 24日, 22:59BrigetteKアクション
 YahooStockQuote1.JPG
説明なし
12.83 kB2007年 10月 24日, 22:59BrigetteKアクション
コメント(1)
全1件のうち1件のコメントを表示: 全て見る
{{yahoo.stockchart("YHOO")}} is incorrect
please tell correct one
投稿日:2007年 10月 3日, 04:53 ()
全1件のうち1件のコメントを表示: 全て見る
あなたはコメントを投稿するには ログイン しなければなりません。