Returns a list of companies.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');
// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });
async function run() {
// Load the profile
const profile = await sdk.getProfile('recruitment/list-companies@1.0.0');
// Use the profile
const result = await profile
.getUseCase('ListCompanies')
.perform({}, {
provider: 'mock'
});
// Handle the result
try {
const data = result.unwrap();
console.log(data);
} catch (error) {
console.error(error);
}
}
run();
{
"companies": [
{
"id": "1",
"name": "Superface",
"description": "Superface is technology startup, based in Czech Republic, which connects applications through APIs.",
"createdAt": "2021-01-01T12:00:00.000Z",
"updatedAt": "2022-10-01T14:00:00.000Z"
}
]
}