gpt4 book ai didi

javascript - Linkedin Api 如何通过人员搜索获取群组详细信息

转载 作者:搜寻专家 更新时间:2023-11-01 04:09:26 24 4
gpt4 key购买 nike

我需要获取用户的组,

IN.API.Raw("/people-search:(people:(id,first-name,last-name,email-address,industry,summary,num-connections,headline,group-memberships:(group:(id)))?first-name=ramesh&last-name=kotha&count="+25).result(function(result, metadata) {
//got the details here
}

当我使用 result.values[0].person.groupMembership.group.id 时,它表示未定义。如何获取用户的组。

最佳答案

嵌套构建对象的请求是可行的:

IN.API.Raw("/people-search:(people:(id,first-name,last-name,email-address,industry,summary‌,group-memberships,num-connections,headline))?first-name=ramesh&last‌​-name=kotha&count="+25)
.result(function(result, metadata) {
console.log(result);

for(person in result.people.values){
console.log(person);
IN.API.Raw()
.url("/people/" + result.people.values[person].id + "/group-memberships:(group:(id,name),membership-state)")

.result(function(result, metadata){

console.log(result);
});

}


})

关于javascript - Linkedin Api 如何通过人员搜索获取群组详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19996695/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com