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

api-growtopia

v0.6.9

Published

A Growtopia API to help you searching items, check item price, find item info, check server status & etc

Downloads

38

Readme

Api Growtopia

A Simple Growtopia API built using NodeJs

Instalation


$ npm install api-growtopia --save

Feature

Example

  • Find Item Info Example:

const gt = require("api-growtopia");

gt.itemInfo("angel").then(result => {
  console.log(result);

  /*
  Result Output:
  {
  name: 'Angel Wings',
  url: 'https://growtopia.wikia.com/wiki/Angel_Wings',
  desc: 'Better than a Halo, these will actually let you double jump!',
  properties: ['This item never drops any seeds', 'This item can be transmuted'],
  image: 'https://static.wikia.nocookie.net/growtopia/images/8/8f/ItemSprites.png/revision/latest/window-crop/width/32/x-offset/1504/y-offset/1664/window-width/32/window-height/32?fill=cb-20210901104457',
  color: ['#EFEFEF', '#FFFFFF'],
  rarity: undefined,
  recipes: {
    type: 'Valentine Loot',
    recipe: ['It is a possible drop from breaking either a  Heartstone,  Golden Booty Chest, or a  Super Golden Booty Chest or from a  Well of Love every five  Golden Booty Chests filled.']
  },
  splice: undefined,
  info: "The Angel Wings is an unsplicable back item which was added as part of Valentine's Week 2013.",
  type: 'Clothes'
}
  */
}).catch(err => {
  //Handle error 
  console.error(err);
});
  • Search Item Example:

const gt = require("api-growtopia");

gt.searchItem("angel").then(result => {
  console.log(result);

  /*
  Result Output: 
  [{
  name: "Angel of Mercy's Wings",
  url: "https://growtopia.fandom.com/wiki/Angel_of_Mercy's_Wings"
  },
  {
    name: 'Angel Wings',
    url: 'https://growtopia.fandom.com/wiki/Angel_Wings'
  },
  {
    name: 'Angelic Counting Cloud',
    url: 'https://growtopia.fandom.com/wiki/Angelic_Counting_Cloud'
  }, {
    name: 'Angelic Heart Cloud',
    url: 'https://growtopia.fandom.com/wiki/Angelic_Heart_Cloud'
  },
  {
    name: 'Golden Angel Wings',
    url: 'https://growtopia.fandom.com/wiki/Golden_Angel_Wings'
  }]
  */

}).catch(err => {
  //Handle error 
  console.error(err);
});
  • Checking Server Status Example:

const gt = require("api-growtopia");

gt.server().then(result => {
  console.log(result);

  /*
  Result Output: 
  {
  date: 'Sep 28th',
  time: '08:14:23',
  online: 73624,
  wotdName: 'TEMPLERUINS',
  wotdUrl: 'https://i.ibb.co/sWmWVWJ/Panji-Rendering-TEMPLERUINS.png'
  }
  */
  
}).catch(err => {
//Handle error
  console.error(err);
});
  • Render World Example:

const gt = require("api-growtopia");

gt.renderWorld("buybait").then(result => {
  console.log(result);

  /*
  Output if success:
  {
  status: 'success',
  expired: '3600 Second',
  info: 'This feature only works if the World has been Rendered Before',
  url: 'https://i.ibb.co/17dwPL9/Panji-Rendering-BUYBAIT.png'
  }
  
  Output if fail:
  {
  status: 'failed',
  expired: null,
  info: 'This feature only works if the World has been Rendered Before',
  url: 'https://i.ibb.co/wRS9h9t/errors.jpg'
  }
  */

}).catch(err => {
  //Handle error 
  console.error(err);
});
  • Check Daily Quest Example:

const gt = require("api-growtopia");

gt.dailyQuest().then(res => {
  console.log(res);
  
/* Example Output:
{
  item1: {
    name: 'Picket Fence Seed',
    amount: '200',
    price: '200/2 WLs',
    rate: '+33.3%'
  },
  item2: {
    name: 'Steam Piston Seed',
    amount: '23',
    price: '13/1 WL',
    rate: '+13.3%'
  },
  totalPrice: '3 WLs'
}
*/

}).catch(err => {
  //Handle error 
  console.error(err);
});
  • Check Item Price Example:

const gt = require("api-growtopia");

gt.checkPrice("angel").then(res => {
  console.log(res);

/* Example Output:
{
  name: 'Angel Wings',
  price: '21 WLs',
  rate: '+14.3%',
  priceStatus: 'stable',
  demandStatus: 'stable',
  source: 'buyangel',
  lastEdit: '1mon ago',
  editor: 'HeaLeave',
  warning: 'The Price May Be Outdated!, Please double check in-game to make sure'
}
*/

}).catch(err => {
  //Handle error 
  console.error(err);
});
  • Find Item Image

const gt = require("api-growtopia");

gt.itemImage("angel").then(result => {
  console.log(result);
  
  /* Example Output:
  {
    itemName: 'Angel Wings',
    imgUrl: 'https://static.wikia.nocookie.net/growtopia/images/8/8f/ItemSprites.png/revision/latest/window-crop/width/32/x-offset/512/y-offset/1280/window-width/32/window-height/32?fill=cb-20210923151939'
  }
  */
  
}).catch(error => {
  console.error(error);
});

Info

  • Checking server status maybe will not work if the server is maintenance
  • Rendering World won't work if the World hasn't been rendered before
  • Check Price & Daily Quest is still Beta
  • You can also using Async Function if you don't want to use Method then()

Thanks To