mirror of
https://github.com/tribufu/sdk-js
synced 2025-06-15 18:24:19 +00:00
Use nswag generator
This commit is contained in:
@ -1,15 +1,14 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// SPDX-License-Identifier: MIT AND Apache-2.0
|
||||
|
||||
import dotenv from 'dotenv';
|
||||
import { TribufuApi } from '../build/index.mjs';
|
||||
import dotenv from "dotenv";
|
||||
import { TribufuApi } from "../build/index.mjs";
|
||||
|
||||
dotenv.config();
|
||||
|
||||
async function main() {
|
||||
const api = TribufuApi.fromEnv("TRIBUFU");
|
||||
const games = await api.getGames();
|
||||
console.log(games[0]);
|
||||
console.log(await api.authGetUserInfo());
|
||||
}
|
||||
|
||||
main();
|
||||
|
@ -1,10 +0,0 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import dotenv from 'dotenv';
|
||||
import { TribufuBot } from '../build/index.mjs';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const bot = TribufuBot.fromEnv("TRIBUFU");
|
||||
const botId = bot.getBotId();
|
@ -1,15 +0,0 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import dotenv from 'dotenv';
|
||||
import { TribufuClient } from '../build/index.mjs';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
async function main() {
|
||||
const client = TribufuClient.fromEnv("TRIBUFU");
|
||||
const games = await client.getServers();
|
||||
console.log(games);
|
||||
}
|
||||
|
||||
main();
|
@ -1,11 +0,0 @@
|
||||
// Copyright (c) Tribufu. All Rights Reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import dotenv from 'dotenv';
|
||||
import { TribufuServer } from '../build/index.mjs';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
const server = TribufuServer.fromEnv("TRIBUFU");
|
||||
const serverId = server.getServerId();
|
||||
const clientId = server.getClientId();
|
Reference in New Issue
Block a user