如何获得像Linkedin这样的技能列表?
How to get list of skills like Linkedin?
我正在开发一个 android 应用程序,人们会在其中分享他们的技能之类的东西,但现在我想要一个技能列表,以便用户可以轻松地从建议中搜索和选择技能AutoCompleteTextView
喜欢 linkedin.
但是对于 autoCompleteTextView,我们需要一个字符串数组来显示在 autoComplete 列表中。但是我找不到任何 api 的东西。而且我也无法在 stings.xml 中的应用程序中创建字符串数组,因为它会将 apk 的大小增加到 5 到 6 MB。
我需要一个解决方案。
我不知道有什么流行的 API 技能列表,但你可以试试 this Open API or this one。第一个很旧,我认为它没有更新和格式正确(技能名称)。第二个更像是一个分析器,但也许他们也提供 API 技能。另外,还有一个叫“EMSI Skills API”的网站,虽然我不知道它是否真的提供技能API。
只是在上面的答案上添加更多内容,您可以探索 EMSI 技能 API 以获得技能的主列表(大约 30k)和所有你需要做的是注册并获得必要的访问密钥。下面是从 EMSI SKILLS API
获取技能数据的示例 Python 代码
import requests
import json
import numpy as np
from pandas.io.json import json_normalize
auth_endpoint = "https://auth.emsicloud.com/connect/token" # auth endpoint
client_id = "ajhdjhaDJqwjjskfjksdjfklj" # replace 'your_client_id' with your client id from your api invite email
client_secret = "asjsajf" # replace 'your_client_secret' with your client secret from your api invite email
scope = "emsi_open" # ok to leave as is, this is the scope we will used
payload = "client_id=" + client_id + "&client_secret=" + client_secret + "&grant_type=client_credentials&scope=" + scope # set credentials and scope
headers = {'content-type': 'application/x-www-form-urlencoded'} # headers for the response
access_token = json.loads((requests.request("POST", auth_endpoint, data=payload, headers=headers)).text)['access_token'] # grabs request's text and loads as JSON, then pulls the access token from that
def extract_skills_list():
all_skills_endpoint = "https://emsiservices.com/skills/versions/latest/skills" # List of all skills endpoint
auth = "Authorization: Bearer " + access_token # Auth string including access token from above
headers = {'authorization': auth} # headers
response = requests.request("GET", all_skills_endpoint, headers=headers) # response
response = response.json()['data'] # the data
all_skills_df = pd.DataFrame(json_normalize(response)) # Where response is a JSON object drilled down to the level of 'data' key
all_skills_df.to_excel('all_skills_emsi.xlsx')
extract_skills_list()
我正在开发一个 android 应用程序,人们会在其中分享他们的技能之类的东西,但现在我想要一个技能列表,以便用户可以轻松地从建议中搜索和选择技能AutoCompleteTextView
喜欢 linkedin.
但是对于 autoCompleteTextView,我们需要一个字符串数组来显示在 autoComplete 列表中。但是我找不到任何 api 的东西。而且我也无法在 stings.xml 中的应用程序中创建字符串数组,因为它会将 apk 的大小增加到 5 到 6 MB。
我需要一个解决方案。
我不知道有什么流行的 API 技能列表,但你可以试试 this Open API or this one。第一个很旧,我认为它没有更新和格式正确(技能名称)。第二个更像是一个分析器,但也许他们也提供 API 技能。另外,还有一个叫“EMSI Skills API”的网站,虽然我不知道它是否真的提供技能API。
只是在上面的答案上添加更多内容,您可以探索 EMSI 技能 API 以获得技能的主列表(大约 30k)和所有你需要做的是注册并获得必要的访问密钥。下面是从 EMSI SKILLS API
获取技能数据的示例 Python 代码import requests
import json
import numpy as np
from pandas.io.json import json_normalize
auth_endpoint = "https://auth.emsicloud.com/connect/token" # auth endpoint
client_id = "ajhdjhaDJqwjjskfjksdjfklj" # replace 'your_client_id' with your client id from your api invite email
client_secret = "asjsajf" # replace 'your_client_secret' with your client secret from your api invite email
scope = "emsi_open" # ok to leave as is, this is the scope we will used
payload = "client_id=" + client_id + "&client_secret=" + client_secret + "&grant_type=client_credentials&scope=" + scope # set credentials and scope
headers = {'content-type': 'application/x-www-form-urlencoded'} # headers for the response
access_token = json.loads((requests.request("POST", auth_endpoint, data=payload, headers=headers)).text)['access_token'] # grabs request's text and loads as JSON, then pulls the access token from that
def extract_skills_list():
all_skills_endpoint = "https://emsiservices.com/skills/versions/latest/skills" # List of all skills endpoint
auth = "Authorization: Bearer " + access_token # Auth string including access token from above
headers = {'authorization': auth} # headers
response = requests.request("GET", all_skills_endpoint, headers=headers) # response
response = response.json()['data'] # the data
all_skills_df = pd.DataFrame(json_normalize(response)) # Where response is a JSON object drilled down to the level of 'data' key
all_skills_df.to_excel('all_skills_emsi.xlsx')
extract_skills_list()