Giter Club home page Giter Club logo

connect-ts-api's People

Contributors

alexandr-bbm avatar dkaledin avatar eaglus avatar madroneropaulo avatar podgorniy avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

connect-ts-api's Issues

Example for Open API

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?

Add unit tests

Project's lack of unit tests. As the project is written in Typescript, and its intended to be environment agnostic (nodejs or browsers)

Test configuration

  • use fix version v2.5.3 for Jasmine
  • rename test to spec for use default Jasmine configuration without JASMINE_CONFIG_PATH
  • remove JavaScript test runner
  • add possibility to run any spec file from spec folder
  • rename first spec file spec/connect.test.ts -> spec/connect.ts (test suffix moved to folder name)
  • add to .gitignore compiled specs

Example Nodejs project

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

Remove JQuery dependency

Incoming events and adapter statuses should only be resolved by native JS promises, async/await or generators

Define and implement more stable API

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.

Potential recursion

This commit may lead to recursion f791b31 on disconnection extreme situations. Next API version 3.0 Must address this issue for guaranteed commands. It was hardcoded to quick fix #26.

Send Guaranteed Command Not working

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.

Project cannot be installed

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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.