investors-exchange.api
Advanced tools
Comparing version 0.0.18 to 0.0.19
@@ -1,1 +0,1 @@ | ||
'use strict';var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var stock=function a(){_classCallCheck(this,a),_initialiseProps.call(this);for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c[0],f=void 0===e?'market':e;return this.symbol=f.toLowerCase(),this},_initialiseProps=function(){var a=this;this.book=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('book','/book');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.chart=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('chart','/chart/'+(d?d.join('/'):'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.company=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('company','/company');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.delayed_quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.quote({delayed:!0,percent:c});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.dividends=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('dividends','/dividends/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.earnings=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('earnings','/earnings');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.financials=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('financials','/financials');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.handle=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c,d,e){var f,g;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return f=a.path,g=a.symbol,b.next=3,(0,_lib.fetch)(c,f(d),e);case 3:return b.abrupt('return',b.sent);case 4:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.historical=this.chart,this.largest_trades=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('largest_trades','/largest-trades');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.logo=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('logo','/logo');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.news=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('news','/news/last/'+(c||1));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ohlc=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.t0=_extends,b.t1={symbol:a.symbol},b.next=4,a.handle('ohlc','/ohlc');case 4:return b.t2=b.sent,b.abrupt('return',(0,b.t0)(b.t1,b.t2));case 6:case'end':return b.stop();}},b,a)})),this.openclose=this.ohlc,this.path=function(b){return'/stock/'+a.symbol+b},this.peers=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('peers','/peers');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.price=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('price','/price');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.previous=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('previous','/previous');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){var c,d,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},f=e.delayed,g=e.percent;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.handle,d=g&&{displayPercent:!0},!f){b.next=8;break}return b.next=5,c('delayed_quote','/delayed-quote',d);case 5:return b.abrupt('return',b.sent);case 8:return b.next=10,a.handle('quote','/quote',d);case 10:return b.abrupt('return',b.sent);case 11:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.relevant=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('relevant','/relevant');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.short_interest=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('short_interest','/short-interest/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.splits=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('splits','/splits/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.spread=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('spread','/effective-spread');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.stats=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('stats','/stats');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.threshold_securities=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('threshold_securities','/threshold-securities/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.time_series=this.chart,this.volume_by_venue=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('volume_by_venue','/volume-by-venue');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}))};exports.default=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new(Function.prototype.bind.apply(stock,[null].concat(b)))}; | ||
'use strict';var _extends=Object.assign||function(a){for(var b,c=1;c<arguments.length;c++)for(var d in b=arguments[c],b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d]);return a},_lib=require('../lib');Object.defineProperty(exports,'__esModule',{value:!0});function _asyncToGenerator(a){return function(){var b=a.apply(this,arguments);return new Promise(function(a,c){function d(e,f){try{var g=b[e](f),h=g.value}catch(a){return void c(a)}return g.done?void a(h):Promise.resolve(h).then(function(a){d('next',a)},function(a){d('throw',a)})}return d('next')})}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError('Cannot call a class as a function')}var stock=function a(){_classCallCheck(this,a),_initialiseProps.call(this);for(var b=arguments.length,c=Array(b),d=0;d<b;d++)c[d]=arguments[d];var e=c[0],f=void 0===e?'market':e;return this.symbol=f.toLowerCase(),this},_initialiseProps=function(){var a=this;this.book=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('book','/book');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.chart=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){for(var c=arguments.length,d=Array(c),e=0;e<c;e++)d[e]=arguments[e];return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('chart','/chart/'+(d?d.join('/'):'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.company=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('company','/company');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.delayed_quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.quote({delayed:!0,percent:c});case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.dividends=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('dividends','/dividends/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.earnings=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('earnings','/earnings');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.financials=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('financials','/financials');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.handle=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c,d,e){var f,g;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return f=a.path,g=a.symbol,b.next=3,(0,_lib.fetch)(c,f(d),e);case 3:return b.abrupt('return',b.sent);case 4:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.historical=this.chart,this.largest_trades=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('largest_trades','/largest-trades');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.list=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('list:'+c,'/list/'+c);case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.logo=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('logo','/logo');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.news=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('news','/news/last/'+(c||1));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.ohlc=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.t0=_extends,b.t1={symbol:a.symbol},b.next=4,a.handle('ohlc','/ohlc');case 4:return b.t2=b.sent,b.abrupt('return',(0,b.t0)(b.t1,b.t2));case 6:case'end':return b.stop();}},b,a)})),this.openclose=this.ohlc,this.path=function(b){return'/stock/'+a.symbol+b},this.peers=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('peers','/peers');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.price=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('price','/price');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.previous=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('previous','/previous');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.quote=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(){var c,d,e=0<arguments.length&&arguments[0]!==void 0?arguments[0]:{},f=e.delayed,g=e.percent;return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:if(c=a.handle,d=g&&{displayPercent:!0},!f){b.next=8;break}return b.next=5,c('delayed_quote','/delayed-quote',d);case 5:return b.abrupt('return',b.sent);case 8:return b.next=10,a.handle('quote','/quote',d);case 10:return b.abrupt('return',b.sent);case 11:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.relevant=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('relevant','/relevant');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.short_interest=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('short_interest','/short-interest/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.splits=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('splits','/splits/'+(c||'1m'));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.spread=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('spread','/effective-spread');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.stats=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('stats','/stats');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)})),this.threshold_securities=function(){var b=_asyncToGenerator(regeneratorRuntime.mark(function b(c){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('threshold_securities','/threshold-securities/'+(c||''));case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}));return function(){return b.apply(this,arguments)}}(),this.time_series=this.chart,this.volume_by_venue=_asyncToGenerator(regeneratorRuntime.mark(function b(){return regeneratorRuntime.wrap(function(b){for(;;)switch(b.prev=b.next){case 0:return b.next=2,a.handle('volume_by_venue','/volume-by-venue');case 2:return b.abrupt('return',b.sent);case 3:case'end':return b.stop();}},b,a)}))};exports.default=function(){for(var a=arguments.length,b=Array(a),c=0;c<a;c++)b[c]=arguments[c];return new(Function.prototype.bind.apply(stock,[null].concat(b)))}; |
{ | ||
"name": "investors-exchange.api", | ||
"version": "0.0.18", | ||
"version": "0.0.19", | ||
"description": "Unofficial Browser / NodeJS API for https://iextrading.com", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16476