Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature #4 gist api module #45

Closed
wants to merge 16 commits into from
Closed

Feature #4 gist api module #45

wants to merge 16 commits into from

Conversation

kimhji
Copy link
Collaborator

@kimhji kimhji commented Nov 13, 2024

#️⃣연관된 이슈

Feature #4 gist api module

📝작업 내용

GET /gist
사용자의 모든 gist 가져오기

[
	{
		id: string
		description : string
		files:[
			{
				file_name : string
				raw_url : string
				type : string
				language : string
				size : number
				content : string
			}
		]
		public : boolean
		owner : {
			login : string
			id : number
			avatar_url : string
		}
	}
]

GET /gist/Last
사용자의 가장 최근 gist 가져오기

{
	id: string
	description : string
	files:[
		{
			file_name : string
			raw_url : string
			type : string
			language : string
			size : number
			content : string
		}
	]
	public : boolean
	owner : {
		login : string
		id : number
		avatar_url : string
	}
}

GET /gist/user
사용자 정보 가져오기

{
    "id": number,
    "avatar_url": string,
    "login": string
}

GET /gist/:id
해당 id의 gist 정보 가져오기

{
    "id": string,
    "description": string,
    "files": [
        {
            "file_name": string,
            "raw_url": string
            "type": string,
            "language": string,
            "size": number,
            "content": string
        }
	],
	"public" : boolean,
	"owner":{
		"login" : string,
		"id" : number,
		"avatar_url" : string
	}
}

GET /gist/:gist_id/commits, /gist/:gist_id/commits/:pageIdx
gist의 commit 목록 가져오기

[
    {
        "committed_at": Date,
        "url": string
    }
]

GET /gist/:gist_id/commit/:id
특정 commit의 file들 가져오기

{
    "id": string,
    "description": string,
    "files": [
        {
            "file_name": string,
            "raw_url": string
            "type": string,
            "language": string,
            "size": number,
            "content": string
        }
	],
	"public" : boolean,
	"owner":{
		"login" : string,
		"id" : number,
		"avatar_url" : string
	}
}

GET /gist/:gist_id/comments
gist의 comment들 가져오기

[
    {
		"id": number,
		"created_at": Date,
		"body": string,
		"owner": {
			"id": number,
			"login": string,
			"avatar_url": string
		}
	}
]

Post /gist/:gist_id/comment
Body{
"comment": string
}
comment 생성

{
    "id": number,
    "created_at": Date,
    "body": string,
    "owner": {
        "id": number,
        "login": string,
        "avatar_url": string
    }
}

PATCH /gist/:gist_id/comment/:comment_id
Body{
"comment": string
}
특정 comment의 내용 수정

boolean

DELETE /gist/:gist_id/comment/:comment_id
특정 comment 삭제

boolean 

스크린샷 (선택)

예시로 commit 목록 가져오기 사진 첨부합니다.
image

💬리뷰 요구사항(선택)

gist 목록 가져오기에서 file 내용까지 다 같이 가져오게 하니까 좀 느립니다. content는 목록 가져오기에서 뺄까요?

@kimhji kimhji self-assigned this Nov 13, 2024
@kimhji kimhji linked an issue Nov 13, 2024 that may be closed by this pull request
5 tasks
@mjh000526
Copy link
Collaborator

리뷰달기 전에 일단 fetch를 한번 해야할것같네요

mjh000526
mjh000526 previously approved these changes Nov 13, 2024
Copy link
Collaborator

@mjh000526 mjh000526 Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡

gist는 모듈로써 만들고, 추후에 다른 모듈에 controller 역할을 위임하게 될것 같네요

Copy link
Collaborator

@mjh000526 mjh000526 Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡

반복되는 객체들을 인터페이스로 정의한 것은 좋았는데, DTO class로 만들어서 사용하면 가독성을 높일 수 있을 것 같아요.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

반영했습니다!

@kimhji kimhji closed this Nov 13, 2024
@kimhji kimhji deleted the feature-#4-gist_api_module branch November 13, 2024 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gist api module화
2 participants