I want to make an app that calls the API of forecast.io to get weather in my app. Someone said me to use SwiftyJSON and Alamofire . I'm new to programming and this is my first app so I don't really know how to do it right. That's my code for now , but I don't know if it is right or not , it works but the call isn't made and I need to enter the JSON data to get the "temperature" data:
// Get Weather
let URL = "https://api.forecast.io/forecast/apikey/\(lat),\(long)"
Alamofire.request(.GET, URL, parameters: nil)
.responseJSON { response in
let jsonData: AnyObject?
do {
jsonData = try NSJSONSerialization.JSONObjectWithData(response.data!, options: [])
} catch {
}
}
It only says that "jsonData" was never used. That's all I wrote for getting the call.