<commit_before>//
//  WebApiUrlManager.swift
//  objectmapperTest
//
//  Created by <NAME> on 29/04/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

private let kKey = CompresJSON.sharedInstance().settings.encryptionKey

public class WebApiManager: NSObject {
   
    var domain: String?
    var restKey: String?
    //var webApiManagerDelegate: WebApiManagerDelegate?
    
    //temp for compresjson
    var encryptComponents = false
    
    public func setupUrlsForREST(restKey: String, overrideDomain: String?) -> WebApiManager {
        
        self.domain = overrideDomain
        self.restKey = restKey
        
        return self
    }
    
    public func setupUrlsForREST(key: String) -> WebApiManager {
        
        return setupUrlsForREST(key, overrideDomain: nil)
    }
    
    private func getDomain() -> String{
        
        var domain = ""
        
        if let d = WebApiDefaults.sharedInstance().domain {
            
            domain = d
        }
        
        if let d = self.domain {
            
            domain = d<commit_msg>public<commit_after>//
//  WebApiUrlManager.swift
//  objectmapperTest
//
//  Created by <NAME> on 29/04/2015.
//  Copyright (c) 2015 <NAME>. All rights reserved.
//

import UIKit

private let kKey = CompresJSON.sharedInstance().settings.encryptionKey

public class WebApiManager: NSObject {
   
    public var domain: String?
    public var restKey: String?
    //var webApiManagerDelegate: WebApiManagerDelegate?
    
    //temp for compresjson
    public var encryptComponents = false
    
    public func setupUrlsForREST(restKey: String, overrideDomain: String?) -> WebApiManager {
        
        self.domain = overrideDomain
        self.restKey = restKey
        
        return self
    }
    
    public func setupUrlsForREST(key: String) -> WebApiManager {
        
        return setupUrlsForREST(key, overrideDomain: nil)
    }
    
    private func getDomain() -> String{
        
        var domain = ""
        
        if let d = WebApiDefaults.sharedInstance().domain {
            
            domain = d
        }
        
        if let d = self.domain {
            
            domain = d
{'fraction_non_alphanumeric': 0.08416289592760182, 'fraction_numerical': 0.01085972850678733, 'mean_word_length': 1.893979057591623, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2262243', 'n_tokens_mistral': 646, 'n_tokens_neox': 613, 'n_words': 162}