     ) -> InstagramerRequest<InstagramerMedia> {
         
         var partialURL = "media/search"
-        var parameters = accessParams()
+        var parameters = _oAuth.accessParameters
         if let valid = lat { parameters["lat"] = lat }
         if let valid = lng { parameters["lng"] = lng }
         if let valid = distance { parameters["distance"] = distance }


}

public class InstagramerModel: NSObject {
    
}

public class InstagramerModelCreate<T: InstagramerModel> {
    
    public class func create(json: JSON) -> [T] {
        var models = [T]()
        NSLog(json.debugDescription)
        for (index: String, subJson: JSON) in json["data"] {
//            NSLog(subJson.debugDescription)
            let type = subJson["type"].string


public class Instagramer {
    
    // MARK: init and auth
    
    private var _oAuth : InstagramerOAuth
    public var oAuth : InstagramerOAuth { return _oAuth }
    
    public init(clientId: String) {
        _oAuth = InstagramerOAuth(clientId: clientId)
    }

    public func oAuth(accessToken: String) {
        return _oAuth.oauth(accessToken)
    }

    public func oAuth(accessTokenSaveKey: String?, forceRefleshAccessToken: Bool = false, redirectURI: String, permitted: (() -> Void), denied: (() -> Void)) -> Bool {
        return _oAuth.oauth(accessTokenSaveKey, forceRefleshAccessToken: forceRefleshAccessToken, redirectURI: redirectURI, permitted, denied)
    }
    
    public func oAuthHandle(callbackURL: NSURL?) -> Bool {
        return _oAuth.oauthHandle(callbackURL)
    }
    
    // MARK: request
    
    private let _endPointURL = "https://api.instagram.com/v1/"

    public func mediaPopuler() -> InstagramerRequest<InstagramerMedia> {
        var partialURL = "media/popular"
        return request(partialURL, parameters: _oAuth.accessParameters)
        
    }
    
