
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
An abstraction layer for the GeoFS API (credit to iL0g1c for MapAPI & MultiplayerAPI)
mkdir example-dir
cd /path/to/example-dir
npm install js-geofs
The MapAPI is a way to access GeoFS's map data, which includes:
ECMAScript:
import { MapAPI } from "js-geofs";
const myAPI = new MapAPI();
CommonJS:
const geofs = require("js-geofs");
const myAPI = new geofs.MapAPI();
Parameters:
Returns: List of users as per specifications
Gets response history.
Parameters: N/A
Returns: Array of all previous results of getUsers calls
Clears responseList.
Parameters: N/A
Returns: undefined
Enables, disables, or toggles the usage of the responseList.
Parameters: N/A
Returns: undefined
The MultiplayerAPI is a way to access GeoFS's multiplayer data, which includes:
ECMAScript:
import { MultiplayerAPI } from "js-geofs";
const myAPI = new multiplayerAPI(sessionID, accountID);
CommonJS:
const geofs = require("js-geofs");
const myAPI = new multiplayerAPI(sessionID, accountID);
The accountID value can be found here and is refered to as your "user ID" on the website.
The sessionID value can be found in the console. Sign into your account here and then open the console with ctrl+shift+j.
Then, paste this code in.
const cookies = document.cookie.split(';');
const sessionIdCookie = cookies.find(cookie => cookie.trim().startsWith('PHPSESSID='));
const sessionId = sessionIdCookie ? sessionIdCookie.split('=')[1] : null;
console.log(sessionId);
This should output a session ID that is basically a random string. Next, you need to make a handshake with the server.
myAPI.handshake();
Now you are setup and can use the API freely.
Sends a specified message to GeoFS chat.
Parameters:
Returns: undefined.
Allows you to pull the most recent messages from the server.
It will only pull messages that occured, since the last time you used this command.
Parameters: N/A
Returns: Array of chat messages or null if connection was unsuccessful.
Either returns current coords or changes them.
Parameters:
coords (Array of 6 numbers), optional
co 0 latitude
co 1 longitude
co 2 altitude in meters
co 3 vertical speed in meters
last two can be 0
Returns: undefined if parameter is passed or an array of current coords if it isn't passed.
Geocodes a specified query.
ECMAScript:
import { GeoAPI } from "js-geofs";
const myAPI = new GeoAPI();
CommonJS:
const geofs = require("js-geofs");
const myAPI = new geofs.GeoAPI();
Sends a request to GeoFS's geocoding backend and returns the response if found.
Parameters:
Returns: Response object or undefined if it couldn't be geocoded.
ECMAScript:
import { WeatherAPI } from "js-geofs";
const myAPI = new WeatherAPI();
CommonJS:
const geofs = require("js-geofs");
const myAPI = new geofs.WeatherAPI();
Queries GeoFS's weather backend with the specified ICAO(s) and returns the airport's METAR if found.
Parameters:
Returns: Response object or undefined if no matching METAR was found.
FAQs
An abstraction layer for the GeoFS API (credit to iL0g1c).
We found that js-geofs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.