yahoo-exchange
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -38,4 +38,3 @@ "use strict"; | ||
/** | ||
* This method now on error | ||
* @returns {Promise<Array<Array<any>>>} | ||
* @deprecated | ||
*/ | ||
@@ -63,5 +62,3 @@ function getExchangeDataLowTrafficP() { | ||
/** | ||
* This method now on error | ||
* @param {(data: Array<Array<any>>) => any} callback | ||
* @param {(error: Error, pair?: String) => any} errorHandler | ||
* @deprecated | ||
*/ | ||
@@ -68,0 +65,0 @@ function getExchangeDataLowTraffic(callback, errorHandler = err => console.log(err)) { |
@@ -9,3 +9,3 @@ import request = require('request'); | ||
const list = []; | ||
const price= html['quoteSummary'].result[0]['price']; | ||
const price = html['quoteSummary'].result[0]['price']; | ||
list.push(price.regularMarketPrice.raw); | ||
@@ -35,4 +35,3 @@ list.push(price.regularMarketChange.raw); | ||
/** | ||
* This method now on error | ||
* @returns {Promise<Array<Array<any>>>} | ||
* @deprecated | ||
*/ | ||
@@ -57,5 +56,3 @@ export function getExchangeDataLowTrafficP(): Promise<Array<Array<any>>> { | ||
/** | ||
* This method now on error | ||
* @param {(data: Array<Array<any>>) => any} callback | ||
* @param {(error: Error, pair?: String) => any} errorHandler | ||
* @deprecated | ||
*/ | ||
@@ -62,0 +59,0 @@ export function getExchangeDataLowTraffic(callback: (data: Array<Array<any>>) => any, errorHandler: (error: Error, pair?: String) => any = err => console.log(err)): void { |
@@ -14,3 +14,3 @@ { | ||
"main": "index.js", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"license": "MIT", | ||
@@ -17,0 +17,0 @@ "dependencies": { |
@@ -64,47 +64,7 @@ # yahoo-exchange 疎開 | ||
## getExchangeDataLowTraffic(callback, errorHandler): void | ||
* callback : data:Array\<Array\<any\>\> => any | ||
* errorHandler : options (A default method is ```err => console.log(err)```) | ||
### 例示コード | ||
* ``` javascript | ||
index.getExchangeDataLowTraffic(v => console.log(v)); | ||
// [['EUR/USD', 8, 143.647461, 1.709399], ... more 23 items] | ||
``` | ||
## getExchangeDataLowTrafficP(): Promise<Array<Array<any>>> | ||
### 例示コード | ||
* ``` javascript | ||
index.getExchangeDataLowTrafficP().then(v => console.log(v)) | ||
// [['EUR/USD', 8, 143.647461, 1.709399], ... more 23 items] | ||
``` | ||
## getExchangeDataLowTraffic() @deprecated | ||
> 2.0.2で除去されたメソッドです。 3.0で削除される予定ですので、getExchangeDataArrayを使用してください。 | ||
## getExchangeDataLowTrafficP() @deprecated | ||
> 2.0.2で除去されたメソッドです。 3.0で削除される予定ですので、getExchangeDataArrayを使用してください。 | ||
## getExchangeDataLowTraffic と getExchangeDataLowTrafficPは何ですか。 | ||
下に書かれている24のペアのデータを1回のリクエストで得られるため、速度が速く、サーバの資源を少なく使用します。 | ||
下記のペアを使用する方なら、このメソッドを使用したことを推奨致します。 | ||
### 利用可能なペアの一覧 | ||
* EUR/USD | ||
* USD/JPY | ||
* GBP/USD | ||
* AUD/USD | ||
* NZD/USD | ||
* EUR/JPY | ||
* GBP/JPY | ||
* EUR/GBP | ||
* EUR/CAD | ||
* EUR/SEK | ||
* EUR/CHF | ||
* EUR/HUF | ||
* EUR/JPY | ||
* USD/CNY | ||
* USD/HKD | ||
* USD/SGD | ||
* USD/INR | ||
* USD/MXN | ||
* USD/PHP | ||
* USD/IDR | ||
* USD/THB | ||
* USD/MYR | ||
* USD/ZAR | ||
* USD/RUB | ||
### getExchangeDataLowTrafficPは何ですか。 | ||
```Promise```に返還します。 | ||
## getFxYahooJapan(callback, errorHandler): void | ||
@@ -111,0 +71,0 @@ |
@@ -65,47 +65,6 @@ # yahoo-exchange | ||
## getExchangeDataLowTraffic(callback, errorHandler): void | ||
* callback : data:Array\<Array\<any\>\> => any | ||
* errorHandler : options (A default method is ```err => console.log(err)```) | ||
### 예시 코드 | ||
* ``` javascript | ||
index.getExchangeDataLowTraffic(v => console.log(v)); | ||
// [['EUR/USD', 8, 143.647461, 1.709399], ... more 23 items] | ||
``` | ||
## getExchangeDataLowTrafficP(): Promise<Array<Array<any>>> | ||
### 예시 코드 | ||
* ``` javascript | ||
index.getExchangeDataLowTrafficP().then(v => console.log(v)) | ||
// [['EUR/USD', 8, 143.647461, 1.709399], ... more 23 items] | ||
``` | ||
## getExchangeDataLowTraffic 와 getExchangeDataLowTrafficP은 무엇인가요? | ||
아래에 적혀있는 24개 페어의 데이터를 1번의 리퀘스트로 얻을 수 있어 속도가 빠르며, 서버의 자원을 덜 사용합니다. | ||
아래의 페어를 사용하시는 분이라면, 이 메소드를 사용하시는 것을 권장드립니다. | ||
### 이용 가능한 페어 목록 | ||
* EUR/USD | ||
* USD/JPY | ||
* GBP/USD | ||
* AUD/USD | ||
* NZD/USD | ||
* EUR/JPY | ||
* GBP/JPY | ||
* EUR/GBP | ||
* EUR/CAD | ||
* EUR/SEK | ||
* EUR/CHF | ||
* EUR/HUF | ||
* EUR/JPY | ||
* USD/CNY | ||
* USD/HKD | ||
* USD/SGD | ||
* USD/INR | ||
* USD/MXN | ||
* USD/PHP | ||
* USD/IDR | ||
* USD/THB | ||
* USD/MYR | ||
* USD/ZAR | ||
* USD/RUB | ||
### getExchangeDataLowTrafficP는 무엇인가요? | ||
```Promise```로 반환합니다. | ||
## getExchangeDataLowTraffic() @deprecated | ||
> 2.0.2에서 제거된 메소드입니다. 3.0에서 삭제될 예정이오니, getExchangeDataArray를 사용하세요. | ||
## getExchangeDataLowTrafficP() @deprecated | ||
> 2.0.2에서 제거된 메소드입니다. 3.0에서 삭제될 예정이오니, getExchangeDataArray를 사용하세요. | ||
## getFxYahooJapan(callback, errorHandler): void | ||
@@ -112,0 +71,0 @@ |
@@ -12,6 +12,2 @@ # yahoo-exchange | ||
>Not backward compatible. | ||
> The deprecated method has been removed. | ||
> Warning : getExchangeDataLowTraffic and getExchangeDataLowTrafficP returns error. Don't use now. | ||
@@ -65,47 +61,6 @@ ## getExchangeDataArray(pair, callback, errorHandler): void | ||
## getExchangeDataLowTraffic(callback, errorHandler): void | ||
* callback : data:Array\<Array\<any\>\> => any | ||
* errorHandler : options (A default method is ```err => console.log(err)```) | ||
### Example | ||
* ``` javascript | ||
index.getExchangeDataLowTraffic(v => console.log(v)); | ||
// [['EUR/USD', 8, 143.647461, 1.709399], ... more 23 items] | ||
``` | ||
## getExchangeDataLowTrafficP(): Promise<Array<Array<any>>> | ||
### Example | ||
* ``` javascript | ||
index.getExchangeDataLowTrafficP().then(v => console.log(v)) | ||
// [['EUR/USD', 8, 143.647461, 1.709399], ... more 23 items] | ||
``` | ||
## What is getExchangeDataLowTraffic and getExchangeDataLowTrafficP? | ||
It just does one request and get data of 24 pairs. | ||
If you use the following pair, it is recommended that you use this method. | ||
### What pairs are available? | ||
* EUR/USD | ||
* USD/JPY | ||
* GBP/USD | ||
* AUD/USD | ||
* NZD/USD | ||
* EUR/JPY | ||
* GBP/JPY | ||
* EUR/GBP | ||
* EUR/CAD | ||
* EUR/SEK | ||
* EUR/CHF | ||
* EUR/HUF | ||
* EUR/JPY | ||
* USD/CNY | ||
* USD/HKD | ||
* USD/SGD | ||
* USD/INR | ||
* USD/MXN | ||
* USD/PHP | ||
* USD/IDR | ||
* USD/THB | ||
* USD/MYR | ||
* USD/ZAR | ||
* USD/RUB | ||
### What is getExchangeDataLowTrafficP? | ||
It returns data using Promise. | ||
## getExchangeDataLowTraffic() @deprecated | ||
> deprecated Since version 2.0.2. Will be deleted in version 3.0. Use getExchangeDataArray instead. | ||
## getExchangeDataLowTrafficP() @deprecated | ||
> deprecated Since version 2.0.2. Will be deleted in version 3.0. Use getExchangeDataArray instead. | ||
## getFxYahooJapan(callback, errorHandler): void | ||
@@ -112,0 +67,0 @@ |
66633
1046
130