Skip to content

Commit 1efa655

Browse files
ticketless fix + README fix
1 parent 3399589 commit 1efa655

14 files changed

+16
-16
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ To transpile it for browser use: run `gulp bundle`
1313
## Install
1414

1515
Via npm: `$ npm i --save gbase-html5-sdk`
16+
1617
From CDN:
1718
```html
1819
<script src="https://gbase-public-static.ams3.cdn.digitaloceanspaces.com/gbase-html5-latest-min.js"></script>
1920
```
2021

21-
Documentation here: http://gbase.tech/doc/htmlAssetApi/gbaseApi/
22+
Online documentation here: [Doxdox hosted](https://doxdox.org/red-machine-games/goblin-javascript-asset)

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
var Gbase = {
8-
GbaseApi: require('./lib/GbaseApi.js').GbaseApi,
8+
GbaseApi: require('./lib/GbaseApi.js'),
99
GbaseResponse: require('./lib/objects/GbaseResponse.js'),
1010
GbaseError: require('./lib/objects/GbaseError.js'),
1111
GbaseRangePicker: require('./lib/objects/GbaseRangePicker.js'),

lib/GbaseApi.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,4 @@ class GbaseApi {
121121
}
122122
}
123123

124-
module.exports = {
125-
GbaseApi
126-
};
124+
module.exports = GbaseApi;

lib/NetworkManager.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const MAX_REPEAT_COUNT = 2,
99
TIMEOUT_MS = 15 * 1000,
1010
PING_DELTA_TIME_MS = 45 * 1000,
1111
NO_INPUT_DELTA_TIME_MS = 180 * 1000,
12-
SERVER_UNDER_MAINTENANCE_DELAY_MS = 5 * 1000,
12+
SERVER_UNDER_MAINTENANCE_DELAY_MS = 3 * 1000,
1313
SERVER_UNDER_MAINTENANCE_REREQUEST_TRIES = 6,
1414
HEARTBEAT_EVERY_MS = 1000;
1515

@@ -175,6 +175,7 @@ class NetworkManager {
175175
callback(new GbaseError('Gbase backend is currently at maintenance. Try again later', 8, { originalError: theError.details.body }));
176176
break;
177177
case 592:
178+
case 1078:
178179
if(originalRequest.tries === -1 || originalRequest.tries > 0){
179180
originalRequest.tries = (originalRequest.tries < 0) ? SERVER_UNDER_MAINTENANCE_REREQUEST_TRIES : originalRequest.tries - 1;
180181
this.theQueue.push(originalRequest);

test/testAuth.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var expect = require('chai').expect,
66
const LOCAL_ADDRESS = 'http://localhost:1337',
77
HMAC_SECRET = 'default';
88

9-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
9+
var GbaseApi = require('../lib/GbaseApi.js'),
1010
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1111

1212
describe('testAuth.js', () => {

test/testLinkProfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var expect = require('chai').expect;
55
const LOCAL_ADDRESS = 'http://localhost:1337',
66
HMAC_SECRET = 'default';
77

8-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
8+
var GbaseApi = require('../lib/GbaseApi.js'),
99
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1010

1111
describe('testLinkProfile.js', () => {

test/testMatchmaking.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var expect = require('chai').expect;
55
const LOCAL_ADDRESS = 'http://localhost:1337',
66
HMAC_SECRET = 'default';
77

8-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
8+
var GbaseApi = require('../lib/GbaseApi.js'),
99
GbaseResponse = require('../lib/objects/GbaseResponse.js'),
1010
GbaseRangePicker = require('../lib/objects/GbaseRangePicker.js');
1111

test/testProfilesStuff.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var expect = require('chai').expect,
66
const LOCAL_ADDRESS = 'http://localhost:1337',
77
HMAC_SECRET = 'default';
88

9-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
9+
var GbaseApi = require('../lib/GbaseApi.js'),
1010
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1111

1212
describe('testProfilesStuff.js', () => {

test/testPve.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var expect = require('chai').expect;
55
const LOCAL_ADDRESS = 'http://localhost:1337',
66
HMAC_SECRET = 'default';
77

8-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
8+
var GbaseApi = require('../lib/GbaseApi.js'),
99
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1010

1111
/**

test/testPvp.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var expect = require('chai').expect;
55
const LOCAL_ADDRESS = 'http://localhost:1337',
66
HMAC_SECRET = 'default';
77

8-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
8+
var GbaseApi = require('../lib/GbaseApi.js'),
99
GbaseResponse = require('../lib/objects/GbaseResponse.js'),
1010
GbaseError = require('../lib/objects/GbaseError.js'),
1111
GbaseRangePicker = require('../lib/objects/GbaseRangePicker.js');

test/testRecordsAndLeaderboard.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var expect = require('chai').expect,
66
const LOCAL_ADDRESS = 'http://localhost:1337',
77
HMAC_SECRET = 'default';
88

9-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
9+
var GbaseApi = require('../lib/GbaseApi.js'),
1010
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1111

1212
describe('testRecordsAndLeaderboard.js', () => {

test/testSocial.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var expect = require('chai').expect,
66
const LOCAL_ADDRESS = 'http://localhost:1337',
77
HMAC_SECRET = 'default';
88

9-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
9+
var GbaseApi = require('../lib/GbaseApi.js'),
1010
GbaseResponse = require('../lib/objects/GbaseResponse.js'),
1111
GbaseError = require('../lib/objects/GbaseError.js');
1212

test/testTickets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var expect = require('chai').expect,
66
const LOCAL_ADDRESS = 'http://localhost:1337',
77
HMAC_SECRET = 'default';
88

9-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
9+
var GbaseApi = require('../lib/GbaseApi.js'),
1010
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1111

1212
describe('testTickets.js', () => {

test/testUtils.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var expect = require('chai').expect;
55
const LOCAL_ADDRESS = 'http://localhost:1337',
66
HMAC_SECRET = 'default';
77

8-
var GbaseApi = require('../lib/GbaseApi.js').GbaseApi,
8+
var GbaseApi = require('../lib/GbaseApi.js'),
99
GbaseResponse = require('../lib/objects/GbaseResponse.js');
1010

1111
describe('testUtils.js', () => {

0 commit comments

Comments
 (0)