Skip to content

Commit

Permalink
1.21
Browse files Browse the repository at this point in the history
- Logging improved
- Token expiration event only fired when status 403 and code 1007
- Account switch optimizations and corrections
  • Loading branch information
oizulain committed Sep 16, 2016
1 parent c0a237a commit b6f9da8
Show file tree
Hide file tree
Showing 8 changed files with 1,986 additions and 1,884 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ If you don't need to bundle Tradable core in your code base, then you can simply

```html
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js" type="text/javascript" ></script>
<script src="//js-api.tradable.com/core/1.20.4/tradable.min.js" type="text/javascript"
<script src="//js-api.tradable.com/core/1.21/tradable.min.js" type="text/javascript"
id="tradable" data-app-id="{your_app_id}" data-app-key="{your_app_key}"></script>
```

Expand Down Expand Up @@ -75,7 +75,7 @@ tradable.on("myEmbedReadyListener", "embedReady", function() {
});
```

The `embedReady` listener is notified every time that the status of `tradable.tradingEnabled` changes. As you might guess, if `tradable.tradingEnabled` is `true`, it means that the OAuth token was received and the user is successfully authenticated, i.e. you can now execute trades and orders.
The `embedReady` listener is notified every time that the status of `tradable.tradingEnabled` changes. As you might guess, if `tradable.tradingEnabled` is `true`, it means that the OAuth token was received and the user is successfully authenticated, i.e. you can now execute trades and orders. On the other hand, if you receive an `embedReady` event and `tradable.tradingEnabled` is `false`, you need to show the disconnected state.

Turning the listener off is as easy as:
```javascript
Expand Down
132 changes: 77 additions & 55 deletions dist/tradable.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/tradable.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gulpFile.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var versionNumber = '1.20.4';
var versionNumber = '1.21';

var gulp = require('gulp'),
rename = require('gulp-rename'),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tradable-core",
"version": "1.20.4",
"version": "1.21.0",
"description": "Lightweight JS wrapper of the Tradable API that will make the integration really easy.",
"main": "dist/tradable.js",
"scripts": {
Expand Down
128 changes: 75 additions & 53 deletions src/tradable.js

Large diffs are not rendered by default.

Loading

0 comments on commit b6f9da8

Please sign in to comment.