Search Method

48.85N, 2.29E
LatLon.net
48.85

NSURLQueryItem(name: “name”,value:”value”)
public var queryItems:[NSURLQueryItem]?

import Foundation

var components = URLComponents()
components.scheme = "https"
components.host = "api.flickr.com"
components.path = "/services/rest"
components.queryItems = [URLQueryItem]()

let queryItem1 = URLQueryItem(name: "method", value: "flickr.photo.search")
let queryItem2 = URLQueryItem(name: "api_key", value: "1234")
let queryItem3 = URLQueryItem(name: "text", value: "purple")

components.queryItems!.append(queryItem1)
components.queryItems!.append(queryItem1)
components.queryItems!.append(queryItem1)

print(components.url!)