提取你的LinkedIn个人资料并允许你在鹈鹕的页面中使用这些信息
pelican-linkedin-profile的Python项目详细描述
提取LinkedIn个人资料并允许在鹈鹕页面中使用他的信息
安装
要安装鹈鹕LinkedIn,只需从pypi安装即可:
$ pip install pelican-linkedin-profile
配置
在pelicanconf.py中启用插件
PLUGINS=[# ...'pelican-linkedin-profile',# ...]
添加包含LinkedIn API密钥的必需设置。
LINKEDIN_USER_TOKEN='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'LINKEDIN_USER_SECRET='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'LINKEDIN_CONSUMER_KEY='XXXXXXXXXXXXXX'LINKEDIN_CONSUMER_SECRET='XXXXXXXXXXXXXXXX'LINKEDIN_RETURN_URL='http://example.com/'
可用数据
formattedName: | The member’s name, formatted based on language. |
---|---|
headline: | The member’s headline. |
summary: | A long-form text area describing the member’s professional profile. |
pictureUrl: | A URL to the member’s formatted profile picture, if one has been provided. |
emailAddress: | The LinkedIn member’s primary email address. |
primaryTwitterAccount: | |
The primary Twitter account associated with the member. | |
publicProfileUrl: | |
The URL to the member’s public profile on LinkedIn. | |
phoneNumbers: | A list of phone number objects containing those fields : phoneNumber, phoneType (home, work or mobile.) |
skills: | A list of skill’s name |
languages: | A list of language’s name |
educations: | A list of eduction objects containing those fields : startDate, endDate, degree, schoolName, fieldOfStudy |
positions: | A list of position objects containing those fields : startDate, endDate, title, company, summary, isCurrent. A company object contains those fields : industry, size, type, name |
用法
在模板中,您将可以访问LinkedIn_配置文件变量,如下所示。
<div><h2>{{ linkedin_profile.formattedName }}</h2><p>{{ linkedin_profile.headline }}</p></div>
许可证
GPLv2许可证。