MLH-Fellowship / orientation-project-python-24.SPR.A

Orientation Project (Python for 24.SPR.A)
1 stars 3 forks source link

Implemented API route to return a specific skill #30

Closed nfallah closed 7 months ago

nfallah commented 7 months ago

Description

Updated the /resume/skill endpoint for GET requests to accept index values and return a single experience.

Issue

This request closes issue #14.

Testing

An example GET request for /resume/skill?index=value will return a valid skill in JSON form if value is numeric and within bounds. There are two examples below.

A GET request for /resume/skill?index=0 will succeed:

{
  "logo":"example-logo.png",
  "name":"Python",
  "proficiency":"1-2 Years"
}

A GET request for /resume/skill?index=1 will fail and return a generic error:

{
  "error":"skill not found"
}