URLString: String { let baseURL = "http://shopping.yahooapis.jp/ShoppingWebService/V1/json/" switch self { case ItemSearch: return baseURL + "itemSearch" } } var Method: Alamofire.Method { switch self { case .ItemSearch: return .GET } } var URLRequest: NSMutableURLRequest { let request = NSMutableURLRequest(URL: NSURL(string: URLString)!) switch self { case .ItemSearch(let parameters): return Alamofire.ParameterEncoding.URL.encode(request, parameters: parameters).0 } }