Skip to content

Conversation

@jumining
Copy link
Contributor

@jumining jumining commented Sep 2, 2022

๐Ÿ“Œ week5 ๊ณผ์ œ PR

๐ŸŒฑ PR ํฌ์ธํŠธ

  • ์ €๋ฒˆ PR๋•Œ ์ œ ๋ธŒ๋žœ์น˜๊ฐ€ ์•„๋‹Œ main์— ์—ฐ๊ฒฐํ–ˆ๋˜ ์‹ค์ˆ˜๋กœ ์ธํ•ด ์ €๋ฒˆ ๊ณผ์ œ๋“ค๋„ ๊ฐ™์ด ์˜ฌ๋ผ์˜ค๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค. ์ด๋ฒˆ์ฃผ์— ์ œ๊ฐ€ ์ž‘์—…ํ•œ ํŒŒ์ผ์ธ ๊ณง ๊ณผ์ œ์— ๊ด€๋ จ๋œ ํŒŒ์ผ์€ week5์— ์žˆ์Šต๋‹ˆ๋‹ค.

๐ŸŒฑ ๊ตฌํ˜„ํ•œ ๊ณผ์ œ ๋‚ด์šฉ

  • NaverOpenAPI๋ฅผ ์ด์šฉํ•˜์—ฌ ๋„คํŠธ์›Œํฌ๋ฅผ ์‹ค์Šตํ•ด๋ณด์•˜์Šต๋‹ˆ๋‹ค.
  • ์—ฐ๊ฒฐํ•œ API๋Š” ๊ฒ€์ƒ‰(์ฑ…), ๊ฒ€์ƒ‰(๋ธ”๋กœ๊ทธ) ์ž…๋‹ˆ๋‹ค.
  • ์ฑ… ์ด๋ฆ„์„ ๊ฒ€์ƒ‰ํ•˜๋ฉด ์ฑ…์— ๊ด€ํ•œ ์ •๋ณด๊ฐ€ ๋‚˜์˜ค๋ฉฐ, ๊ทธ ์ฑ…์— ๊ด€๋ จ๋œ ๋ธ”๋กœ๊ทธ ๊ธ€์ด ๋‚˜์˜ค๊ณ  ํด๋ฆญํ•˜๋ฉด ํ•ด๋‹น ๋ธ”๋กœ๊ทธ ๊ธ€๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

๐ŸŒฑ ๋” ์ƒ๊ฐํ•  ์ 

  • ๊ณ„์‚ฐ๊ธฐ๋ฅผ ์•„์ง ์ˆ˜์ •ํ•˜์ง€ ๋ชปํ–ˆ์Šต๋‹ˆ๋‹ค. ํ† ์š”์ผ ๋‚ด๋กœ ์ˆ˜์ •ํ•ด๋ณด๋ ค๊ณ  ํ•ฉ๋‹ˆ๋‹ค.
  • API๋ฅผ 2๊ฐœ๋งŒ ์—ฐ๊ฒฐํ•œ ์ƒํƒœ์ธ๋ฐ, ํ•˜๋‚˜๋ฅผ ์–ผ๋ฅธ ๋” ์—ฐ๊ฒฐํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!
  • NavigationLink๋ฅผ ํ†ตํ•ด ๋ธ”๋กœ๊ทธ๊ธ€์ด ๋‚˜์˜ค๋Š” ์›น๋ทฐ๋กœ ์ด๋™ํ•˜๊ฒŒ ๊ตฌํ˜„ํ–ˆ๋Š”๋ฐ SwiftUI encountered an issue when pushing aNavigationLink. Please file a bug. ๋ผ๋Š” ์˜ค๋ฅ˜๋ฌธ๊ตฌ๊ฐ€ ํ”„๋ฆฐํŠธ ๋˜๋Š”๋ฐ ์ œ๊ฐ€ ์˜๋„ํ•œ ๋Œ€๋กœ ์ž˜ ์ž‘๋™ํ•˜์ง€ ์•Š์•„์„œ ๋ง‰ํžˆ๊ณ  ์žˆ๋Š” ์ƒํ™ฉ์ด๊ณ  ํ•ด๊ฒฐ๋ฐฉ๋ฒ•์„ ์ฐพ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค..

๐Ÿ“ธ ๊ณผ์ œ์‚ฌ์ง„

