1.4.1 • Published 6 years ago

@b1tt/ng-fetch v1.4.1

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

npm (scoped) npm bundle size (scoped) GitHub last commit

ng-fetch

ng-fetch is a lightweight and fast Newgrounds wrapper.

You can use it by writing const ng = require("@b1tt/ng-fetch"); // Const name can be changed preferably.

With ng-fetch, you can:

  • Songs
    • Fetch songs
    • Search songs
  • Fetch users
  • Browse the frontpage
  • Art
    • Fetch art
    • Search art
  • Portal
    • Games
      • Search games
    • Movies
      • Search movies
    • Fetch games / movies

And even more on the way! All that is returned in a nice JSON object.

Song fetching

// const song = ng.song.fetch(id)
const song = ng.song.fetch(1); // Fetches songs with tag / name "b1tt"
  .then (data => console.log(data)); // and logs it into the console!
// It has to be promise so it won't return { Promise <Pending> }.

// Head over to /commands/song/fetch.js to see what it returns!

User fetching

// const user = ng.user.fetch(username)
const user = ng.user.fetch("bitt0"); // Fetches my profile :^)
  .then (data => console.log(data)); // and logs it into the console!

// Head over to /commands/users/fetch.js to see what it returns!

If you want to see more commands and what they return - go to /commands/

1.4.1

6 years ago

0.0.2

6 years ago

1.3.1

6 years ago

0.1.2-4

6 years ago

0.1.2-3

6 years ago

0.1.2-2

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.2-1

6 years ago

0.0.1

6 years ago