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

[BE] 10.03 뉴스 조회 API 구현 #181 #203

Merged
merged 17 commits into from
Nov 27, 2024
Merged

Conversation

uuuo3o
Copy link
Collaborator

@uuuo3o uuuo3o commented Nov 26, 2024

✅ 주요 작업

  • 네이버 뉴스 api를 사용해 주식, 증권 관련 뉴스를 가져옴
  • 8시 - 16시 사이 매 30분(0분, 30분)마다 api를 호출해 DB에 값을 업데이트
  • updated_at 컬럼을 통해 cron 동작 시간 확인 가능

💭 고민과 해결과정

  • DB에 시간이 밀리초까지 저장되는게 불만이었는데.. precision 옵션으로 밀리초를 없애려고 하면 에러가 떠서 아직 지우지 못했다.
  • 어떤 검색어로 주식 관련 데이터를 검색할 지 고민이어서 현재 주식, 증권만 검색해서 값을 넣어놨다.

@uuuo3o uuuo3o added BE 백엔드 API API 구현 labels Nov 26, 2024
@uuuo3o uuuo3o requested review from jinddings and sieunie November 26, 2024 13:23
@uuuo3o uuuo3o self-assigned this Nov 26, 2024
@uuuo3o uuuo3o linked an issue Nov 26, 2024 that may be closed by this pull request
Copy link
Collaborator

@jinddings jinddings left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

};
const url = 'https://openapi.naver.com/v1/search/news.json';

console.log(params);
Copy link
Collaborator

Choose a reason for hiding this comment

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

🟢 console.log 남아 있는거 같습니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

하 ㅋㅋㅋㅋㅋ 진짜 감사합니다. 콘솔이 분명 찍힐텐데 왜 눈치 못챘을까요 ..ㅎㅎ

Copy link
Collaborator

@sieunie sieunie left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

Comment on lines 9 to 13
@Module({
controllers: [NewsController],
providers: [NewsService, NaverApiDomianService, NewsRepository],
imports: [TypeOrmModule.forFeature([News])],
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

🟢 사소한건데 이 부분 순서도 통일하는게 예뻐 보일 것 같아용 제 기억에 아마도 다 imports, controllers, providers 순으로 되어있던 것 같습니당

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

확인했습니당 ㅎㅎㅎㅎ! 위에 콘솔 지우면서 같이 바꿀게요!!

@uuuo3o uuuo3o merged commit 4b0dda9 into back/main Nov 27, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API 구현 BE 백엔드
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BE] 10.03 뉴스 조회 API 구현
3 participants