# growtopia-api

> An unofficial Growtopia API to gather item informations, name matches, sprites and server status.

Latest version **1.3.2** (published 2022-07-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install growtopia-api
pnpm add growtopia-api
yarn add growtopia-api
bun add growtopia-api
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.2 |
| Published | 2022-07-15 |
| First published | 2021-06-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 16.9 KB |
| Known vulnerabilities | 0 (+26 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Growtopian-Bot |
| Maintainers | imooncut |
| Keywords | growtopia, growtopia api, growapi |

## Links

- npm: https://www.npmjs.com/package/growtopia-api
- Repository: https://github.com/Growtopian-Bot/growtopia-api
- Homepage: https://github.com/Growtopian-Bot/growtopia-api#readme
- Issues: https://github.com/Growtopian-Bot/growtopia-api/issues
- npm.io page: https://npm.io/package/growtopia-api

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) 0.27.2
- [cheerio](https://npm.io/package/cheerio.md) 1.0.0-rc.12
- [moment-timezone](https://npm.io/package/moment-timezone.md) 0.5.34

## Recent versions

- 1.3.2 (latest) — 2022-07-15
- 1.3.1 — 2022-07-15
- 1.3.0 — 2022-03-29
- 1.2.9 — 2022-03-29
- 1.2.8 — 2022-02-20
- 1.2.6 — 2021-10-17
- 1.2.5 — 2021-07-03
- 1.2.3 — 2021-07-01
- 1.2.0 — 2021-06-30
- 1.0.1 — 2021-06-29

## README

# Growtopia API

[![NPM](https://nodei.co/npm/growtopia-api.png)](https://nodei.co/npm/growtopia-api/)

[![npm version](https://badge.fury.io/js/growtopia-api.svg)](https://badge.fury.io/js/growtopia-api) [![GitHub license](https://img.shields.io/github/license/Growtopian-Bot/growtopia-api)](https://github.com/Growtopian-Bot/growtopia-api/blob/master/LICENSE) [![Build Status](https://img.shields.io/badge/build-passing-green)](https://github.com/Growtopian-Bot/growtopia-api) ![npm](https://img.shields.io/npm/dt/growtopia-api)

> Unofficial Growtopia API for searching item information, server status and gathering item sprites...

## :cloud: Installation

```sh
npm install growtopia-api
```

## :clipboard: Example

- **Searching Item Information**

```js
const { itemInfo } = require("growtopia-api");

itemInfo("angel").then(console.log);
/*
    Example output:

    {
      Name: "Angel Wings",
      URL: "https://growtopia.wikia.com/wiki/Angel_Wings",
      Description: "Better than a Halo, these will actually let you double jump!",
      Properties: [ "This item never drops any seeds", "This item can be transmuted" ],
      Sprite: "https://static.wikia.nocookie.net/growtopia/images/8/8f/ItemSprites.png/revision/latest/window-crop/width/32/x-offset/704/y-offset/1952/window-width/32/window-height/32?fill=cb-20210701082040",
      Color: [ "#EFEFEF", "#FFFFFF" ],
      Rarity: undefined,
      Recipe: {
        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",
      matches: [
        "Angel Wings",
        "Angel of Mercy"s Wings",
        "Angelic Counting Cloud",
        "Angelic Heart Cloud"
      ]
    }

    */
```

- **Searching item names matching with keyword**

```js
const { searchItem } = require("growtopia-api");

searchItem("angel").then(console.log);

/*
    Returns an Array in following structure:
    e.g:

    [
      {
        itemName: "Angelic Heart Cloud",
        url: "https://growtopia.fandom.com/wiki/Angelic_Heart_Cloud"
      },
      {
        itemName: "Golden Angel Wings",
        url: "https://growtopia.fandom.com/wiki/Golden_Angel_Wings"
      }
    ]

     */
```

- **Get Item Sprite**

```js
const { getImage } = require("growtopia-api");

getImage("angel").then(console.log);

/*
    Returns an Array in following structure:
    e.g:

    https://static.wikia.nocookie.net/growtopia/images/8/8f/ItemSprites.png/revision/latest/window-crop/width/32/x-offset/992/y-offset/1920/window-width/32/window-height/32?fill=cb-20201001200938

     */
```

- **Server Status**

```js
const { serverStatus } = require("growtopia-api");

serverStatus().then(console.log);

/*
    Example output (returns Object):

    {
        date: "Oct 18",
        time: " 10:05:36",
        playerCount: 48966,
        wotdName: "HETERODOXY",
        wotdURL: "https://www.growtopiagame.com/worlds/heterodoxy.png"
    }

    */
```

---
_Source: https://npm.io/package/growtopia-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
