ic-api

1.2.1 • Public • Published

ic-api

ic-api is a wrapper to connect you trough Intersection Controller game datas. You can get/search for users, trending maps and other things from the game.

Example

Before you get into these example, remember this package is using much asynchronomous function

Search a user

const ic = require("ic-api")
ic.user.search("ShadowTree").then(x => console.log(x)) //will return array of Users named ShadowTree

Search a map

const ic = require("ic-api")
ic.map.search(1, "Diverging Diamond").then(x => console.log(x)) //will return array of Maps named Diverging Diamond in simulation mode

Show map's comments

So you have to search a map, or anything from Map class. I recommend to use asynchronomous function than spamming ".then" callbacks.

const ic = require("ic-api")
async function getComment() {
    const map = await ic.map.search(1, "Diverging Diamond") //search map
    const comments = await map.comments(5) //list a comment, they will come out in array
    return console.log(coments[4]) //choose one of the array, or do map or whatever you want
}

External links

NPM

Github

Python version (Made by Feeeeddmmmeee)

Discord server

Package Sidebar

Install

npm i ic-api

Weekly Downloads

6

Version

1.2.1

License

ISC

Unpacked Size

18.1 kB

Total Files

15

Last publish

Collaborators

  • rnggadosen