1.3.10 • Published 1 year ago

taembo-test-repo v1.3.10

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

farming-simulator-types

A package with helper functions and types for interacting with your Farming Simulator dedicated server.

Exports are as follows:

  • /2019 when interacting with an FS19 server
  • /2022 when interacting with an FS22 server

Additional exports will be added as new game versions release.

All types are generated manually through use of dedicated servers, as GIANTS unfortunately provides little to no detail about their REST APIs for dedicated servers.

Example usage

import {
    DSSExtension,
    type DSSResponse,
    Feeds,
    filterUnused
} from "farming-simulator-types/2022";

const response = await fetch("https://example.com" + Feeds.dedicatedServerStats("a1b2c3d4", DSSExtension.JSON));
const json: DSSResponse = await response.json();

if (json.slots) {
    for (const player of filterUnused(json.slots.players)) {
        console.log(player.name + " is on the server!");
    }
}
1.3.10

1 year ago

1.3.8

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.0.0

1 year ago