-
Notifications
You must be signed in to change notification settings - Fork 0
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
Kdt5 ju ha rim #63
Open
wngkfla01
wants to merge
5
commits into
main
Choose a base branch
from
KDT5_JuHaRim
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Kdt5 ju ha rim #63
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,219 +1,32 @@ | ||
# π¬ μν κ²μ | ||
|
||
μ£Όμ΄μ§ APIλ₯Ό νμ©ν΄ '[μμ± μμ](https://stupefied-hodgkin-d9d350.netlify.app/)' μ²λΌ μμ λ‘κ² μν κ²μ κΈ°λ₯μ ꡬνν΄λ³΄μΈμ! | ||
κ³Όμ μν λ° λ¦¬λ·° κΈ°κ°μ λ³λ 곡μ§λ₯Ό μ°Έκ³ νμΈμ! | ||
λ°°ν¬λ§ν¬: https://roaring-dolphin-d6dd06.netlify.app | ||
|
||
## κ³Όμ μν λ° μ μΆ λ°©λ² | ||
|
||
``` | ||
KDTκΈ°μλ²νΈ_μ΄λ¦ | E.g, KDT0_ParkYoungWoong | ||
``` | ||
|
||
1. νμ¬ μ μ₯μλ₯Ό λ‘컬μ ν΄λ‘ (Clone)ν©λλ€. | ||
1. μμ μ λ³Έλͺ μΌλ‘ λΈλμΉλ₯Ό μμ±ν©λλ€.(κ΅¬λΆ κ°λ₯νλλ‘ λ³Έλͺ μ κΌ νμ€μΉΌμΌμ΄μ€λ‘ νμνμΈμ, `git branch KDT0_ParkYoungWoong`) | ||
1. μμ μ λ³Έλͺ λΈλμΉμμ κ³Όμ λ₯Ό μνν©λλ€. | ||
1. κ³Όμ μνμ΄ μλ£λλ©΄, μμ μ λ³Έλͺ λΈλμΉλ₯Ό μ격 μ μ₯μμ νΈμ(Push)ν©λλ€.(`main` λΈλμΉμ νΈμνμ§ μλλ‘ κΌ μ£ΌμνμΈμ, `git push origin KDT0_ParkYoungWoong`) | ||
1. μ μ₯μμμ `main` λΈλμΉλ₯Ό λμμΌλ‘ Pull Request μμ±νλ©΄, κ³Όμ μ μΆμ΄ μλ£λ©λλ€!(E.g, `main` <== `KDT0_ParkYoungWoong`) | ||
|
||
- `main` νΉμ λ€λ₯Έ μ¬λμ λΈλμΉλ‘ μ λ λ³ν©νμ§ μλλ‘ μ£ΌμνμΈμ! | ||
- Pull Requestμμ 보μ΄λ μ€λͺ μ λ€λ₯Έ μ¬λλ€μ΄ μ΄ν΄νκΈ° μ½λλ‘ κΌΌκΌΌνκ² μμ±νμΈμ! | ||
- Pull Requestμμ κ³Όμ μ μΆ ν μ λ λ³ν©(Merge)νμ§ μλλ‘ μ£ΌμνμΈμ! | ||
- κ³Όμ μν λ° μ μΆ κ³Όμ μμ λ¬Έμ κ° λ°μν κ²½μ°, λ°λ‘ λ΄λΉ λ©ν λ κ°μ¬μμ μκΈ°νμΈμ! | ||
|
||
## μꡬμ¬ν | ||
|
||
νμ μꡬμ¬νμ κΌ λ¬μ±ν΄μΌ νλ λͺ©νλ‘, μμ /μμ λ λΆκ°νκ³ μΆκ°λ κ°λ₯ν©λλ€. | ||
μ ν μꡬμ¬νμ λ¨μ μμλ‘, μμ λ‘κ² μΆκ°/μμ /μμ ν΄μ ꡬνν΄λ³΄μΈμ. | ||
κ° μꡬμ¬νμ λ¬μ± ν λ§ν¬λ€μ΄μμ `- [x]`λ‘ νμνμΈμ. | ||
β HTML, JS μ¬μ© | ||
|
||
### β νμ | ||
|
||
- [ ] μν μ λͺ©μΌλ‘ κ²μμ΄ κ°λ₯ν΄μΌ ν©λλ€! | ||
- [ ] κ²μλ κ²°κ³Όμ μν λͺ©λ‘μ΄ μΆλ ₯λΌμΌ ν©λλ€! | ||
- [ ] λ¨μΌ μνμ μμΈμ 보(μ λͺ©, κ°λ΄μ°λ, νμ , μ₯λ₯΄, κ°λ , λ°°μ°, μ€κ±°λ¦¬, ν¬μ€ν° λ±)λ₯Ό λ³Ό μ μμ΄μΌ ν©λλ€! | ||
- [ ] μ€μ μλΉμ€λ‘ λ°°ν¬νκ³ μ κ·Ό κ°λ₯ν λ§ν¬λ₯Ό μΆκ°ν΄μΌ ν©λλ€. | ||
- [x] μν μ λͺ©μΌλ‘ κ²μμ΄ κ°λ₯ν΄μΌ ν©λλ€! | ||
- [x] κ²μλ κ²°κ³Όμ μν λͺ©λ‘μ΄ μΆλ ₯λΌμΌ ν©λλ€! | ||
- [x] λ¨μΌ μνμ μμΈμ 보(μ λͺ©, κ°λ΄μ°λ, νμ , μ₯λ₯΄, κ°λ , λ°°μ°, μ€κ±°λ¦¬, ν¬μ€ν° λ±)λ₯Ό λ³Ό μ μμ΄μΌ ν©λλ€! | ||
- [x] μ€μ μλΉμ€λ‘ λ°°ν¬νκ³ μ κ·Ό κ°λ₯ν λ§ν¬λ₯Ό μΆκ°ν΄μΌ ν©λλ€. | ||
|
||
### β μ ν | ||
|
||
- [ ] ν λ²μ κ²μμΌλ‘ μν λͺ©λ‘μ΄ 20κ° μ΄μ κ²μλλλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] μν κ°λ΄μ°λλ‘ κ²μν μ μλλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] μν λͺ©λ‘μ κ²μνλ λμ λ‘λ© μ λλ©μ΄μ μ΄ λ³΄μ΄λλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [x] μν λͺ©λ‘μ κ²μνλ λμ λ‘λ© μ λλ©μ΄μ μ΄ λ³΄μ΄λλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] 무ν μ€ν¬λ‘€ κΈ°λ₯μ μΆκ°ν΄μ μΆκ° μν λͺ©λ‘μ λ³Ό μ μλλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] μν ν¬μ€ν°κ° μμ κ²½μ° λ체 μ΄λ―Έμ§λ₯Ό μΆλ ₯νλλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] μν μμΈμ λ³΄κ° μΆλ ₯λκΈ° μ μ λ‘λ© μ λλ©μ΄μ μ΄ λ³΄μ΄λλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] μν μμΈμ 보 ν¬μ€ν°λ₯Ό κ³ ν΄μλλ‘ μΆλ ₯ν΄λ³΄μΈμ. (μ€μκ° μ΄λ―Έμ§ 리μ¬μ΄μ§) | ||
- [x] μν μμΈμ λ³΄κ° μΆλ ₯λκΈ° μ μ λ‘λ© μ λλ©μ΄μ μ΄ λ³΄μ΄λλ‘ λ§λ€μ΄λ³΄μΈμ. | ||
- [x] μν μμΈμ 보 ν¬μ€ν°λ₯Ό κ³ ν΄μλλ‘ μΆλ ₯ν΄λ³΄μΈμ. (μ€μκ° μ΄λ―Έμ§ 리μ¬μ΄μ§) | ||
- [ ] μ°¨λ³νκ° κ°λ₯νλλ‘ νλ‘μ νΈλ₯Ό μ΅λν μμκ² λ§λ€μ΄λ³΄μΈμ. | ||
- [ ] μνμ κ΄λ ¨λ κΈ°ν κΈ°λ₯λ κ³ λ €ν΄λ³΄μΈμ. | ||
|
||
## API κΈ°λ³Έ μ¬μ©λ² | ||
|
||
```curl | ||
curl https://omdbapi.com/?apikey=7035c60c | ||
\ -X 'GET' | ||
``` | ||
|
||
## μν λͺ©λ‘ κ²μ | ||
|
||
μν λͺ©λ‘μ ν λ²μ μ΅λ 10κ°κΉμ§ κ²μν μ μμ΅λλ€. | ||
|
||
νλΌλ―Έν° | μ€λͺ | κΈ°λ³Έκ° | ||
---|----------------------|--- | ||
`s` | κ²μν μν μ λͺ©(νμ!) | - | ||
`y` | κ²μν κ°λ΄μ°λ, λΉ κ°μ μ 체 κ²μ | - | ||
`page` | κ²μν νμ΄μ§ λ²νΈ | `1` | ||
|
||
μμ² μ½λ μμ: | ||
|
||
```js | ||
async function getMovies(title, year = '', page = 1) { | ||
const s = `&s=${title}` | ||
const y = `&y=${year}` | ||
const p = `&page=${page}` | ||
try { | ||
const res = await fetch(`https://omdbapi.com/?apikey=7035c60c${s}${y}${p}`) | ||
const json = await res.json() | ||
if (json.Response === 'True') { | ||
const { Search: movies, totalResults } = json | ||
return { | ||
movies, | ||
totalResults | ||
} | ||
} | ||
return json.Error | ||
} catch (error) { | ||
console.log(error) | ||
} | ||
} | ||
``` | ||
|
||
μλ΅ λ°μ΄ν° νμ λ° μμ: | ||
|
||
```ts | ||
interface ResponseValue { | ||
Search: Movie[] // κ²μλ μν λͺ©λ‘, μ΅λ 10κ° | ||
totalResults: string // κ²μλ μν κ°μ | ||
Response: 'True' | 'False' // μμ² μ±κ³΅ μ¬λΆ | ||
} | ||
interface Movie { | ||
Title: string // μν μ λͺ© | ||
Year: string // μν κ°λ΄μ°λ | ||
imdbID: string // μν κ³ μ ID | ||
Type: string // μν νμ | ||
Poster: string // μν ν¬μ€ν° μ΄λ―Έμ§ URL | ||
} | ||
``` | ||
|
||
```json | ||
{ | ||
"Search": [ | ||
{ | ||
"Title": "Frozen", | ||
"Year": "2013", | ||
"imdbID": "tt2294629", | ||
"Type": "movie", | ||
"Poster": "https://m.media-amazon.com/images/M/MV5BMTQ1MjQwMTE5OF5BMl5BanBnXkFtZTgwNjk3MTcyMDE@._V1_SX300.jpg" | ||
}, | ||
{ | ||
"Title": "Frozen II", | ||
"Year": "2019", | ||
"imdbID": "tt4520988", | ||
"Type": "movie", | ||
"Poster": "https://m.media-amazon.com/images/M/MV5BMjA0YjYyZGMtN2U0Ni00YmY4LWJkZTItYTMyMjY3NGYyMTJkXkEyXkFqcGdeQXVyNDg4NjY5OTQ@._V1_SX300.jpg" | ||
} | ||
], | ||
"totalResults": "338", | ||
"Response": "True" | ||
} | ||
``` | ||
|
||
## μν μμ μ 보 κ²μ | ||
|
||
λ¨μΌ μνμ μμ μ 보λ₯Ό κ²μν©λλ€. | ||
|
||
νλΌλ―Έν° | μ€λͺ | κΈ°λ³Έκ° | ||
---|---|--- | ||
`i` | κ²μν μν ID(νμ!) | | ||
`plot` | μ€κ±°λ¦¬ κΈΈμ΄ | `short` | ||
|
||
μμ² μ½λ μμ: | ||
|
||
```js | ||
async function getMovie(id) { | ||
const res = await fetch(`https://omdbapi.com/?apikey=7035c60c&i=${id}&plot=full`) | ||
const json = await res.json() | ||
if (json.Response === 'True') { | ||
return json | ||
} | ||
return json.Error | ||
} | ||
``` | ||
### λ°°μ΄μ | ||
|
||
μλ΅ λ°μ΄ν° νμ λ° μμ: | ||
- Javascriptμμ μ»΄ν¬λνΈ, λΌμ°ν° ꡬμ±, μνκ΄λ¦¬μ κ°λ μ λν΄ κ³΅λΆν μ μμμ΅λλ€. | ||
|
||
```ts | ||
interface ResponseValue { | ||
Title: string // μν μ λͺ© | ||
Year: string // μν κ°λ΄μ°λ | ||
Rated: string // μν λ±κΈ | ||
Released: string // μν κ°λ΄μΌ | ||
Runtime: string // μν μμμκ° | ||
Genre: string // μν μ₯λ₯΄ | ||
Director: string // μν κ°λ | ||
Writer: string // μν μκ° | ||
Actors: string // μν μΆμ°μ§ | ||
Plot: string // μν μ€κ±°λ¦¬ | ||
Language: string // μν μΈμ΄ | ||
Country: string // μν μ μ κ΅κ° | ||
Awards: string // μν μμ λ΄μ | ||
Poster: string // μν ν¬μ€ν° μ΄λ―Έμ§ URL | ||
Ratings: Rating[] // μν νμ μ 보 | ||
Metascore: string // μν λ©νμ€μ½μ΄ | ||
imdbRating: string // μν IMDB νμ | ||
imdbVotes: string // μν IMDB ν¬ν μ | ||
imdbID: string // μν κ³ μ ID | ||
Type: string // μν νμ | ||
DVD: string // μν DVD μΆμμΌ | ||
BoxOffice: string // μν λ°μ€μ€νΌμ€ | ||
Production: string // μν μ μμ¬ | ||
Website: string // μν 곡μ μΉμ¬μ΄νΈ | ||
Response: string // μμ² μ±κ³΅ μ¬λΆ | ||
} | ||
interface Rating { // μν νμ μ 보 | ||
Source: string // νμ μ 곡 μ¬μ΄νΈ | ||
Value: string // νμ | ||
} | ||
``` | ||
### μμ¬μ΄μ | ||
|
||
```json | ||
{ | ||
"Title": "Frozen", | ||
"Year": "2013", | ||
"Rated": "PG", | ||
"Released": "27 Nov 2013", | ||
"Runtime": "102 min", | ||
"Genre": "Animation, Adventure, Comedy", | ||
"Director": "Chris Buck, Jennifer Lee", | ||
"Writer": "Jennifer Lee, Hans Christian Andersen, Chris Buck", | ||
"Actors": "Kristen Bell, Idina Menzel, Jonathan Groff", | ||
"Plot": "When the newly crowned Queen Elsa accidentally uses her power to turn things into ice to curse her home in infinite winter, her sister Anna teams up with a mountain man, his playful reindeer, and a snowman to change the weather co...", | ||
"Language": "English, Norwegian", | ||
"Country": "United States", | ||
"Awards": "Won 2 Oscars. 82 wins & 60 nominations total", | ||
"Poster": "https://m.media-amazon.com/images/M/MV5BMTQ1MjQwMTE5OF5BMl5BanBnXkFtZTgwNjk3MTcyMDE@._V1_SX300.jpg", | ||
"Ratings": [ | ||
{ "Source": "Internet Movie Database", "Value": "7.4/10" }, | ||
{ "Source": "Rotten Tomatoes", "Value": "90%" }, | ||
{ "Source": "Metacritic", "Value": "75/100" } | ||
], | ||
"Metascore": "75", | ||
"imdbRating": "7.4", | ||
"imdbVotes": "620,489", | ||
"imdbID": "tt2294629", | ||
"Type": "movie", | ||
"DVD": "18 Mar 2014", | ||
"BoxOffice": "$400,953,009", | ||
"Production": "N/A", | ||
"Website": "N/A", | ||
"Response": "True" | ||
} | ||
``` | ||
- μ€νμΌμ κ°μ±μκ² λ°κΏλ³΄κ³ μΆμ΄μ μΆν λ³κ²½ν΄λ³Ό μμ μ λλ€. |
Binary file not shown.
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,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Movie App</title> | ||
<link rel="icon" href="./favicon.ico"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/reset.min.css" /> | ||
<link rel="preconnect" href="https://fonts.googleapis.com"> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | ||
<link href="https://fonts.googleapis.com/css2?family=Oswald:wght@500&family=Roboto:wght@400;700&display=swap" rel="stylesheet"> | ||
<link rel="stylesheet" href="./src/main.css"> | ||
<script type="module" defer src="./src/main.js"></script> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preconnect
λ₯Ό μ¬μ©νμ¬ font νμΌμ λ€κ³ μ€κ³ μλ€μ:) ν΄λΉ μμ±μ΄ μ΄λ ν μλ―Έλ‘ μ¬μ©λκ³ μλμ§ λ μ΄λ€ ν¨κ³Όκ° μμ΄μ μΆκ°ν κ²μΈμ§ μ€λͺ ν΄μ£Όμ€ μ μμκΉμ?