 // MARK: Router
 
 enum IssueRouter: Router {
-    case ReadAuthenticatedIssues(Configuration)
+    case ReadAuthenticatedIssues(Configuration, String, String)
     
     var method: HTTPMethod {
         return .GET

    
    /**
     Fetches the issues of the authenticated user
     - parameter completion: Callback for the outcome of the fetch.
     */
    public func myIssues(completion: (response: Response<[Issue]>) -> Void) {
        let router = IssueRouter.ReadAuthenticatedIssues(configuration)
        router.loadJSON([[String: AnyObject]].self) { json, error in
            if let error = error {
                completion(response: Response.Failure(error))
            } else {
                if let json = json {
                    let parsedIssue = json.map { Issue($0) }
                    completion(response: Response.Success(parsedIssue))
                }
            }
        }

    
    var configuration: Configuration {
        switch self {
        case .ReadAuthenticatedIssues(let config, _, _):
            return config
        }
    }
    
    var params: [String: String] {
        switch self {
        case .ReadAuthenticatedIssues(_, let page, let perPage):
            return ["per_page": perPage, "page": page]
        }
    }
    
    var path: String {
        switch self {
        case .ReadAuthenticatedIssues:
            return "issues"
        }
    }
}

