Skip to content

Commit

Permalink
[Add] TMDB API Key & BaseURL 추가 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha-kwhn committed May 11, 2023
1 parent 1a494a6 commit 7830680
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 39 deletions.
32 changes: 24 additions & 8 deletions Sopt_Seminar/Sopt_Seminar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
F44B4E3B29D7FA2A003658CD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F44B4E3929D7FA2A003658CD /* LaunchScreen.storyboard */; };
F44B4E4329D806BC003658CD /* PracticeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44B4E4229D806BC003658CD /* PracticeViewController.swift */; };
F44B4E4529D80FC6003658CD /* PracticeViewController2.swift in Sources */ = {isa = PBXBuildFile; fileRef = F44B4E4429D80FC6003658CD /* PracticeViewController2.swift */; };
F4587CAC2A0D511600F56BCD /* MovieService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4587CAB2A0D511600F56BCD /* MovieService.swift */; };
F470034E29F26AF80034E787 /* NicknameViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F470034D29F26AF80034E787 /* NicknameViewController.swift */; };
F470037B29F3A7AC0034E787 /* CommonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F470037A29F3A7AC0034E787 /* CommonView.swift */; };
F470037D29F3A8EF0034E787 /* SecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F470037C29F3A8EF0034E787 /* SecondViewController.swift */; };
Expand Down Expand Up @@ -56,8 +57,8 @@
F4BE7E272A069A4000688732 /* WeatherViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E232A069A4000688732 /* WeatherViewController.swift */; };
F4BE7E282A069A4000688732 /* Config_w.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E242A069A4000688732 /* Config_w.swift */; };
F4BE7E292A069A4000688732 /* WeatherService.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E252A069A4000688732 /* WeatherService.swift */; };
F4BE7E2C2A09386900688732 /* UserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E2B2A09386900688732 /* UserInfo.swift */; };
F4BE7E2F2A09537400688732 /* LogOut.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E2E2A09537400688732 /* LogOut.swift */; };
F4BE7E2C2A09386900688732 /* Enums.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E2B2A09386900688732 /* Enums.swift */; };
F4BE7E2F2A09537400688732 /* Protocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E2E2A09537400688732 /* Protocols.swift */; };
F4BE7E322A095B0A00688732 /* SegmentControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E312A095B0A00688732 /* SegmentControl.swift */; };
F4BE7E352A09629B00688732 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E342A09629B00688732 /* HomeViewController.swift */; };
F4BE7E372A0962F500688732 /* RealTimeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4BE7E362A0962F500688732 /* RealTimeViewController.swift */; };
Expand Down Expand Up @@ -96,6 +97,7 @@
F44B4E3C29D7FA2A003658CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
F44B4E4229D806BC003658CD /* PracticeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PracticeViewController.swift; sourceTree = "<group>"; };
F44B4E4429D80FC6003658CD /* PracticeViewController2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PracticeViewController2.swift; sourceTree = "<group>"; };
F4587CAB2A0D511600F56BCD /* MovieService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovieService.swift; sourceTree = "<group>"; };
F470034D29F26AF80034E787 /* NicknameViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NicknameViewController.swift; sourceTree = "<group>"; };
F470037A29F3A7AC0034E787 /* CommonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonView.swift; sourceTree = "<group>"; };
F470037C29F3A8EF0034E787 /* SecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,8 +128,8 @@
F4BE7E232A069A4000688732 /* WeatherViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeatherViewController.swift; sourceTree = "<group>"; };
F4BE7E242A069A4000688732 /* Config_w.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Config_w.swift; sourceTree = "<group>"; };
F4BE7E252A069A4000688732 /* WeatherService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WeatherService.swift; sourceTree = "<group>"; };
F4BE7E2B2A09386900688732 /* UserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInfo.swift; sourceTree = "<group>"; };
F4BE7E2E2A09537400688732 /* LogOut.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogOut.swift; sourceTree = "<group>"; };
F4BE7E2B2A09386900688732 /* Enums.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Enums.swift; sourceTree = "<group>"; };
F4BE7E2E2A09537400688732 /* Protocols.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Protocols.swift; sourceTree = "<group>"; };
F4BE7E312A095B0A00688732 /* SegmentControl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SegmentControl.swift; sourceTree = "<group>"; };
F4BE7E342A09629B00688732 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = "<group>"; };
F4BE7E362A0962F500688732 /* RealTimeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RealTimeViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -222,6 +224,7 @@
F4289C5029EE639F0045BEC8 /* Assignment */ = {
isa = PBXGroup;
children = (
F4587CAA2A0D4B5F00F56BCD /* Network */,
F4BE7E2D2A09535D00688732 /* Protocols */,
F4BE7E302A095A6F00688732 /* MainViewController */,
F4DDC4A42A03D1CC00E97D1A /* MyPage */,
Expand Down Expand Up @@ -264,6 +267,14 @@
path = Sopt_Seminar;
sourceTree = "<group>";
};
F4587CAA2A0D4B5F00F56BCD /* Network */ = {
isa = PBXGroup;
children = (
F4587CAB2A0D511600F56BCD /* MovieService.swift */,
);
path = Network;
sourceTree = "<group>";
};
F470037929F3A4EA0034E787 /* Week3 */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -358,8 +369,8 @@
F4BE7E2D2A09535D00688732 /* Protocols */ = {
isa = PBXGroup;
children = (
F4BE7E2B2A09386900688732 /* UserInfo.swift */,
F4BE7E2E2A09537400688732 /* LogOut.swift */,
F4BE7E2B2A09386900688732 /* Enums.swift */,
F4BE7E2E2A09537400688732 /* Protocols.swift */,
);
path = Protocols;
sourceTree = "<group>";
Expand Down Expand Up @@ -529,7 +540,7 @@
F4064F8E29E14988006BB626 /* SecondViewController_Ex1.swift in Sources */,
F4064F7629E134BF006BB626 /* SecondViewController_DelegatePtn.swift in Sources */,
F4064F7F29E1387D006BB626 /* SecondViewController_Closure.swift in Sources */,
F4BE7E2C2A09386900688732 /* UserInfo.swift in Sources */,
F4BE7E2C2A09386900688732 /* Enums.swift in Sources */,
F4DDC4A82A03FA8600E97D1A /* ProfileView.swift in Sources */,
F470034E29F26AF80034E787 /* NicknameViewController.swift in Sources */,
F4BE7E452A0A923600688732 /* PosterCollectionViewCell.swift in Sources */,
Expand All @@ -542,7 +553,7 @@
F49F47AA2A00BE25006379C7 /* CarrotViewController.swift in Sources */,
F4BE7DEB2A06291500688732 /* SignUpService.swift in Sources */,
F4064F7429E1340D006BB626 /* FirstViewController_DelegatePtn.swift in Sources */,
F4BE7E2F2A09537400688732 /* LogOut.swift in Sources */,
F4BE7E2F2A09537400688732 /* Protocols.swift in Sources */,
F4F7863729F10F94002E2A61 /* String+.swift in Sources */,
F470037F29F3ABCC0034E787 /* BaseViewController.swift in Sources */,
F44B4E2F29D7FA29003658CD /* AppDelegate.swift in Sources */,
Expand Down Expand Up @@ -581,6 +592,7 @@
F4B5F9402A051491008DA7B7 /* AnotherTableViewCell.swift in Sources */,
F4B5F9422A052D83008DA7B7 /* LogOutButtonView.swift in Sources */,
F470038629F3B1C60034E787 /* Carrot.swift in Sources */,
F4587CAC2A0D511600F56BCD /* MovieService.swift in Sources */,
F470039329F3C00B0034E787 /* PhotoViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -734,6 +746,8 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MovieAPI_Key = 75df104409445c36a314b12eb0aa5fdb;
Movie_URL = "https://api.themoviedb.org/3/discover/movie";
OTHER_LDFLAGS = "-Xlinker-interposable";
PRODUCT_BUNDLE_IDENTIFIER = "sopt.seminar.Sopt-Seminar";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -765,6 +779,8 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
MovieAPI_Key = 75df104409445c36a314b12eb0aa5fdb;
Movie_URL = "https://api.themoviedb.org/3/discover/movie";
OTHER_LDFLAGS = "-Xlinker-interposable";
PRODUCT_BUNDLE_IDENTIFIER = "sopt.seminar.Sopt-Seminar";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,4 @@
uuid = "03F0E121-6951-4635-A1D8-E0CE9AD0D4C7"
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
uuid = "FDBF13C5-92B8-47B6-B37B-B66ABA2F638E"
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Sopt_Seminar/Week4/NetworkResult&lt;T&gt;.swift"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "24"
endingLineNumber = "24"
landmarkName = "SignUpResponse"
landmarkType = "14">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// MovieService.swift
// Sopt_Seminar
//
// Created by 김응관 on 2023/05/12.
//

import Alamofire
import Foundation

final class MovieService {

static let shared = MovieService()

private init() {}

//75df104409445c36a314b12eb0aa5fdb

func getInfo(key: String, completion: @escaping (NetworkState<Any>) -> Void) {



}



}
26 changes: 26 additions & 0 deletions Sopt_Seminar/Sopt_Seminar/Week3/Assignment/Protocols/Enums.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
//
// UserInfo.swift
// Sopt_Seminar
//
// Created by 김응관 on 2023/05/08.
//

import Foundation

enum LoginState: String {
case logIn
case logOut
}

enum NetworkState<T> {
case success(T) // 서버 통신 성공
case requestErr(T) // 요청에러 발생
case pathErr // 경로 에러
case serverErr // 서버 내부 에러
case networkErr // 네트워크 연결 실패
}


// API 키: 75df104409445c36a314b12eb0aa5fdb
// API 요청 예시: https://api.themoviedb.org/3/movie/550?api_key=75df104409445c36a314b12eb0aa5fdb
// API 읽기 액세스 토큰: eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI3NWRmMTA0NDA5NDQ1YzM2YTMxNGIxMmViMGFhNWZkYiIsInN1YiI6IjY0NWQxNDg2M2ZlMTYwMDE3MjI2N2FhMSIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.VAMyXI3CfXx3hI3LNDWVJDxMt7a-uy1Pq2ay6NTJ18M

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ final class WeatherService {
private init() {}

//q=seoul&appid=0d268b100aab2067be1aeebe6b626058
//https://api.themoviedb.org/3/discover/movie

func getInfo(key: String,
city: String,
Expand Down

0 comments on commit 7830680

Please sign in to comment.