2.4.API_users - YOOGOMJA/github_garden_mern GitHub Wiki

๊ธฐ๋ณธ ํ•ญ๋ชฉ๋“ค์ด ์•„๋‹Œ ์—ฐ์‚ฐ,๋ถ„์„๋œ ์ •๋ณด๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค.
๊ด€๋ จ ํŒŒ์ผ

GET

  • /api/users/
    : ๋ชจ๋“  ์‚ฌ์šฉ์ž๋ฅผ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.

  • /api/users/search
    : ์‚ฌ์šฉ์ž๋ฅผ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค.

interface SearchQueryString{
  // ์‚ฌ์šฉ์ž ์ด๋ฆ„
  user_name : string,
}
  • /api/users/:user_name
    : ํŠน์ • ์‚ฌ์šฉ์ž๋ฅผ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค.

  • /api/users/:user_name/commits
    : ํŠน์ • ์‚ฌ์šฉ์ž์˜ ๋ชจ๋“  ์ปค๋ฐ‹์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค. (๊ณง deprecated ๋  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ์ปค๋ฐ‹ ์กฐํšŒ ๊ธฐ๋Šฅ์€ ์ œ๊ฑฐ๋ฉ๋‹ˆ๋‹ค.)

  • /api/users/:user_name/repos
    : ํŠน์ • ์‚ฌ์šฉ์ž์˜ ๋ชจ๋“  ์ €์žฅ์†Œ๋ฅผ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค. (๊ณง deprecated ๋  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. api/repos๋กœ ์ด๊ด€๋ฉ๋‹ˆ๋‹ค.)

  • /api/users/:user_name/challenges
    : ๋ชจ๋“  ๋„์ „ ๊ธฐ๊ฐ„์„ ์กฐํšŒํ•ฉ๋‹ˆ๋‹ค. (๊ณง deprecated ๋  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. api/challenges๋กœ ์ด๊ด€๋ฉ๋‹ˆ๋‹ค.)

POST

  • /api/users/:user_name/fetch
    : ํŠน์ • ์‚ฌ์šฉ์ž์˜ ์ •๋ณด๋ฅผ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค.