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

[Settings]#4-Dev 생성 #5

Merged
merged 1 commit into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Weather777/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>App needs location servers for stuffs.</string>
<string>App needs location servers for stuff.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
1 change: 1 addition & 0 deletions Weather777/Network/WeatherManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
//

import Foundation

60 changes: 60 additions & 0 deletions Weather777/Network/WeatherModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,63 @@
//

import Foundation

// MARK: - WeatherData
struct WeatherData: Codable {
let coord: Coord
let weather: [Weather]
let base: String
let main: Main
Copy link
Contributor

Choose a reason for hiding this comment

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

이게 왜 안될까요

let visibility: Int
let wind: Wind
let clouds: Clouds
let dt: Int
let sys: Sys
let timezone, id: Int
let name: String
let cod: Int
}

// MARK: - Clouds
Copy link
Contributor

Choose a reason for hiding this comment

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

이게 코멘트를 해야할까요?

struct Clouds: Codable {
let all: Int
}

// MARK: - Coord
struct Coord: Codable {
let lon, lat: Double
}

// MARK: - Main
struct Main: Codable {
let temp, feelsLike, tempMin, tempMax: Double
let pressure, humidity: Int

enum CodingKeys: String, CodingKey {
case temp
case feelsLike = "feels_like"
case tempMin = "temp_min"
case tempMax = "temp_max"
case pressure, humidity
}
}

// MARK: - Sys
struct Sys: Codable {
let type, id: Int
let country: String
let sunrise, sunset: Int
}

// MARK: - Weather
struct Weather: Codable {
let id: Int
let main, description, icon: String
}

// MARK: - Wind
struct Wind: Codable {
let speed: Double
let deg: Int
}

VesselWheel marked this conversation as resolved.
Show resolved Hide resolved