Neurotoxin Powered Marketing
Wondering what’s next for npm?Check out our public roadmap! »

factorio-mods

0.0.1 • Public • Published

factorio-mods

NPM

What is this?*

Factorio-mods is an npm package to fetch user and mod information from mods.factorio.com

Install

npm install --save factorio-mods

Usage

var Factorio = require('factorio-mods');

Mod Information


The main reason I made this was for the download stats.

Factorio.mod("bobassembly").then(function(info){
    console.log( JSON.stringify(info, null, 2) );
}, console.warn);

This will return the following information:

{
  "id": "bobassembly",
  "downloads": 452228,
  "updated": "a day ago",
  "versions": "0.13 - 0.17",
  "title": "Bob's Assembling machines ",
  "author": {
    "name": "Bobingabout",
    "link": "/user/Bobingabout",
    "id": "Bobingabout"
  },
  "license": "https://forums.factorio.com/viewtopic.php?f=51&t=28573",
  "summary": "Adds assembling machines 4, 5 and 6. And other machine higher tiers too.",
  "description": " ..long description.. "
}

User Information

Not much user information is available.

Factorio.user('Bobingabout').then(function(info){
    console.log( JSON.stringify(info, null, 2) );
}, console.warn);

Will return the following information:

{
  "id": "Bobingabout",
  "avatar": "https://www.gravatar.com/avatar/cfd17b18221b7ba34f097081d55c3a5e?s=192",
  "name": "Bobingabout",
  "downloads": 7373337,
  "mods": [
    {
      "id": "bobassembly",
      "image": "https://mods-data.factorio.com/assets/7c17c0832f43a643145cb4bc3ea7e1ba2625c493.thumb.png",
      "title": "Bob's Assembling machines",
      "link": "/mod/bobassembly",
      "summary": "Adds assembling machines 4, 5 and 6. And other machine higher tiers too.",
      "downloads": 452228,
      "versions": "0.13 - 0.17",
      "updated": "a day ago"
    }
  ]
}

If you have any bugs or issues please report them here

Install

npm i factorio-mods

DownloadsWeekly Downloads

1

Version

0.0.1

License

ISC

Unpacked Size

7.16 kB

Total Files

4

Last publish

Collaborators

  • avatar