์Šคํฌ๋ฆฐ์ƒท ์›น๋ทฐ

@jumining jumining self-assigned this Sep 2, 2022
@main
struct ApiTestApp: App {

var body: some Scene {
Copy link
Contributor

Choose a reason for hiding this comment

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

๋“ค์—ฌ์“ฐ๊ธฐ ์ƒํƒœ๊ฐ€ ์ข€ ์ด์ƒํ•ฉ๋‹ˆ๋‹ค.

return webView
}

func updateUIView(_ uiView: WKWebView, context: UIViewRepresentableContext<BlogWebView>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

์ด ๋ฉ”์„œ๋“œ์˜ ์—ญํ• ์€ ๋ฌด์—‡์ผ๊นŒ์š” ?


return urlRequest
}

Copy link
Contributor

Choose a reason for hiding this comment

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

fetchBookList, fetchBookBlog์— ์ค‘๋ณต๋˜๋Š” ๋ถ€๋ถ„์ด ์žˆ์Šต๋‹ˆ๋‹ค.
API๊ฐ€ ์ถ”๊ฐ€๋œ๋‹ค๋ฉด ์ค‘๋ณต์ด ๊ณ„์† ๋˜๊ฒ ์ฃ  ?
์ค‘๋ณต์„ ์—†์• ๋ด…์‹œ๋‹ค !

Choose a reason for hiding this comment

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

๋„คํŠธ์›Œํฌ๋ฅผ ์œ„ํ•œ ๊ณตํ†ต ์ฝ”๋“œ๋Š” ๋„คํŠธ์›Œํฌ ๋งค๋‹ˆ์ €๋กœ ๋งŒ๋“ค๊ณ , book api ๋™์ž‘์„ ์œ„ํ•œ ๊ตฌํ˜„์„ ๋”ฐ๋กœ ํ•ด๋ณผ๊นŒ์š”?


enum APIConstants: String {

case getBookInfo = "/v1/search/book.json"

Choose a reason for hiding this comment

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

์š”๊ฑด static let ์ด ์•„๋‹Œ case ๋กœ ๋งŒ๋“  ์ด์œ ๊ฐ€ ์žˆ๋‚˜์š”?


import Foundation

enum APIConstants: String {

Choose a reason for hiding this comment

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

Constant ๋ฅผ ๋งŒ๋“ ๊ฑด ์ข‹์ง€๋งŒ, ๋„ˆ๋ฌด ์งฌ๋ฝ•์œผ๋กœ ๊ตฌํ˜„๋˜์–ด ์žˆ๋Š” ๊ฒƒ ๊ฐ™์•„์š”
string ๊ฐ’, api url, success ๋“ฑ ๊ตฌ๋ถ„์„ ์กฐ๊ธˆ ํ•ด๋ณผ๊นŒ์š”?

let link: String
let image: String
let author, discount, publisher, pubdate: String
let isbn, description: String

Choose a reason for hiding this comment

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

isbn ์ด ๋ญ”๊ฐ€์š”...?

.font(.footnote)
.frame(width: 100, height: 230)
}
}

Choose a reason for hiding this comment

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

์ ์ ˆํ•œ ์ค„๋ฐ”๊ฟˆ๋„ ๊ฐ€๋…์„ฑ์„ ์ฆ๊ฐ€์‹œํ‚ฌ ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

.fontWeight(.bold)
.lineLimit(2)
.fixedSize(horizontal: false, vertical: true)
Text(blog.bloggername)
Copy link

Choose a reason for hiding this comment

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

์นด๋ฉœ์ผ€์ด์Šค

.lineLimit(2)
.fixedSize(horizontal: false, vertical: true)
Text(blog.bloggername)
Text(blog.postdate).foregroundColor(.indigo)
Copy link

Choose a reason for hiding this comment

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

์นด๋ฉœ

.aspectRatio(contentMode: .fit)
.frame(width: 80, height: 120, alignment: .center)
case .failure:
Image(systemName: "questionmark.square")
Copy link

Choose a reason for hiding this comment

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

image name string๋„ ๋”ฐ๋กœ๋ชจ์•„์„œ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ถ€๋ถ„์ด ์žˆ์œผ๋ฉด ์ข‹์„๊ฒƒ๊ฐ™์•„์š” ใ…Žใ…Ž

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants