-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #244 from Quickchive/feature-#243/crawl-og-data
[Feature] Og 데이터 크롤링
- Loading branch information
Showing
4 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'; | ||
import { LinkInfo } from '../types/link-info.interface'; | ||
|
||
export class GetLinkInfoResponseDto { | ||
@ApiProperty({ | ||
description: '아티클 제목', | ||
example: '[Terraform] 테라폼 훑어보기 — 턴태의 밑바닥부터 시작하는 de-vlog', | ||
}) | ||
private readonly title: string; | ||
|
||
@ApiProperty({ | ||
description: '아티클 본문 일부', | ||
example: | ||
'인프라 구조마저 코드로 조작하고 있는 현재, 가장 많이 쓰이는 도구는 테라폼과 앤서블이 있습니다.', | ||
}) | ||
private readonly description: string; | ||
|
||
@ApiProperty({ | ||
description: '썸네일/커버 이미지', | ||
example: | ||
'https://img1.daumcdn.net/thumb/R800x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2Fz52vz%2FbtsCAOBzgTR%2FhFgGDKkr6iKWfU6eKeKUVk%2Fimg.png', | ||
}) | ||
private readonly coverImg: string; | ||
|
||
@ApiPropertyOptional({ | ||
description: '아티클 사이트 주소', | ||
example: '턴태의 밑바닥부터 시작하는 de-vlog', | ||
}) | ||
private readonly siteName?: string; | ||
|
||
constructor(linkInfo: LinkInfo) { | ||
this.title = linkInfo.title; | ||
this.description = linkInfo.description; | ||
this.coverImg = linkInfo.coverImg; | ||
this.siteName = linkInfo.siteName; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export interface LinkInfo { | ||
title: string; | ||
description: string; | ||
coverImg: string; | ||
siteName?: string; | ||
} |