Add Google Talent Solution (Jobs) Samples for node.js
Hi,
Could we add some sample's for Google Talent solution for jobs? There is one request for listing companies which is great, but I am really banging my head on trying to figure out how to POST data.
V2 looked liked
service.companies.create({ resource: _data }, (error, result) => {
V3 I cannot figure out ... reading here https://github.com/google/google-api-nodejs-client#specifying-request-body it sounds like it should look like something like ?
const data = {
parent: `projects/${process.env.GOOGLE_CLOUD_PROJECT}`,
requestBody: {
externalId: 'c123',
displayName: 'CompanyName'
}
};
service.projects.companies.create(data, (error, result) => {
The below request object worked after some trial and error, agree some further NodeJS examples would be useful
const data = {
requestBody : {
company: {
"displayName": employer.name,
"externalId": employer.id}
},
parent: `projects/${projectId}`
}
this is what worked for me, parent needs to be same level as requestBody
const request = {
parent: `projects/${projectId}`,
requestBody: {
company: {
'displayName': 'ABC Co',
'externalId': '12348'
}
}
}
@JustinBeckwith I think this issue is a dup of https://github.com/googleapis/google-api-nodejs-client/issues/1296.
👍