<commit_before>//
//  PermissionsRequest.swift
//  Rocket.Chat
//
//  Created by <NAME> on 5/1/18.
//  Copyright © 2018 Rocket.Chat. All rights reserved.
//

import SwiftyJSON

class PermissionsRequest: APIRequest {
    typealias APIResourceType = PermissionsResource

    let requiredVersion: Version = Version(0, 61, 0)
    let path = "/api/v1/permissions"
}

class PermissionsResource: APIResource {
    var permissions: [Permission] {
        return raw?.arrayValue.map {
            let permission = Permission()
            permission.map($0, realm: nil)
            return permission
        } ?? []
    }
}
<commit_msg>Update API endpoint of Permissions list<commit_after>//
//  PermissionsRequest.swift
//  Rocket.Chat
//
//  Created by <NAME> on 5/1/18.
//  Copyright © 2018 Rocket.Chat. All rights reserved.
//

import SwiftyJSON

class PermissionsRequest: APIRequest {
    typealias APIResourceType = PermissionsResource

    let requiredVersion: Version = Version(0, 61, 0)
    let path = "/api/v1/permissions.list"
}

class PermissionsResource: APIResource {
    var permissions: [Permission] {
        return raw?.arrayValue.map {
            let permission = Permission()
            permission.map($0, realm: nil)
            return permission
        } ?? []
    }
}

{'fraction_non_alphanumeric': 0.10972762645914397, 'fraction_numerical': 0.02178988326848249, 'mean_word_length': 2.582172701949861, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '4552154', 'n_tokens_mistral': 395, 'n_tokens_neox': 370, 'n_words': 101}