JSON (API Responses) - Kelvin-K-Cho/recruited GitHub Wiki
Jobs Index (GET /api/jobs)
{
jobs: {
"10": {
id: "10",
title: "Senior Front-End Engineer",
company_id: "2",
type: "Full-time",
location: "San Francisco, CA",
salary_estimate: "120000 - 190000",
summary: "Looking for a senior full stack engineering to join our team ..."
},
"3": {
id: "3",
title: "Sewage Construction",
company_id: "6",
type: "Part-time",
location: "San Francisco, CA",
salary_estimate: "$30 - $35 / hour",
summary: "Looking for ..."
},
"4": {
id: "4",
title: "Baby Sitter",
company_id: "9",
type: "Per Diem",
location: "San Francisco, CA",
salary_estimate: "$25 / hour",
summary: "Looking for a..."
}
},
companies: {
"2": {
id: "2",
name: "Google",
about: "...",
website_url: "google.com"
},
"6": {
id: "6",
name: "Plumbers United",
about: "...",
website_url: "plumbers.com"
},
"9": {
id: "9",
name: "Nannies 4 Hire",
about: "...",
website_url: "nannies4hire.com"
},
}
}
Job Show (GET api/jobs/:id)
{
job: {
id: "10",
title: "Senior Front-End Engineer",
company_id: "2",
type: "Full-time",
location: "San Francisco, CA",
salary_estimate: "120000 - 190000",
summary: "Looking for a senior full stack engineering to join our team ...",
experience: "Senior",
responsibilities: "Create UX/UI, Work with a team structure, etc",
qualifications: "Bachelor’s degree in Computer Science or equivalent, etc",
recruiter_id: "1",
},
company: {
id: "2",
name: "Google",
about: "...",
website_url: "google.com"
}
}
Recruiter Show (GET api/recruiters/:recruiter_id/resumes/:id)
Note: Im not sure how the url shoud look like. We could make the action calls one resume at a time, then when user click next, we make another action to call the next resume.
Or, we can make the action to call all matched resumes when the page first loads, then just render one at a time. Then url will look like this api/recruiters/:id
{
job: {
"10": {
id: "10",
title: "Senior Front-End Engineer",
company_id: "2",
type: "Full-time",
location: "San Francisco, CA",
salary_estimate: "120000 - 190000",
}
},
company: {
"2": {
id: "2",
name: "Google",
about: "...",
website_url: "google.com"
}
},
resume: {
"10": {
id: "10",
jobseeker_id: "4",
github_url: "",
linkedin_url: "",
matched: "",
role: "Software Developer",
headline: "I am fluent in many coding languages...",
education: "B.S Computer Science from UC Berkeley",
experience_id: [], //empty
project_id: ["7", "8"],
skills: "SQL, React, Redux, JavaScript..."
}
},
projects: {
"7": {
id: "7",
title: "Newgle",
resume_id: "2",
start_time: "May 2010",
end_time: "May 2010",
description: "School project about ..."
},
"8": {
id: "8",
title: "Recruited",
resume_id: "2",
start_time: "December 2011",
end_time: "February 2012",
description: "Side project designed for ..."
}
}