Created
October 10, 2016 07:38
-
-
Save mitulmanish/b7495d15cc2442706d58ebabc5fb7daa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func imageInsights() { | |
let params = ["api_key": "d1a562a2f9cc209934068cbb573c29386ef112f3", | |
"url": "http://www.windowsmode.com/wp-content/uploads/2015/08/Puppy-Eye-Beagle.jpg", | |
"version": "2016-05-19"] | |
Alamofire.request(.GET, "https://gateway-a.watsonplatform.net/visual-recognition/api/v3/classify", parameters: params).response { (request, response, data, error) in | |
do { | |
let serverData = try NSJSONSerialization.JSONObjectWithData(data!, options: .AllowFragments) as? [String: AnyObject] | |
if let data = serverData { | |
print(data) | |
} | |
} catch { | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment