Hi @PBaxter ,
I went through the github of the NodeJS API, but I can not discover a .ts file for the lists. The discovery folder is my go to place to check for all the available functions. But lists simply seem to be missing NodeJS API.
If you are familiar with Axios, you should be able to use that instead. Here is an example:
const axios = require('axios');
const listData = await axios({
method: 'get',
url: `https://api.hubapi.com/contacts/v1/lists/1`,
headers: {
'Authorization': `Bearer ${process.env.authtoken}`,
'Content-Type': 'application/json'
}
}).then(async (response) => {
console.log(response.data)
return response.data
}).catch((error) => {
console.log(`Error while getting list data: ${error.response.data.message}`)
return null
})