Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

tim-1108/gd-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gd-parser

A NPM package for fetching information from Geometry Dash's servers

npm package

Version Downloads


gd-parser uses the default API for Geometry Dash, which looks something like this...

However, gd-parser returns you this mess in beautiful JSON, just look at it:

{
  "id": 10565740,
  "name": "Bloodbath",
  "description": "<description here>",
  "playerID": 503085,
  "accountID": 37415,
  "author": "Riot",
  "downloads": 43482511,
  "difficulty": "Extreme Demon",
  "likes": 2347553,
  "disliked": false,
  "stars": 10,
  "diamonds": 12,
  "orbs": 500,
  "version": 3,
  "length": "Long",
  "featured": true,
  "epic": false,
  "gameVersion": "2.1",
  "copiedID": 7679228,
  "twoPlayer": false,
  "large": false,
  "officalSong": 0,
  "customSong": 467339,
  "coins": 0,
  "verifiedCoins": false,
  "starsRequested": 0,
  "ldm": false,
  "objects": 24746,
  "password": null,
  "songName": "At the Speed of Light",
  "songAuthor": "Dimrain47",
  "songLink": "http://geometrydashcontent.com/songs/467339.mp3",
  "songSize": "9.56MB",
  "songID": 467339,
  "difficultyFace": "demon-extreme-featured",
  "extraData": null,
  "levelString": null
}

Usage

To use gd-parser, install it using npm i gd-parser and then import it using require("gd-parser") or import gd-parser from "gd-parser".

Interacting with the API is also incredibly easy:
For example, fetching Search Data works like this:

const { LevelSearchRequest } = require("gd-parser");
new LevelSearchRequest({type:"MOST_LIKED"}, (json) => { // callback with data
    console.log(json);
});

Every request consists of a JSON object with the request data, and a callback with the finished results in clean and beautiful JSON.

This package supports Type Declarations in your IDE to help you on your track.

More documentation on individual requests can be found in docs.

Thanks

A special thanks to the contributors of GDDocs, a tool for viewing all Geometry Dash API endpoints and their documentation on those endpoints.

About

A NPM package for fetching information from Geometry Dash's servers

Resources

Stars

Watchers

Forks