Skip to content

Commit

Permalink
[Fix] API GET 대상 URL 변경 #13
Browse files Browse the repository at this point in the history
  • Loading branch information
alpha-kwhn committed May 11, 2023
1 parent cda7722 commit 6e13bdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@ final class MovieService {
//75df104409445c36a314b12eb0aa5fdb
//ko

func getInfo(key: String, language: String, page: Int, completion: @escaping (NetworkState<Any>) -> Void) {
func getInfo(key: String, language: String, adult: Bool, video: Bool, page: Int, completion: @escaping (NetworkState<Any>) -> Void) {

let header: HTTPHeaders = [
"Content-Type": "application/json",
"Authorization": "Bearer 75df104409445c36a314b12eb0aa5fdb"
]

let url = MovieConfig.movieURL + "?language=\(language)&page=\(page)"
let url = MovieConfig.movieURL + "api_key=\(key)&include_adult=\(adult)&include_video=\(video)&language=\(language)&page=\(page)&sort_by=popularity.desc"

let dataRequest = AF.request(url, method: .get, headers: header)

Expand Down

0 comments on commit 6e13bdd

Please sign in to comment.