= "stars" case Forks = "forks" case Updated = "updated" } enum Order: String { case Ascending = "asc" case Descending = "desc" } typealias Response = [Repository] let query: String let sort: Sort let order: Order var URLRequest: NSURLRequest? { return GitHub.URLRequest(.GET, "/search/repositories", [ "q": query, "sort": sort.rawValue, "order": order.rawValue ]) } init(query: String, sort: Sort = .Stars, order: Order = .Ascending) { self.query = query self.sort = sort self.order = order } }