I want to use the API to look up how many build minutes I have used on my account. I wrote this code:
const NetlifyAPI = require('netlify');
async function main() {
const netlifyClient = new NetlifyAPI(process.env.NETLIFY_AUTH_TOKEN);
let account = await netlifyClient.getAccount({account_id: process.env.NETLIFY_ACCOUNT_ID});
console.log(`Account slug: ${account.slug}`);
console.log(`Build minutes used: ${account.capabilities.build_minutes.used} of ${account.capabilities.build_minutes.included}`);
}
main();
This is the output:
Account slug: williamjacksn
Build minutes used: 0 of 300
But the website tells a different story:
Why does the data from the API not match the website?