npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ark-query-tool

v1.0.38

Published

NodeJS Web Service that lets you load all the data from your ARK server Asynchronously.

Downloads

14

Readme

NodeJS-ArkService

This repository houses a NodeJS Web Service that lets you load all the data from your ARK server Asynchronously. The nodejs server must be on the same server that houses your ARK server in order for this to function properly. You also will need to open up the port you specify in the settings.json to the outside world.

Install

npm install ark-query-tool

Inside your index.js just put the following,

var arkquery = require('ark-query-tool');
arkquery.startServer();

Standalone

If you don't want to use this as an external module, clone this repo, run npm install and then node index.js start.

Setup

First you need to copy settings.json-example to settings.json and edit everything inside OR just run the module once and it will generate a settings.json for you that you can modify. Make sure nothing says CHANGEME when you are done. Also make note of your secret as you'll need it to setup your api key.

API Key

Your api key will be outputted to you in your console and log file the first time you run the module. If you forget to save the api key, just delete your player.sqlite and let it regen the cache.

Result

After running node index.js, your output should be similiar to this.

Config verification finished!
Player DB....
Caching Steam Info...
Profiles are done updating!
Steam bans are done updating!
Time to start:  2s
Setting up Tribes...
Ark Query Server Up At http://:::8081

Settings

daemon_mode

This tells the module to load as a daemon and not as blocking process. Please note you will not see any errors/output with this enabled. Default: false

log_console

Enables logging to a file named console.txt. There will be a backup log called console.old.txt that will be created on launch. Default: false

sourcequery.host

Hostname/IP of your ARK server. Default: "your.ark.server"

sourcequery.port

Port your ARK serve uses Default: 27015

API Calls

All api calls (unless otherwise noted) must be encoded as application/json and be a valid JSON call.

For Example:

jQuery.post({url:"http://localhost:8081/listOnline",data:JSON.stringify({api_key:"YOUR_KEY"}),success:function(d){console.log(d);},contentType:"application/json"});

//outputs
{
	players: ["","first_player","second_player",""]
}

getServerData

POST: {api_key: YOURKEY}
RETURNS: {d:{mods:[],map:'',maxplayers:0}}

getChat

POST: {api_key: YOURKEY}
RETURNS: {chat:[]}

listOnline

POST: {api_key: YOURKEY}
RETURNS: {players:[]}

saveWorld

POST: {api_key: YOURKEY}
RETURNS: {text:'World Saved'}

destroyDinos

POST: {api_key: YOURKEY}
RETURNS: {text:'Wild Dinos Destroyed'}

command

POST: {api_key: YOURKEY, cmd: RCONCOMMAND}
RETURNS: {result:''}

broadcast

POST: {api_key: YOURKEY, msg: YOURMESSAGE}
RETURNS: {chat:'[ALL] YOURMESSAGE'}

listTribes/true

POST: {api_key: YOURKEY}
RETURNS: {d:[
{"Id":1234567890,
"Name":"",
"OwnerId":123456789,
"FileCreated":"2016-07-04 17:15:34",
"FileUpdated":"2016-07-09 15:10:33"}
]}

listTribes/false

POST: {api_key: YOURKEY}
RETURNS: {
	d:{
		1234567890:
			{"Id":1234567890,
			"Name":"",
			"OwnerId":123456789,
			"FileCreated":"2016-07-04 17:15:34",
			"FileUpdated":"2016-07-09 15:10:33"}
			}
		}

listPlayers

POST: {api_key: YOURKEY}
RETURNS: {d:[
{"Id":132456789,
"TribeId":123456789,
"Level":50,
"Engrams":1000,
"SteamId":"1234156748974",
"Admin":null,
"CharacterName":"",
"SteamName":"",
"ProfileUrl":"http://steamcommunity.com/id/",
"AvatarUrl":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/",
"CommunityBanned":0,
"VACBanned":0,
"NumberOfVACBans":0,
"NumberOfGameBans":0,
"DaysSinceLastBan":0,
"FileUpdated":"2016-07-09 15:10:33",
"FileCreated":"2016-07-04 17:15:34"}
]}

getPlayer

POST: {api_key: YOURKEY, id: STEAMID}
RETURNS: {d:
{"Id":132456789,
"TribeId":123456789,
"Level":50,
"Engrams":1000,
"SteamId":"1234156748974",
"Admin":null,
"CharacterName":"",
"SteamName":"",
"ProfileUrl":"http://steamcommunity.com/id/",
"AvatarUrl":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/",
"CommunityBanned":0,
"VACBanned":0,
"NumberOfVACBans":0,
"NumberOfGameBans":0,
"DaysSinceLastBan":0,
"FileUpdated":"2016-07-09 15:10:33",
"FileCreated":"2016-07-04 17:15:34"}
}