From 4dd336b2c08a97f856f97e3f00fba4187b287700 Mon Sep 17 00:00:00 2001 From: sarah-codatest <161772227+sarah-codatest@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:53:30 -0800 Subject: [PATCH] Add jsdocs to api methods --- app/utils/github-api.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/utils/github-api.js b/app/utils/github-api.js index df3e893..1c76d20 100644 --- a/app/utils/github-api.js +++ b/app/utils/github-api.js @@ -4,11 +4,17 @@ const BASE_URL = 'https://api.github.com'; export {getRepos, getUserData}; +/** + * This function gets the repositories for the given username. + */ function getRepos(username) { const url = `${BASE_URL}/users/${username}/repos?per_page=250`; return axios.get(url).then(response => response.data); } +/** + * This function gets account data associated with the given username. + */ function getUserData(username) { return axios.all([ axios.get(`${BASE_URL}/users/${username}`),