Skip to content

Commit

Permalink
Merge pull request #17 from microwavekonijn/feature/#2-rest-integration
Browse files Browse the repository at this point in the history
Census Rest API endpoints
  • Loading branch information
microwavekonijn authored Jul 22, 2020
2 parents 830497d + a5bccea commit 5189d28
Show file tree
Hide file tree
Showing 162 changed files with 12,953 additions and 92 deletions.
6,275 changes: 6,275 additions & 0 deletions census.full.json

Large diffs are not rendered by default.

640 changes: 640 additions & 0 deletions census.json

Large diffs are not rendered by default.

168 changes: 112 additions & 56 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 14 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,23 @@
},
"homepage": "https://github.com/microwavekonijn/ps2census#readme",
"dependencies": {
"ws": "^7.3.0"
},
"devDependencies": {
"@types/node": "^14.0.13",
"@types/ws": "^7.2.5",
"@typescript-eslint/eslint-plugin": "^3.1.0",
"@typescript-eslint/parser": "^3.1.0",
"eslint": "^7.2.0",
"mocha": "^8.0.1",
"ts-node": "^8.10.1",
"typescript": "^3.9.5"
"axios": "^0.19.2",
"ws": "^7.3.1"
},
"optionalDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"devDependencies": {
"@types/lodash": "^4.14.157",
"@types/node": "^14.0.22",
"@types/ws": "^7.2.6",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"eslint": "^7.4.0",
"lodash": "^4.17.19",
"mocha": "^8.0.1",
"ts-node": "^8.10.1",
"typescript": "^3.9.6"
}
}
3 changes: 2 additions & 1 deletion src/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import {
ItemAddedData, MetagameEventData, PlayerFacilityCaptureData, PlayerFacilityDefendData, PlayerLoginData,
PlayerLogoutData, SkillAddedData, VehicleDestroyData,
} from './utils/PS2Events';
import { ClientConfig, EventStreamSubscribed, PS2Environment } from './utils/Types';
import { ClientConfig, EventStreamSubscribed} from './utils/Types';
import EventStreamManager from './EventStreamManager';
import PS2Event from './events/PS2Event';
import { PS2Environment } from '../utils/Types';

declare interface Client {
on(event: 'ready', listener: () => void): this;
Expand Down
5 changes: 3 additions & 2 deletions src/client/EventStream.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { EventEmitter } from 'events';
import WebSocket, { Data } from 'ws';
import Timeout = NodeJS.Timeout;
import { EventStreamConfig, PS2Environment } from './utils/Types';
import { Events, State } from './utils/Contants';
import { EventStreamConfig} from './utils/Types';
import { Events, State } from './utils/Constants';
import EventStreamHandler from './concerns/EventStreamHandler';
import { PS2Environment } from '../utils/Types';

declare interface EventStream {
on(event: 'ready', listener: () => void): this;
Expand Down
2 changes: 1 addition & 1 deletion src/client/EventStreamHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PS2EventData } from './utils/PS2Events';
import EventStreamFilter from './concerns/EventStreamFilter';
import PS2Event from './events/PS2Event';
import Client from './Client';
import { Events } from './utils/Contants';
import { Events } from './utils/Constants';

import AchievementEarned from './events/AchievementEarned';
import BattleRankUp from './events/BattleRankUp';
Expand Down
2 changes: 1 addition & 1 deletion src/client/EventStreamManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { EventEmitter } from 'events';
import Client from './Client';
import EventStream from './EventStream';
import { EventStreamManagerConfig, EventStreamSubscription } from './utils/Types';
import { Events } from './utils/Contants';
import { Events } from './utils/Constants';
import Timeout = NodeJS.Timeout;
import EventStreamHandler from './EventStreamHandler';
import DuplicateFilter from './utils/DuplicateFilter';
Expand Down
2 changes: 1 addition & 1 deletion src/client/events/AchievementEarned.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PS2Event from './PS2Event';
import { AchievementEarnedData } from '../utils/PS2Events';
import { Events } from '../utils/Contants';
import { Events } from '../utils/Constants';

export default class AchievementEarned extends PS2Event implements AchievementEarnedData {
public readonly emit = Events.PS2_ACHIEVEMENT;
Expand Down
2 changes: 1 addition & 1 deletion src/client/events/BattleRankUp.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PS2Event from './PS2Event';
import { BattleRankUpData } from '../utils/PS2Events';
import { Events } from '../utils/Contants';
import { Events } from '../utils/Constants';

export default class BattleRankUp extends PS2Event implements BattleRankUpData {
public readonly emit = Events.PS2_RANKUP;
Expand Down
Loading

0 comments on commit 5189d28

Please sign in to comment.