I am creating an app for my YouTube channel and I am using Alamofire (which I installed using CocoaPods) and the YouTube API
I am having some trouble, though. I am using Swift 3 (xcode 8) and whenever I do the Alamofire.request Ii get an error "Extra argument 'method' in call". Here's the code:
Alamofire.request("https://www.googleapis.com/youtube/v3/playlistItems", method: .get, parameters: ["part":"snippet", "playlistId":"UUjZO5rUYPPAgCSOvHmkHU3A", "key":"AIzaSyBGmnL1R2vdSbhVdrRykBsOHovyFHbDdAg"], encoding: URLEncoding, headers: nil)
With Swift 3, this is what the request looks like without me filling in any detail.
Alamofire.request (url: URLConvertible, method: HTTPMethod, parameters: Parameters? , encoding: ParameterEncoding , headers: HTTPHeaders)
Can you please help me fix this issue?