LinkedIn组API - 获取的多个组群的标志在一个单一的API请求 [英] LinkedIn Groups API - Getting group logo for multiple groups in a single API request
问题描述
使用 LinkedIn组API ,我展示组的列表用户是对LinkedIn成员。获得在一个单一的通话组列表是明确使用
<$p$p><$c$c>https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name),membership-state)?count=50&start=0&oauth2_access_token=' 。 $ ACCESSKEY;工作
现在,我想告诉旁边的组名组标志形象。然而,这将意味着n组,我所要做的n多的API调用,这会减慢页面加载(例如50组)。
借助文档状态,
您可以访问有关的一个或多个组的详细信息,如ID,名称设置,并从任何团体的资源路径的帖子。
块引用><$p$p><$c$c>https://api.linkedin.com/v1/groups/{group-id}:(id,name,short-description,description,relation-to-viewer:(membership-state,available-actions),posts,counts-by-category,is-open-to-non-members,category,website-url,locale,location:(country,postal-$c$c),allow-member-invites,site-group-url,small-logo-url,large-logo-url)
的我想提到的组ID标识的图像在一个单一的API调用。的
我试图
为以逗号分隔值
{组ID}
,但它给误差值无效{XXX1,XXX2,XXX3}在键{ID}
A
/
用于分隔值{组ID}
给误差未知领域{} XXX2在资源{}集团
请指导我是缺少在这里,如文档还显示一个或多个组,这是一个真正的用例。
解决方案
https://api.linkedin.com/v1/people/~/group-memberships:(组:(ID,姓名),...
块引用>您应该能够要求你直接要在此呼吁所有附加组字段,通过后
扩展字段列表组:(...
相应:https://api.linkedin.com/v1/people/~/group-memberships:(组:(ID,姓名,
小-LO走的URL,大徽标URL),...Using LinkedIn Groups API, I am showing a list of groups the user is a member of on LinkedIn. Getting the list of groups in a single call is clear using
https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name),membership-state)?count=50&start=0&oauth2_access_token=' . $accessKey;
Task
Now, I want to show the group logo image alongside the group name. However, this would mean for n groups, I have to do n more API calls, and this slows down the page load (e.g. for 50 groups).
The documentation states,
You can access details about one or more groups such as the ID, name, settings, and posts from any groups resource path.
https://api.linkedin.com/v1/groups/{group-id}:(id,name,short-description,description,relation-to-viewer:(membership-state,available-actions),posts,counts-by-category,is-open-to-non-members,category,website-url,locale,location:(country,postal-code),allow-member-invites,site-group-url,small-logo-url,large-logo-url)
I want to get the logo images of the mentioned group ids in a single API call.
What I have tried
A comma-separated-value for
{group-id}
, but it gives errorInvalid value {xxx1,xxx2,xxx3} in key {id}
A
/
separated value for{group-id}
gives errorUnknown field {xxx2} in resource {Group}
Kindly guide what I am missing here, as the documentation also suggests one or more groups and it is a genuine use-case.
解决方案
https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name),…
You should be able to ask for all additional group fields you want directly in this call, by extending the field list after
group:(…
accordingly:https://api.linkedin.com/v1/people/~/group-memberships:(group:(id,name, small-logo-url,large-logo-url),…
这篇关于LinkedIn组API - 获取的多个组群的标志在一个单一的API请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!