Skip to content

Commit 0635f97

Browse files
committed
Added new test
Removed a test Added info to readme Added yarn.lock Added lobbyMode to league updated package.json
1 parent 5258d60 commit 0635f97

5 files changed

Lines changed: 807 additions & 8 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,8 @@ An API client for Splatoon2.ink.
2727
## Contributing
2828

2929
In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
30+
31+
32+
## Other
33+
34+
I am not responsible for usage of this API. This is only a client, and not the API itself. Caching is not implemented.

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ module.exports.getCurrentStages = function() {
1919
var leagueDataStageB = res.data.league[0].stage_b.name;
2020
var leagueDataStart = res.data.league[0].start_time;
2121
var leagueDataEnd = res.data.league[0].end_time;
22-
})
23-
.catch(function (error) {
24-
console.log(error);
2522
});
2623

2724
var data = {
28-
apiVersion: "0.1.1",
25+
apiVersion: "0.2.0-0",
2926
league: {
27+
lobbyMode: 'league',
3028
mode: leagueDataMode,
3129
stageA: leagueDataStageA,
3230
stageB: leagueDataStageB,

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717
},
1818
"dependencies": {
1919
"axios": "^0.17.1"
20-
}
20+
},
21+
"repository": "https://github.com/Dog2puppy/splatoon2.ink-node-api-client.git",
22+
"private": false
2123
}

test/test.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
'use strict';
1+
/*eslint-disable unknown-require, no-undef, no-undef, unknown-require*/
2+
'use strict';
23

34
var expect = require('chai').expect;
45
var client = require('../index');
56

67
describe('#api', function() {
7-
it('should give API version', function() {
8+
it('should give league mode', function() {
89
var data = client.getCurrentStages();
9-
expect(data.apiVersion).to.equal('0.1.1');
10+
expect(data.league.lobbyMode).to.equal('league');
1011
});
1112
});

0 commit comments

Comments
 (0)