 	private var attempts = NSCache()
 	internal var maximumAttempt: Int = 5
     private let manager: Manager
+    public let traktApiVersion = 2
 
 	public typealias GeneratedCodeResponse = (deviceCode: String, userCode: String, verificationUrl: String, expiresAt: NSDate, interval: NSTimeInterval)
 	public typealias JSONHash = [String: AnyObject!]

		self.token = token
	}

	internal lazy var dateFormatter: NSDateFormatter = {
		let df = NSDateFormatter()
		df.locale = NSLocale(localeIdentifier: "en_US_POSIX")
		df.timeZone = NSTimeZone(forSecondsFromGMT: 0)
		df.dateFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.000Z'"
		return df
	}()

	internal func query(route: TraktRoute, completionHandler: Response<AnyObject, NSError> -> Void) -> Request! {
		let request = route.URLRequest
		request.setValue("2", forHTTPHeaderField: "trakt-api-version")
		request.setValue(clientId, forHTTPHeaderField: "trakt-api-key")

		if route.needAuthorization() {

			}
		}

		let key = route.hashValue
		return manager.request(request).responseJSON { [weak self] response in
			if let interval = self?.retryInterval where response.response?.statusCode >= 500 && route.retryOnFailure() {
                var attempt: Int = self?.attempts.objectForKey(key) as? Int ?? 0
                attempt += 1
				self?.attempts.setObject(attempt, forKey: key)
				if attempt < self?.maximumAttempt {
					return delay(interval) {
						self?.query(route, completionHandler: completionHandler)
					}
				} else {
					print("Maximum attempt \(attempt)/\(self?.maximumAttempt) reached for request \(route)")
				}
			}
			self?.attempts.removeObjectForKey(key)
