Skip to content

Commit

Permalink
feat: minor version change (#10)
Browse files Browse the repository at this point in the history
[create-pull-request] automated change

Co-authored-by: GamingEventapiBot <[email protected]>
  • Loading branch information
github-actions[bot] and GamingEventapiBot authored Jul 5, 2022
1 parent 3adab8d commit 50bb8a3
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 293 deletions.
2 changes: 1 addition & 1 deletion configs.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"template_last_version": "0.5.21",
"document_last_version": "0.4.0"
"document_last_version": "0.5.0"
}
2 changes: 1 addition & 1 deletion package-lock.json

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

56 changes: 0 additions & 56 deletions src/channels/V0RustServersServerIdEventsStopped.ts

This file was deleted.

46 changes: 0 additions & 46 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,18 @@ import {
} from './NatsTypescriptTemplateError';
import * as Nats from 'nats';
import * as v0RustServersServerIdEventsStartedChannel from "./channels/V0RustServersServerIdEventsStarted";
import * as v0RustServersServerIdEventsStoppedChannel from "./channels/V0RustServersServerIdEventsStopped";
import * as v0RustServersServerIdEventsPlayerSteamIdChattedChannel from "./channels/V0RustServersServerIdEventsPlayerSteamIdChatted";
import ServerStarted from "./models/ServerStarted";
import ServerStopped from "./models/ServerStopped";
import ChatMessage from "./models/ChatMessage";
export {
v0RustServersServerIdEventsStartedChannel
};
export {
v0RustServersServerIdEventsStoppedChannel
};
export {
v0RustServersServerIdEventsPlayerSteamIdChattedChannel
};
export {
ServerStarted
};
export {
ServerStopped
};
export {
ChatMessage
};
Expand Down Expand Up @@ -169,44 +161,6 @@ export class NatsAsyncApiClient {
}
});
}
/**
* Subscribe to the `v0/rust/servers/{server_id}/events/stopped`
*
* Channel for the API to process for when a server has stopped
*
* @param onDataCallback to call when messages are received
* @param server_id parameter to use in topic
* @param flush ensure client is force flushed after subscribing
* @param options to subscribe with, bindings from the AsyncAPI document overwrite these if specified
*/
public subscribeToV0RustServersServerIdEventsStopped(
onDataCallback: (
err ? : NatsTypescriptTemplateError,
msg ? : ServerStopped, server_id ? : string) => void, server_id: string,
flush ? : boolean,
options ? : Nats.SubscriptionOptions
): Promise < Nats.Subscription > {
return new Promise(async (resolve, reject) => {
if (!this.isClosed() && this.nc !== undefined && this.codec !== undefined) {
try {
const sub = await v0RustServersServerIdEventsStoppedChannel.subscribe(
onDataCallback,
this.nc,
this.codec, server_id,
options
);
if (flush) {
await this.nc.flush();
}
resolve(sub);
} catch (e: any) {
reject(e);
}
} else {
reject(NatsTypescriptTemplateError.errorForCode(ErrorCode.NOT_CONNECTED));
}
});
}
/**
* Subscribe to the `v0/rust/servers/{server_id}/events/player/{steam_id}/chatted`
*
Expand Down
55 changes: 0 additions & 55 deletions src/models/ServerStopped.ts

This file was deleted.

31 changes: 0 additions & 31 deletions src/testclient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,18 @@ import {
} from '../NatsTypescriptTemplateError';
import * as Nats from 'nats';
import * as v0RustServersServerIdEventsStartedChannel from "./testchannels/V0RustServersServerIdEventsStarted";
import * as v0RustServersServerIdEventsStoppedChannel from "./testchannels/V0RustServersServerIdEventsStopped";
import * as v0RustServersServerIdEventsPlayerSteamIdChattedChannel from "./testchannels/V0RustServersServerIdEventsPlayerSteamIdChatted";
import ServerStarted from "../models/ServerStarted";
import ServerStopped from "../models/ServerStopped";
import ChatMessage from "../models/ChatMessage";
export {
v0RustServersServerIdEventsStartedChannel
};
export {
v0RustServersServerIdEventsStoppedChannel
};
export {
v0RustServersServerIdEventsPlayerSteamIdChattedChannel
};
export {
ServerStarted
};
export {
ServerStopped
};
export {
ChatMessage
};
Expand Down Expand Up @@ -146,29 +138,6 @@ export class NatsAsyncApiTestClient {
return Promise.reject(NatsTypescriptTemplateError.errorForCode(ErrorCode.NOT_CONNECTED));
}
}
/**
* Publish to the `v0/rust/servers/{server_id}/events/stopped` channel
*
* Channel for the API to process for when a server has stopped
*
* @param message to publish
* @param server_id parameter to use in topic
*/
public publishToV0RustServersServerIdEventsStopped(
message: ServerStopped, server_id: string,
options ? : Nats.PublishOptions
): Promise < void > {
if (!this.isClosed() && this.nc !== undefined && this.codec !== undefined) {
return v0RustServersServerIdEventsStoppedChannel.publish(
message,
this.nc,
this.codec, server_id,
options
);
} else {
return Promise.reject(NatsTypescriptTemplateError.errorForCode(ErrorCode.NOT_CONNECTED));
}
}
/**
* Publish to the `v0/rust/servers/{server_id}/events/player/{steam_id}/chatted` channel
*
Expand Down
37 changes: 0 additions & 37 deletions src/testclient/testchannels/V0RustServersServerIdEventsStopped.ts

This file was deleted.

66 changes: 0 additions & 66 deletions tests/integration/V0RustServersServerIdEventsStopped.spec.ts

This file was deleted.

0 comments on commit 50bb8a3

Please sign in to comment.