如何从TheResumator REST API获取json内容?

时间:2015-02-10 07:52:16

标签: json api rest

有史以来第一个API项目,我需要将客户的职位空缺从theresumator.com发布到他们的网站上。

这是我当前的代码(我之前曾从Instagrams API中获取),但它不起作用。我也无法解决任何错误或任何问题。任何帮助将不胜感激。

$.ajax({
type: "GET",
dataType: "json",
cache: false,     
url: "https://api.resumatorapi.com/v1/jobs?apikey=7nmvWJKR9IGxew12MD26OUPTYAFiUG5f",
success: function(jobs) {

c = 1;

output = '';
for (var i in jobs.data) {
output += jobs.data[i].id;
}
output += ''
$(".openjobs").append(output);
}

});

这是JSON查询的响应(成功)。

[
  {
    "id": "job_20150210072905_BT09T7UF8QA8J43A",
    "team_id": "",
    "title": "Operations Manager",
    "country_id": "United States",
    "city": "",
    "state": "",
    "zip": "",
    "department": "",
    "description": "
",
    "minimum_salary": "0",
    "maximum_salary": "0",
    "notes": "",
    "original_open_date": "2015-02-10",
    "type": "Full Time",
    "status": "Open",
    "send_to_job_boards": "Yes",
    "hiring_lead": "usr_20150208100756_PID8K5136NJLETZC",
    "board_code": "IRQCFf",
    "internal_code": "",
    "questionnaire": "0"
  },
  {
    "id": "job_20150210073126_2R9YTQHNTP83IWKK",
    "team_id": "",
    "title": "Social Media Strategist",
    "country_id": "United States",
    "city": "",
    "state": "",
    "zip": "",
    "department": "",
    "description": "
this is the description
",
    "minimum_salary": "0",
    "maximum_salary": "0",
    "notes": "",
    "original_open_date": "2015-02-10",
    "type": "Full Time",
    "status": "Open",
    "send_to_job_boards": "Yes",
    "hiring_lead": "usr_20150208100756_PID8K5136NJLETZC",
    "board_code": "ZbN8Sf",
    "internal_code": "",
    "questionnaire": "0"
  },
  {
    "id": "job_20150208100756_AKBJQONIHYRMT7ED",
    "team_id": "",
    "title": "Sample Job",
    "country_id": "United States",
    "city": "Pittsburgh",
    "state": "PA",
    "zip": "15212",
    "department": "",
    "description": "
You can enter a detailed, formatted description of your position.
We have a fully featured WYSIWYG editor which enables you to craft that perfectly formatted bulleted list. So go get that new candidate!",
    "minimum_salary": "0",
    "maximum_salary": "0",
    "notes": "",
    "original_open_date": "2015-02-08",
    "type": "Full Time",
    "status": "Open",
    "send_to_job_boards": "No answer",
    "hiring_lead": "usr_20150208100756_PID8K5136NJLETZC",
    "board_code": "guXAsx",
    "internal_code": "",
    "questionnaire": "0"
  }
]

0 个答案:

没有答案