-6
我必須通過LinkedIn API數據訪問來實現Apache Camel和Spring。您能否告訴我如何使用Camel和Spring訪問LinkedIn API?謝謝阿帕奇駱駝與LinkedIn Api
我必須通過LinkedIn API數據訪問來實現Apache Camel和Spring。您能否告訴我如何使用Camel和Spring訪問LinkedIn API?謝謝阿帕奇駱駝與LinkedIn Api
你看過官方文檔嗎?在文檔的底部,您可以找到一些用例,您可以使用它們來啓動您真正想要使用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本身很廣,因此很難說,需要什麼樣的具體措施來實現你想用它做。