# Path: utils/config_file.py
# CONF_FILE  = 'config/hcbpy.conf'
# def touch(fname, times=None):
#     def __init__(self, key, val, comment):
# def get_all_data(filename=CONF_FILE):
# def get_field(field_name, filename=CONF_FILE):
# def init_field(key, val="none", filename=CONF_FILE):
# def has(field_name, filename=CONF_FILE):
# def get_lines(filename):
# def get_comment(field_name, filename=CONF_FILE):
# def set_field(field_name, value, filename=CONF_FILE):
# class ConfigEntry:
# 
# Path: vk_api/api.py
# class Account(User):
#     token = ''
# 
#     def from_json(d):
#         s = Account()
#         s.__dict__.update(d)
#         return s


import json as j
from utils import config_file
from vk_api.api import Account


# Name for key of acc list
ACCOUNT_LIST = "account list"


class AccountManager:

    def __init__(self, location=config_file.CONF_FILE):
        self.location = location

    # location of file with users
    location = config_file.CONF_FILE

    def get_account_list_raw(self, accs):
        if accs == None:
            return []
        accs = accs.replace("'", '"')
        result = []
        json = j.loads(accs)

        for object in json:

# Path: utils/config_file.py
# CONF_FILE  = 'config/hcbpy.conf'
# def touch(fname, times=None):
#     def __init__(self, key, val, comment):
# def get_all_data(filename=CONF_FILE):
# def get_field(field_name, filename=CONF_FILE):
# def init_field(key, val="none", filename=CONF_FILE):
# def has(field_name, filename=CONF_FILE):
# def get_lines(filename):
# def get_comment(field_name, filename=CONF_FILE):
# def set_field(field_name, value, filename=CONF_FILE):
# class ConfigEntry:
# 
# Path: vk_api/api.py
# class Account(User):
#     token = ''
# 
#     def from_json(d):
#         s = Account()
#         s.__dict__.update(d)
#         return s


# Path: vk_auth/account_manager.py
import json as j
from utils import config_file
from vk_api.api import Account



# Name for key of acc list
ACCOUNT_LIST = "account list"


class AccountManager:

    def __init__(self, location=config_file.CONF_FILE):
        self.location = location

    # location of file with users
    location = config_file.CONF_FILE

    def get_account_list_raw(self, accs):
        if accs == None:
            return []
        accs = accs.replace("'", '"')
        result = []
        json = j.loads(accs)

        for object in json:

            result.append(j.loads(str(object).replace("'", '"'), object_hook=Account.from_json))