Created
June 20, 2020 05:24
-
-
Save ionutale/e6c947f7d8afc47f958e7a78284ad5fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const clashApi = require('clash-of-clans-api') | |
let client = clashApi({ | |
token: COC_API_TOKEN // Optional, can also use COC_API_TOKEN env variable | |
}); | |
async function showPlayerInfo(tag) { | |
try { | |
const playerInfo = await client.playerByTag(tag) | |
console.log("this is the player info:", playerInfo) | |
} catch (error) { | |
console.error(error) | |
} | |
} | |
showPlayerInfo('#GQJC0UCG') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment