Skip to content

๐Ÿš€ Node.js๋ฅผ ์œ„ํ•œ ๋กœ์ผ“ํŽ€์น˜ API ํด๋ผ์ด์–ธํŠธ

License

Notifications You must be signed in to change notification settings

junhoyeo/rocketpunch-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Rocketpunch API

๐Ÿš€ Node.js๋ฅผ ์œ„ํ•œ ๋กœ์ผ“ํŽ€์น˜ API ํด๋ผ์ด์–ธํŠธ

๋กœ์ผ“ํŽ€์น˜๋Š” ์Šคํƒ€ํŠธ์—… ๊ธฐ์—…/์ฑ„์šฉ ํ”Œ๋žซํผ์œผ๋กœ ์‹œ์ž‘ํ•œ ๋น„์ฆˆ๋‹ˆ์Šค ๋„คํŠธ์›Œํ‚น ์„œ๋น„์Šค๋กœ, ์ˆ˜๋งŽ์€ ๊ธฐ์—…๊ณผ ์‚ฌ๋žŒ๋“ค์˜ ํ”„๋กœํ•„ ๊ทธ๋ฆฌ๊ณ  ์ฑ„์šฉ ์ •๋ณด๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์ด ๋ชจ๋“ˆ์€ ๋น„๊ณต์‹ API ํด๋ผ์ด์–ธํŠธ๋กœ,
1๏ธโƒฃ ๊ธฐ์—…๊ณผ ๊ฐœ์ธ์ด ํ”„๋กœ์ ํŠธ์™€ ์ด๋ ฅ์„œ ์ •๋ณด๋ฅผ ๋” ๋น ๋ฅด๊ฒŒ ์—…๋ฐ์ดํŠธํ•˜๊ณ ,
2๏ธโƒฃ ์ž์‹ ์—๊ฒŒ ํ•„์š”ํ•œ ์ฑ„์šฉ ์ •๋ณด๋ฅผ ๊ตฌํ•˜๋Š” ๊ณผ์ •์„ ์ž๋™ํ™”ํ•  ์ˆ˜ ์žˆ๋„๋ก ์ œ์ž‘๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ฆ Installation

npm install rocketpunch-api
# Or using yarn
yarn add rocketpunch-api

๐Ÿ‘Š Usage

import {
  RocketPunchAPIClient,
  ICompanyMember,
  IProject,
  IUserSummary,
} from 'rocketpunch-api';

// Initialize API Client with Email Login
const rocketpunchAPI = new RocketPunchAPIClient({
  email: 'junhoyeo@example.com',
  password: 'โ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ขโ€ข',
});

(async () => {
  // Login with providen credentials
  await rocketpunchAPI.login();

  // User profile API
  const userProfile = rocketpunchAPI.getUser('jyeo');

  // Receive summary about user profile
  const summary: IUserSummary = userProfile.getSummary();
  console.log(summary.job);
  // => 'Frontend Web Developer'

  // Receive a list of user projects
  const projects: IRocketPunchProject[] = userProfile.getProjects();
  projects.forEach((project) => console.log(project));

  // Company profile API
  const companyProfile = rocketpunchAPI.getCompany('inu');

  // Receive brief profile information about company members
  const members: ICompanyMember = companyProfile.getMembers();
  console.log(members);
})();

๐Ÿ“– API

  • ๐Ÿ“ƒ ๋ช…์„ธ
  • ๐Ÿšง ๊ตฌํ˜„ ์ค‘
  • โœ… ๊ตฌํ˜„ ์™„๋ฃŒ

โœ… getUser

ํŠน์ • username๋ฅผ ๊ฐ€์ง„ ์‚ฌ์šฉ์ž์˜ ๋ฌธ์„œ๋ฅผ ๋ถˆ๋Ÿฌ์˜ต๋‹ˆ๋‹ค.

const userProfile = await rocketpunchAPI.getUser('@jyeo');

โœ… userProfile.getSummary

ํ•ด๋‹น ์‚ฌ์šฉ์ž์˜ ์š”์•ฝ๋œ ํ”„๋กœํ•„ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getSummary();
{
  avatar: 'https://image.rocketpunch.com/user/183977/183977_1591104071.jpeg?s=200x200&t=cover',
  name: '์—ฌ์ค€ํ˜ธ',
  englishName: 'Junho Yeo',
  status: 'ํ”„๋ฆฌ๋žœ์„œ',
  job: 'Frontend Web Developer',
  role: [ '๋””์ž์ธ', 'SW ๊ฐœ๋ฐœ', '๊ธฐํš/PM' ],
  interests: [ 'JavaScript', 'Front-end', 'React' ],
  overview: 'Frontend is INEVITABLEโ„ข: ๋ถˆ๊ฐ€๋Šฅํ•œ ํ”„๋ก ํŠธ์—”๋“œ๋Š” ์—†๋‹ค๊ณ  ๋ฏฟ์Šต๋‹ˆ๋‹ค...',
  highlights: [
    { name: 'EmoticBox', href: '/tag/emoticbox-tuif05' },
    { name: '์ด๋ˆ„', href: '/tag/inu-vrcojq' },
    {
      name: 'ํ•œ๊ตญ๋””์ง€ํ„ธ๋ฏธ๋””์–ด๊ณ ๋“ฑํ•™๊ต',
      href: '/tag/korea-digital-media-high-school-n8zzfw'
    }
  ],
  socialInfo: { recommends: 6, friends: 116, residence: '์†กํŒŒ๊ตฌ' },
  webpage: 'https://trendy-resume.now.sh/',
  socialLinks: [
    { name: 'facebook', href: 'https://www.facebook.com/juno3704' },
    {
      name: 'instagram',
      href: 'https://www.instagram.com/jyeo_official'
    },
    { name: 'github', href: 'https://github.com/junhoyeo' }
  ],
  connection: { following: 185, follower: 119 }
}

๐Ÿ“ƒ userProfile.getCareer()

ํ•ด๋‹น ์‚ฌ์šฉ์ž์˜ ๊ฒฝ๋ ฅ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getCareer();

โœ… userProfile.getEducation()

ํ•ด๋‹น ์‚ฌ์šฉ์ž์˜ ํ•™๋ ฅ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getEducation();
[
  {
    name: 'ํ•œ๊ตญ๋””์ง€ํ„ธ๋ฏธ๋””์–ด๊ณ ๋“ฑํ•™๊ต',
    href: '/tag/korea-digital-media-high-school-n8zzfw',
    major: [ '์ „๋ฌธ(์‹ค์—…)' ],
    date: '2019๋…„ ์ž…ํ•™',
    description: '18๊ธฐ ํ•ดํ‚น๋ฐฉ์–ด๊ณผ',
    projects: [ '๋””๋ฏธ๊ณ ์ธ', '๋””๋ฏธ์‹œ๊ฐ„', 'CAKE' ]
  }
]

๐Ÿ“ƒ userProfile.getProjects()

ํ•ด๋‹น ์‚ฌ์šฉ์ž๊ฐ€ ๋“ฑ๋กํ•œ ํ”„๋กœ์ ํŠธ ๋ชฉ๋ก์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getProjects();

๐Ÿ“ƒ userProfile.getAwards()

ํ•ด๋‹น ์‚ฌ์šฉ์ž์˜ ์ˆ˜์ƒ ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getAwards();

๐Ÿ“ƒ userProfile.getPosts()

ํ•ด๋‹น ์‚ฌ์šฉ์ž๊ฐ€ ์ž‘์„ฑํ•œ ๋ธ”๋กœ๊ทธ ๊ธ€ ๋ชฉ๋ก์„ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getPosts();

๐Ÿ“ƒ userProfile.getMedia()

ํ•ด๋‹น ์‚ฌ์šฉ์ž๊ฐ€ ์‹ค๋ฆฐ ๋‰ด์Šค ๋ฐ ๋ฏธ๋””์–ด ์ •๋ณด๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋Š” ํ•จ์ˆ˜์ž…๋‹ˆ๋‹ค.

userProfile.getMedia();

About

๐Ÿš€ Node.js๋ฅผ ์œ„ํ•œ ๋กœ์ผ“ํŽ€์น˜ API ํด๋ผ์ด์–ธํŠธ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published