spotware / connect-ts-api Goto Github PK
View Code? Open in Web Editor NEWA connector SDK for Spotware Connect Open API in TypeScript
Home Page: https://connect.spotware.com/docs/api-reference
License: MIT License
A connector SDK for Spotware Connect Open API in TypeScript
Home Page: https://connect.spotware.com/docs/api-reference
License: MIT License
As I got from README:
A connector SDK for Spotware Connect Open API in TypeScript
Is any example or test for using connecet-ts-api from connect to Open API?
Method addIncomingMessagesListener
adds every listener to the stack even if the adapter is not connected. This is causing an unnecessary loop through listeners when they are added to stack but not sent, making it difficult also to recognize if an error occurred before the message was sent or after.
Project's lack of unit tests. As the project is written in Typescript, and its intended to be environment agnostic (nodejs or browsers)
Lint tests with rules from tslint.json
There is already connect-js-encode-decode for frame buffer encode and decode.
Frame buffer codec should be integrated into connect-ts-api.
Hi, I am trying to use Nodejs to connect to cTrader but I only have the current Nodejs example from 2017 which uses old package versions. Can you please post a simple example that will send a trade to cTrader for given API key using the newer packages e.g. connect-js-encode-decode. Thank you
Incoming events and adapter statuses should only be resolved by native JS promises, async/await or generators
Currently the way to extend the package is by overwriting public methods. This is not scalable and not safe as different parts of the project may overwrite the same method without a clue of that. We should change that either by passing the extended function as a callback or implementing some EventEmitter pattern.
//Current
public isError(payloadType): boolean {
//Overwrite this method by your buisness logic
return false;
}
//Proposal 1. Callback
public onError(callback: () => any): void {
callback.call()
}
//Proposal 2. EventEmitter
public subscribe(eventType: EnumEventTypes, callback): void {
//Add callback to event type
}
Im more prone to the first proposal, as it is less intrusive for this package. The second one only adds more complexity. More proposals are welcome.
We need to deprecate jasmine.
Send guaranteed command is working based on regular send command, just that it is sent only when the connection is available, but if the connection is dropped before we receive the related push event, we will handle it as a regular command, and so we will delete the handler and won't resend the command. Also, Here the pending commands list is being cleared always after we try to send the commands on reconnection, but we never confirm that they were sent and received, and they will be lost in case something went wrong.
During installation the http://macmini2.dev.spotwa.re:4873/nyc/-/nyc-10.1.2.tgz
triggers timeout.
connect-ts-api % npm install
npm ERR! code ETIMEDOUT
npm ERR! syscall connect
npm ERR! errno ETIMEDOUT
npm ERR! network request to http://macmini2.dev.spotwa.re:4873/nyc/-/nyc-10.1.2.tgz failed, reason: connect ETIMEDOUT 127.0.0.4:4873
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.