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.
Before you get into these example, remember this package is using much asynchronomous function
const ic = require("ic-api")
ic.user.search("ShadowTree").then(x => console.log(x)) //will return array of Users named ShadowTree
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
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
}
Python version (Made by Feeeeddmmmeee)