1.2.9 • Published 3 months ago

sharkservers-sdk v1.2.9

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

SharkServers SDK

SharkServers Logo

The SharkServers SDK is a powerful and easy-to-use toolkit for interacting with the SharkServers platform. It provides developers with a comprehensive set of functions and methods to manage and control various aspects of the SharkServers infrastructure programmatically.

Features

  • API Authentication: Simple and secure authentication mechanisms for using the SharkServers API. .
  • Users: List users, online users.
  • Forum: Simple forum, create threads, posts.
  • Servers: Create servers, list servers, monitor servers for Team Fortress 2 game.

Installation

To use the SharkServers SDK in your project, you can either download the source code and include it manually, or install it using a package manager.

npm install sharkservers-sdk --save

Usage

import {SharkServersClient as shark_api} from "sharkservers-sdk";

// Register user

const new_user = await shark_api.auth.register({
    username: "TestUser",
    password: "testpassword123",
    password2: "testpassword123",
    email: "test@website.pl"
})

// Get user access token and refresh token
const user = await shark_api.auth.loginUser({
    username: "TestUser",
    password: "testpassword123"
})

// Get user info
shark_api.request.TOKEN = user.access_token

const user_info = await shark_api.users.getLoggedUser()
console.log(user_info)
1.2.9

3 months ago

1.2.8

3 months ago

1.2.6

3 months ago

1.1.0

5 months ago

1.0.9

7 months ago

1.0.8

7 months ago

1.0.7

7 months ago

1.0.11

7 months ago

1.0.10

7 months ago

1.0.6

8 months ago

1.0.5

9 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago