Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@orbis-systems/orbis-api-client

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orbis-systems/orbis-api-client - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

2

dist/lib/APIClient.js

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_Quotes=require("./categories/Quotes"),_Quotes2=_interopRequireDefault(_Quotes),_Research=require("./categories/Research"),_Research2=_interopRequireDefault(_Research),_User=require("./categories/User"),_User2=_interopRequireDefault(_User),_Options=require("./categories/Options"),_Options2=_interopRequireDefault(_Options),_Advisory=require("./categories/Advisory"),_Advisory2=_interopRequireDefault(_Advisory),_Relationships=require("./categories/Relationships"),_Relationships2=_interopRequireDefault(_Relationships),_Watchlists=require("./categories/Watchlists"),_Watchlists2=_interopRequireDefault(_Watchlists),_ETFs=require("./categories/ETFs"),_ETFs2=_interopRequireDefault(_ETFs),_News=require("./categories/News"),_News2=_interopRequireDefault(_News),_CorporateActions=require("./categories/CorporateActions"),_CorporateActions2=_interopRequireDefault(_CorporateActions),_LocalStorage=require("./session_stores/LocalStorage"),_LocalStorage2=_interopRequireDefault(_LocalStorage),_axios=require("axios"),_axios2=_interopRequireDefault(_axios),_jsonwebtoken=require("jsonwebtoken"),_jsonwebtoken2=_interopRequireDefault(_jsonwebtoken),_base=require("base-64"),_base2=_interopRequireDefault(_base),_Acats=require("./categories/Acats"),_Acats2=_interopRequireDefault(_Acats),_ACHs=require("./categories/ACHs"),_ACHs2=_interopRequireDefault(_ACHs),_Checks=require("./categories/Checks"),_Checks2=_interopRequireDefault(_Checks),_Documents=require("./categories/Documents"),_Documents2=_interopRequireDefault(_Documents),_TipRanks=require("./categories/TipRanks"),_TipRanks2=_interopRequireDefault(_TipRanks),_Wires=require("./categories/Wires"),_Wires2=_interopRequireDefault(_Wires),_Streaming=require("./categories/Streaming"),_Streaming2=_interopRequireDefault(_Streaming),_WSWrapper=require("./WSWrapper"),_WSWrapper2=_interopRequireDefault(_WSWrapper),_Orders=require("./categories/Orders"),_Orders2=_interopRequireDefault(_Orders),_Transfers=require("./categories/Transfers"),_Transfers2=_interopRequireDefault(_Transfers);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}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")}require("babel-core/register"),require("babel-polyfill");var APIClient=function(){function a(b){_classCallCheck(this,a),this.config=b,this.config.session_store||(this.config.session_store=_LocalStorage2.default),this.quotes=new _Quotes2.default(this),this.research=new _Research2.default(this),this.user=new _User2.default(this),this.orders=new _Orders2.default(this),this.options=new _Options2.default(this),this.advisory=new _Advisory2.default(this),this.watchlists=new _Watchlists2.default(this),this.etfs=new _ETFs2.default(this),this.news=new _News2.default(this),this.corporate_actions=new _CorporateActions2.default(this),this.relationships=new _Relationships2.default(this),this.ACATs=new _Acats2.default(this),this.ACHs=new _ACHs2.default(this),this.checks=new _Checks2.default(this),this.documents=new _Documents2.default(this),this.tip_ranks=new _TipRanks2.default(this),this.transfers=new _Transfers2.default(this),this.wires=new _Wires2.default(this),this.streaming=new _Streaming2.default(this)}return _createClass(a,[{key:"login",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g,h,i,j;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d="auth/v1/login",a.next=4,_axios2.default.post(this.config.auth_url+d);case 4:return e=a.sent,f=e.data.signature,g={username:b,password:c,signature:f},h={Referer:this.config.domain},a.next=10,_axios2.default.post(this.config.base_url+d,g,{headers:h});case 10:return i=a.sent,j=i.data.sessionId,a.next=14,this.config.session_store.set("sessionId",j,60);case 14:return a.abrupt("return",!0);case 17:return a.prev=17,a.t0=a["catch"](0),console.log(a.t0.data),a.abrupt("return",!1);case 21:case"end":return a.stop();}},a,this,[[0,17]])}));return function(){return a.apply(this,arguments)}}()},{key:"logout",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,this.get("auth/v1/logout");case 3:return this.expireSession(),a.abrupt("return",!0);case 7:return a.prev=7,a.t0=a["catch"](0),a.abrupt("return",!1);case 10:case"end":return a.stop();}},a,this,[[0,7]])}));return function(){return a.apply(this,arguments)}}()},{key:"headers",value:function(){return this.hasSession()?{Authorization:"Session "+this.token()}:{}}},{key:"token",value:function(){var a=this.config.session_store,b=a.get("sessionId"),c=_jsonwebtoken2.default.sign({sub:b},"test",{expiresIn:"5s"});return _base2.default.encode(c)}},{key:"hasSession",value:function(){return this.config.session_store.has("sessionId")}},{key:"expireSession",value:function(){var a=this.config.session_store;a.set("sessionId",null,0)}},{key:"handleResponse",value:function(a){var b={status:a&&a.status||-1,message:a&&a.statusText||"",data:a&&a.data||null,success:a&&200<=a.status&&300>a.status||!1};return b.success||console.log(b),b}},{key:"post",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=this.config.base_url,e=d+b,f=this.headers(),a.prev=3,a.next=6,_axios2.default.post(e,c,{headers:f});case 6:return g=a.sent,a.abrupt("return",this.handleResponse(g));case 10:return a.prev=10,a.t0=a["catch"](3),a.abrupt("return",this.handleResponse(a.t0.response));case 13:case"end":return a.stop();}},a,this,[[3,10]])}));return function(){return a.apply(this,arguments)}}()},{key:"get",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=this.config.base_url+b,e=this.headers(),a.prev=2,a.next=5,_axios2.default.get(d,{params:c,headers:e});case 5:return f=a.sent,a.abrupt("return",this.handleResponse(f));case 9:return a.prev=9,a.t0=a["catch"](2),a.abrupt("return",this.handleResponse(a.t0.response));case 12:case"end":return a.stop();}},a,this,[[2,9]])}));return function(){return a.apply(this,arguments)}}()},{key:"delete",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=this.config.base_url+b,e=this.headers(),a.prev=2,a.next=5,_axios2.default.delete(d,{params:c,headers:e});case 5:return f=a.sent,a.abrupt("return",this.handleResponse(f));case 9:return a.prev=9,a.t0=a["catch"](2),a.abrupt("return",this.handleResponse(a.t0.response));case 12:case"end":return a.stop();}},a,this,[[2,9]])}));return function(){return a.apply(this,arguments)}}()},{key:"websocket",value:function(a,b){var c=this,d=b.timeout,e=b.maxAttempts,f=b.onOpen,g=b.onMessage,h=b.onReconnect,i=b.onMaximum,j=b.onClose,k=b.onError,l=function(){return c.config.streaming_url+a+"?auth="+escape("Session "+c.token())},m=new _WSWrapper2.default(l(),{maxAttempts:e,timeout:d||5e3,onopen:f,onmessage:g,onmaximum:i,onerror:k,onclose:j,onreconnect:function(a){m.updateUrl(l()),h&&h(a)}});return m}}]),a}();exports.default=APIClient;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_Quotes=require("./categories/Quotes"),_Quotes2=_interopRequireDefault(_Quotes),_Research=require("./categories/Research"),_Research2=_interopRequireDefault(_Research),_User=require("./categories/User"),_User2=_interopRequireDefault(_User),_Options=require("./categories/Options"),_Options2=_interopRequireDefault(_Options),_Advisory=require("./categories/Advisory"),_Advisory2=_interopRequireDefault(_Advisory),_Relationships=require("./categories/Relationships"),_Relationships2=_interopRequireDefault(_Relationships),_Watchlists=require("./categories/Watchlists"),_Watchlists2=_interopRequireDefault(_Watchlists),_ETFs=require("./categories/ETFs"),_ETFs2=_interopRequireDefault(_ETFs),_News=require("./categories/News"),_News2=_interopRequireDefault(_News),_CorporateActions=require("./categories/CorporateActions"),_CorporateActions2=_interopRequireDefault(_CorporateActions),_LocalStorage=require("./session_stores/LocalStorage"),_LocalStorage2=_interopRequireDefault(_LocalStorage),_axios=require("axios"),_axios2=_interopRequireDefault(_axios),_jsonwebtoken=require("jsonwebtoken"),_jsonwebtoken2=_interopRequireDefault(_jsonwebtoken),_base=require("base-64"),_base2=_interopRequireDefault(_base),_Acats=require("./categories/Acats"),_Acats2=_interopRequireDefault(_Acats),_ACHs=require("./categories/ACHs"),_ACHs2=_interopRequireDefault(_ACHs),_Checks=require("./categories/Checks"),_Checks2=_interopRequireDefault(_Checks),_Documents=require("./categories/Documents"),_Documents2=_interopRequireDefault(_Documents),_TipRanks=require("./categories/TipRanks"),_TipRanks2=_interopRequireDefault(_TipRanks),_Wires=require("./categories/Wires"),_Wires2=_interopRequireDefault(_Wires),_Streaming=require("./categories/Streaming"),_Streaming2=_interopRequireDefault(_Streaming),_WSWrapper=require("./WSWrapper"),_WSWrapper2=_interopRequireDefault(_WSWrapper),_Orders=require("./categories/Orders"),_Orders2=_interopRequireDefault(_Orders),_Transfers=require("./categories/Transfers"),_Transfers2=_interopRequireDefault(_Transfers);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}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")}require("babel-core/register"),require("babel-polyfill");var APIClient=function(){function a(b){_classCallCheck(this,a),this.config=b,this.config.session_store||(this.config.session_store=_LocalStorage2.default),this.ACATs=new _Acats2.default(this),this.ACHs=new _ACHs2.default(this),this.advisory=new _Advisory2.default(this),this.checks=new _Checks2.default(this),this.corporate_actions=new _CorporateActions2.default(this),this.documents=new _Documents2.default(this),this.etfs=new _ETFs2.default(this),this.news=new _News2.default(this),this.options=new _Options2.default(this),this.orders=new _Orders2.default(this),this.quotes=new _Quotes2.default(this),this.relationships=new _Relationships2.default(this),this.research=new _Research2.default(this),this.streaming=new _Streaming2.default(this),this.tip_ranks=new _TipRanks2.default(this),this.transfers=new _Transfers2.default(this),this.user=new _User2.default(this),this.watchlists=new _Watchlists2.default(this),this.wires=new _Wires2.default(this)}return _createClass(a,[{key:"login",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g,h,i;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,d={Referer:this.config.domain},a.next=4,_axios2.default.post(this.config.sign_url,{},{headers:d});case 4:return e=a.sent,f=e.data.signature,g={username:b,password:c,signature:f},a.next=9,_axios2.default.post(this.config.base_url+"auth/v1/login",g,{headers:d});case 9:return h=a.sent,i=h.data.sessionId,a.next=13,this.config.session_store.set("sessionId",i,60);case 13:return a.abrupt("return",!0);case 16:return a.prev=16,a.t0=a["catch"](0),console.log(a.t0.response),a.abrupt("return",!1);case 20:case"end":return a.stop();}},a,this,[[0,16]])}));return function(){return a.apply(this,arguments)}}()},{key:"logout",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(){return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.prev=0,a.next=3,this.get("auth/v1/logout");case 3:return this.expireSession(),a.abrupt("return",!0);case 7:return a.prev=7,a.t0=a["catch"](0),a.abrupt("return",!1);case 10:case"end":return a.stop();}},a,this,[[0,7]])}));return function(){return a.apply(this,arguments)}}()},{key:"headers",value:function(){return this.hasSession()?{Authorization:"Session "+this.token()}:{}}},{key:"token",value:function(){var a=this.config.session_store,b=a.get("sessionId"),c=_jsonwebtoken2.default.sign({sub:b},"test",{expiresIn:"5s"});return _base2.default.encode(c)}},{key:"hasSession",value:function(){return this.config.session_store.has("sessionId")}},{key:"expireSession",value:function(){var a=this.config.session_store;a.set("sessionId",null,0)}},{key:"handleResponse",value:function(a){var b={status:a&&a.status||-1,message:a&&a.statusText||"",data:a&&a.data||null,success:a&&200<=a.status&&300>a.status||!1};return b.success||console.log(b),b}},{key:"post",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f,g;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=this.config.base_url,e=d+b,f=this.headers(),a.prev=3,a.next=6,_axios2.default.post(e,c,{headers:f});case 6:return g=a.sent,a.abrupt("return",this.handleResponse(g));case 10:return a.prev=10,a.t0=a["catch"](3),a.abrupt("return",this.handleResponse(a.t0.response));case 13:case"end":return a.stop();}},a,this,[[3,10]])}));return function(){return a.apply(this,arguments)}}()},{key:"get",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=this.config.base_url+b,e=this.headers(),a.prev=2,a.next=5,_axios2.default.get(d,{params:c,headers:e});case 5:return f=a.sent,a.abrupt("return",this.handleResponse(f));case 9:return a.prev=9,a.t0=a["catch"](2),a.abrupt("return",this.handleResponse(a.t0.response));case 12:case"end":return a.stop();}},a,this,[[2,9]])}));return function(){return a.apply(this,arguments)}}()},{key:"delete",value:function(){var a=_asyncToGenerator(regeneratorRuntime.mark(function a(b,c){var d,e,f;return regeneratorRuntime.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return d=this.config.base_url+b,e=this.headers(),a.prev=2,a.next=5,_axios2.default.delete(d,{params:c,headers:e});case 5:return f=a.sent,a.abrupt("return",this.handleResponse(f));case 9:return a.prev=9,a.t0=a["catch"](2),a.abrupt("return",this.handleResponse(a.t0.response));case 12:case"end":return a.stop();}},a,this,[[2,9]])}));return function(){return a.apply(this,arguments)}}()},{key:"websocket",value:function(a,b){var c=this,d=b.timeout,e=b.maxAttempts,f=b.onOpen,g=b.onMessage,h=b.onReconnect,i=b.onMaximum,j=b.onClose,k=b.onError,l=function(){return c.config.streaming_url+a+"?auth="+escape("Session "+c.token())},m=new _WSWrapper2.default(l(),{maxAttempts:e,timeout:d||5e3,onopen:f,onmessage:g,onmaximum:i,onerror:k,onclose:j,onreconnect:function(a){m.updateUrl(l()),h&&h(a)}});return m}}]),a}();exports.default=APIClient;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_APICategory2=require("./APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Quotes=function(a){function b(){return _classCallCheck(this,b),_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return _inherits(b,a),_createClass(b,[{key:"equity",value:function(a){return this.client.get("quotes/equity/",{symbols:a})}},{key:"search",value:function(a,b){return this.client.get("quotes/search",{criteria:a,limit:b})}},{key:"historical",value:function(a,b,c,d){return this.client.get("quotes/equity/historical",{symbol:a,start:b,end:c,range:d})}},{key:"intraday",value:function(a){return this.client.get("quotes/equity/intraday",{symbol:a})}},{key:"ticks",value:function(a,b,c){return this.client.get("quotes/equity/ticks",{symbol:a,startTime:b,endTime:c})}},{key:"option",value:function(a){return this.client.get("quotes/option",{symbol:a})}},{key:"top10",value:function(a){return this.client.get("quotes/top10/"+a)}},{key:"rst",value:function(a,b,c,d,e){return this.client.get("quotes/rst",{benchmark:a,symbols:b,range:c,period:d,setEMA:e})}},{key:"seasonality",value:function(a,b,c){return this.client.get("quotes/seasonality",{benchmark:a,symbols:b,years:c})}},{key:"shortability",value:function(a){return this.client.get("quotes/equity/shortability/"+a)}}]),b}(_APICategory3.default);exports.default=Quotes;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_APICategory2=require("./APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Quotes=function(a){function b(){return _classCallCheck(this,b),_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return _inherits(b,a),_createClass(b,[{key:"equity",value:function(a){return this.client.get("quotes/equity/",{symbols:a})}},{key:"search",value:function(a,b){return this.client.get("quotes/search",{criteria:a,limit:b})}},{key:"historical",value:function(a){return this.client.get("quotes/equity/historical",a)}},{key:"intraday",value:function(a){return this.client.get("quotes/equity/intraday",{symbol:a})}},{key:"ticks",value:function(a,b,c){return this.client.get("quotes/equity/ticks",{symbol:a,startTime:b,endTime:c})}},{key:"option",value:function(a){return this.client.get("quotes/option",{symbol:a})}},{key:"top10",value:function(a,b){return this.client.get("quotes/top10/"+a,b)}},{key:"rst",value:function(a,b,c,d,e){return this.client.get("quotes/rst",{benchmark:a,symbols:b,range:c,period:d,setEMA:e})}},{key:"seasonality",value:function(a,b,c){return this.client.get("quotes/seasonality",{benchmark:a,symbols:b,years:c})}},{key:"shortability",value:function(a){return this.client.get("quotes/equity/shortability/"+a)}}]),b}(_APICategory3.default);exports.default=Quotes;

@@ -1,1 +0,1 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_APICategory2=require("./APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Research=function(a){function b(){return _classCallCheck(this,b),_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return _inherits(b,a),_createClass(b,[{key:"ipo",value:function(a,b,c){var d=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3];return this.client.get("research/ipo/"+a,{time:b,sort:c,loadQuotes:d})}},{key:"indexComponents",value:function(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];return this.client.get("research/index/components/"+a,{loadQuotes:b})}},{key:"upgrades",value:function(){return this.client.get("research/upgrades")}},{key:"ownership",value:function(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];return this.client.get("research/ownerships/details/",{symbols:a,loadQuotes:b})}},{key:"earnings",value:function(a,b){var c=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return this.client.get("research/earnings",{days:a,excludeOtcs:b,loadQuotes:c})}},{key:"earningsPortfolio",value:function(){return this.client.get("research/earnings/portfolio")}}]),b}(_APICategory3.default);exports.default=Research;
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _createClass=function(){function a(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),_APICategory2=require("./APICategory"),_APICategory3=_interopRequireDefault(_APICategory2);function _interopRequireDefault(a){return a&&a.__esModule?a:{default:a}}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"==typeof b||"function"==typeof b)?b:a}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}var Research=function(a){function b(){return _classCallCheck(this,b),_possibleConstructorReturn(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}return _inherits(b,a),_createClass(b,[{key:"base",value:function(a,b){return this.client.get("research/"+a,b)}},{key:"ipo",value:function(a,b,c){var d=!!(3<arguments.length&&void 0!==arguments[3])&&arguments[3];return this.client.get("research/ipo/"+a,{time:b,sort:c,loadQuotes:d})}},{key:"indexComponents",value:function(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];return this.client.get("research/index/components/"+a,{loadQuotes:b})}},{key:"upgrades",value:function(){return this.client.get("research/upgrades")}},{key:"ownership",value:function(a){var b=!!(1<arguments.length&&void 0!==arguments[1])&&arguments[1];return this.client.get("research/ownerships/details/",{symbols:a,loadQuotes:b})}},{key:"earnings",value:function(a,b){var c=!!(2<arguments.length&&void 0!==arguments[2])&&arguments[2];return this.client.get("research/earnings",{days:a,excludeOtcs:b,loadQuotes:c})}},{key:"earningsPortfolio",value:function(){return this.client.get("research/earnings/portfolio")}},{key:"etfTopTen",value:function(a){return this.client.get("research/etf/top10",a)}},{key:"etfScreener",value:function(a){return this.client.get("research/etf/screener",a)}},{key:"indexOverview",value:function(a){return this.client.get("research/indexOverview",a)}},{key:"etfInit",value:function(a){return this.client.get("research/etf/init",a)}},{key:"etfBreakdown",value:function(a){return this.client.get("research/etf/breakdown",a)}},{key:"tipranksLiveFeed",value:function(a){return this.client.get("research/tipranks/livefeed",a)}},{key:"tipranksConsensusSector",value:function(a){return this.client.get("research/tipranks/consensus/sector",a)}},{key:"tipranksStocksTop",value:function(a){return this.client.get("research/tipranks/stocks/top",a)}},{key:"tipranksAnalyst",value:function(a,b){return this.client.get("research/tipranks/analyst/"+a,b)}},{key:"tipranksAnalystTop",value:function(a){return this.client.get("research/tipranks/analyst/top",a)}},{key:"tipranksAnalystPortfolio",value:function(a,b){return this.client.get("research/tipranks/analyst/portfolio/"+a,b)}},{key:"tipranksTrending",value:function(a){return this.client.get("research/tipranks/trending",a)}},{key:"tipranksStockOverview",value:function(a,b){return this.client.get("research/tipranks/stocks/overview/"+a,b)}},{key:"tipranksNewsSentiment",value:function(a,b){return this.client.get("research/tipranks/news/sentiment/"+a,b)}},{key:"news",value:function(a,b){return this.client.get("research/news/"+a,b)}},{key:"newsTicker",value:function(a,b){return this.client.get("research/news/ticker/"+a,b)}}]),b}(_APICategory3.default);exports.default=Research;
{
"name": "@orbis-systems/orbis-api-client",
"version": "3.0.0",
"version": "3.1.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/lib/index.js",

@@ -40,4 +40,4 @@ ## This is in early development and is not ready for implementation.

const config = {
base_url: 'https://example.com/', //Obtained from Orbis
auth_url: 'https://example.com/'
base_url: 'https://example.com/', // Obtained from Orbis
sign_url: 'https://example.com/' // Endpoint for getting the signature
};

@@ -56,4 +56,4 @@

const config = {
base_url: 'https://example.com/', //Obtained from Orbis
auth_url: 'https://example.com/'
base_url: 'https://example.com/', // Obtained from Orbis
sign_url: 'https://example.com/' // Endpoint for getting the signature
};

@@ -60,0 +60,0 @@

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc