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:
- Go to the Yahoo! Finance badges page.
- Click on Start Now in the top right corner
- Select any stock chart type
- Click on I agree to the Terms of Service above
- Click on Get Code
- 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:
- yahoo.extractterms
- yahoo.stockchart
- 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") }}
| |
 |
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")}} | |
 |
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")}} | |
 |
please tell correct one