<commit_before>//
//  APIRequestManager.swift
//  nestedworld
//
//  Created by <NAME> on 17/02/2016.
//  Copyright © 2016 NestedWorld. All rights reserved.
//

class APIRequestManager
{
    enum APIRoot
    {
        case DEV
        case PROD
        
        func toString() -> String
        {
            switch self {
            case .DEV:
                return "http://eip-api-dev.kokakiwi.net/v1"
            case .PROD:
                return "http://eip-api.kokakiwi.net/v1"
            }
        }
    }
    
    private let rootURL: APIRoot = .PROD
    private var sessionToken: String = ""

    private var userManager: APIUserRequestManager
    private var monsterManager: APIMonsterRequestManager
    
    private let httpRequestManager: HttpRequestManagerProtocol = AlamofireHttpRequestManager()
    
    // MARK: ...
    init()
    {
        self.userManager = APIUserRequestManager(httpRequestManager: self.httpRequestManager, apiRootURL: self.rootURL.toString())
        self.monsterManager = APIMonsterRequestManager(httpRequestManager: self.httpRequestManager, apiRootURL: self.rootURL.toString())
    }
    
    // MARK: ...
    func setToken(token: String)
    {
        self.sessionToken = token
    }
    <commit_msg>change API root<commit_after>//
//  APIRequestManager.swift
//  nestedworld
//
//  Created by <NAME> on 17/02/2016.
//  Copyright © 2016 NestedWorld. All rights reserved.
//

class APIRequestManager
{
    enum APIRoot
    {
        case DEV
        case PROD
        
        func toString() -> String
        {
            switch self {
            case .DEV:
                return "http://eip-api-dev.kokakiwi.net/v1"
            case .PROD:
                return "http://eip-api.kokakiwi.net/v1"
            }
        }
    }
    
    private let rootURL: APIRoot = .DEV
    private var sessionToken: String = ""

    private var userManager: APIUserRequestManager
    private var monsterManager: APIMonsterRequestManager
    
    private let httpRequestManager: HttpRequestManagerProtocol = AlamofireHttpRequestManager()
    
    // MARK: ...
    init()
    {
        self.userManager = APIUserRequestManager(httpRequestManager: self.httpRequestManager, apiRootURL: self.rootURL.toString())
        self.monsterManager = APIMonsterRequestManager(httpRequestManager: self.httpRequestManager, apiRootURL: self.rootURL.toString())
    }
    
    // MARK: ...
    func setToken(token: String)
    {
        self.sessionToken = token
    }
    
{'fraction_non_alphanumeric': 0.09642426677380474, 'fraction_numerical': 0.01124949779027722, 'mean_word_length': 2.04029304029304, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5823394', 'n_tokens_mistral': 744, 'n_tokens_neox': 715, 'n_words': 154}