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

scriptfodder.js

v1.0.3

Published

A NodeJS implimentation of the GmodStore (ScriptFodder) API

Downloads

7

Readme

scriptfodder.js

A NodeJS implimentation of the ScriptFodder API I know ScriptFodder changed its name to GmodStore, but I'm still calling this scriptfodder.js because the actual GmodStore update isn't out yet.

Do this first!

  1. Install with npm install scriptfodder.js
  2. Navigate to lib/conf.js
  3. Replace the example ScriptFodder API Key with your own
  4. Use this thing with const SF = require("scriptfodder.js")

What can this thing do?

Most of the things the ScriptFodder API has to offer. If the callbacks have a data argument, they will either be an object or array depending on what function you're using.

NOTE:

These functions currently throw syncronous errors if any arguments are invalid.

Script Functions!

  • SF.ScriptListSelf(callback(error,data)) - Lists all the scripts from whoever's API key you're using
[
  {
    'id': '21',
    'status': '1',
    'name': 'VCMod',
    'views': '1390',
    'banner': 'bannerhash',
    'primary_owner': {
              'steamid': '76561190000000',
              'name": '',
      'avatar': ''
    },
    'is_primary_owner': '1'
  },
  ...
]
  • SF.ScriptList(Steam64ID,callback(error,data)) - Lists publically available scripts
[
  {
    'id': '21',
    'status': '1',
    'name': 'VCMod',
    'views': '1390',
    'banner': 'bannerhash',
    'primary_owner': {
              'steamid': '76561190000000',
              'name": '',
      'avatar': ''
    },
    'is_primary_owner': '1'
  },
  ...
]
  • SF.ScriptInfo(ScriptID,callback(error,data)) - Lists publically available scripts
{
  'id': 21,
  'name': 'VCMod',
  'description': '',
  'addedDate': '',
  'updatedDate': '',
  'price': '',
  'price_discount': '',
  'status': '',
  'views': '',
  'banner': '',
  'author_steam64': '',
  'author_name': '',
  'author_avatar': '',
  'additional_authors': [
    {
      'steam64': '',
      'name': '',
      'avatar': ''
    }
  ],
  'support_team': [
    {
      'steam64': '',
      'name': '',
      'avatar': ''
    }
  ]
}
  • SF.ScriptPurchases(ScriptID,callback(error,data)) - Lists everyone who bought a script
[
  {
    "user_id": "7656119xxxxxxxx",
    "user_name": "Marcuz",
    "purchase_time": "000000000",
    "purchase_revoked": "0",
    "transaction_id": "ABC",
    "price": "0"
  }
]
  • SF.ScriptReviews(ScriptID,callback(error,data)) - Lists all the reviews a script has gotten
[
  {
    "user_id": "7656119xxxxxxxx",
    "user_name": "Marcuz",
    "purchase_time": "000000000",
    "purchase_revoked": "0",
    "transaction_id": "ABC",
    "price": "0"
  }
]
  • SF.ScriptVersions(ScriptID,callback(error,data)) - Lists all the different versions a script has
[
  {
    'id': 1,
    'title': '1.0.0',
    'description': 'version changes',
    'time': '1451620852'
  }
]
  • SF.ScriptAddVersion(ScriptID,Version,zipFileName,ChangeLog,callback(error)) - Uploads a new .zip file and adds a new version
  • SF.ScriptEditVersion(ScriptID,VersionID,Version,zipFileName,ChangeLog,callback(error)) - Edits the specified version. (VersionID is from the SF.ScriptVersions function) zipFileName can be null if you do not want to change the file.
  • SF.ScriptDeleteVersion(ScriptID,VersionID,callback(error)) - Deletes the specified version. (VersionID is from the SF.ScriptVersions function)
  • SF.ScriptGift(ScriptID,Steam64ID,callback(error)) - Gift a script to the specified user
  • SF.ScriptRevoke(ScriptID,Steam64ID,callback(error)) - Revokes a script from the specified user

###Coupon Functions!

  • SF.CouponsList(ScriptID,callback(error,data)) - Lists all the coupons a script has
[
  {
    'code': '',
    'percent': '',
    'max_uses': '',
    'expires_at': '1451620852',
    'amount_used': ''
  }
]
  • SF.CouponAdd(ScriptID,CouponName,PercentOff,MaxUses,ExpiryDate,callback(error)) - Creates a new coupon. ExpiryDate must be a Date object. PercentOff must be a value 1-99
  • SF.CouponEdit(ScriptID,CouponID,CouponName,PercentOff,MaxUses,ExpiryDate,callback(error)) - Edits an existing coupon (CouponID is from the SF.CouponsList function)
  • SF.CouponRemove(ScriptID,CouponID,callback(error)) - Removes a coupon (CouponID is from the SF.CouponsList function)

###User Functions!

  • Coming soon-ish, maybe!