2017-06-18 118 views

回答

1

你看过官方文档吗?在文档的底部,您可以找到一些用例,您可以使用它们来启动您真正想要使用Camel LinkedIn组件和API实现的内容。
http://camel.apache.org/linkedin.html
https://github.com/apache/camel/blob/camel-2.19.1/components/camel-linkedin/camel-linkedin-component/src/main/docs/linkedin-component.adoc

以下途径获取用户的个人资料:

from("direct:foo") 
    .to("linkedin://people/person"); 

下面的路由调查用户的连接,每隔30秒:

from("linkedin://people/connections?consumer.timeUnit=SECONDS&consumer.delay=30") 
    .to("bean:foo"); 

下路由使用与制作人动态标题选项。为PERSONID头有LinkedIn的个人ID,所以其分配给CamelLinkedIn.person_id标题如下:

from("direct:foo") 
    .setHeader("CamelLinkedIn.person_id", header("personId")) 
    .to("linkedin://people/connectionsById") 
    .to("bean://bar"); 

LinkedIn的API本身很广,因此很难说,需要什么样的具体措施来实现你想用它做。