Skip to content

Commit

Permalink
Merge pull request #28 from PiotrSzmyt/master
Browse files Browse the repository at this point in the history
Fixed method used to get closest trends (getTrendsClosestWithLat)
  • Loading branch information
mattdonnelly committed Sep 7, 2014
2 parents 077ede2 + 6590886 commit a770b78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Swifter/SwifterTrends.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ public extension Swifter {

A WOEID is a Yahoo! Where On Earth ID.
*/
public func getTrendsClosestWithLat(lat: Int, long: Int, success: ((trends: [JSONValue]?) -> Void)?, failure: FailureHandler?) {
public func getTrendsClosestWithLat(lat: Double, long: Double, success: ((trends: [JSONValue]?) -> Void)?, failure: FailureHandler?) {
let path = "trends/closest.json"

var parameters = Dictionary<String, AnyObject>()
parameters["lat"] = lat
parameters["long"] = long

self.getJSONWithPath(path, baseURL: self.apiURL, parameters: [:], uploadProgress: nil, downloadProgress: nil, success: {
self.getJSONWithPath(path, baseURL: self.apiURL, parameters: parameters, uploadProgress: nil, downloadProgress: nil, success: {
json, response in

success?(trends: json.array)
Expand Down

0 comments on commit a770b78

Please sign in to comment.