newgrounds.js
TypeScript icon, indicating that this package has built-in type declarations

4.0.0-beta.1 • Public • Published

ngjsbanner

Newgrounds.js is the definitive library for connecting your game to the Newgrounds.io API.

Features 🎁

  • 🚀 Intuitive usage
  • 📖 Full documented with guides and examples.
  • 🌟 You can use the wrapper functions unlockMedal or make your own requests with NewgroundsClient.call
  • 📦 Async/Await by default
  • 📜 Full Typescript support
  • 🍜 ESM and CommonJS support

Installation 📦

You can install the package using your favorite node package manager.

npm i newgrounds.js

Also can use the CDN to include the library in your project.

<script src="https://cdn.jsdelivr.net/npm/newgrounds.js/dist/newgrounds.js"></script>

Example 📝

import ng from "newgrounds.js";

// Connect to your project
await ng.connect("533327:b6GaR8Eb", "ivuwzsfewkqñwacRQ==");

// Request user login
await ng.login();

// Start using NG.io
await ng.unlockMedal(129521);
await ng.postScore(12052012, 50);

Credits 🙏

Package Sidebar

Install

npm i newgrounds.js

Weekly Downloads

6

Version

4.0.0-beta.1

License

MIT

Unpacked Size

1.28 MB

Total Files

12

Last publish

Collaborators

  • lajbel