def get_accounts(self, get_detail=False):  # {{{
        # Issue service request.
        req_id = str(self.request_id)

        input = {
            'args': {
                'types': [
                    'BANK',
                    'CREDIT',
                    'INVESTMENT',
                    'LOAN',
                    'MORTGAGE',
                    'OTHER_PROPERTY',
                    'REAL_ESTATE',
                    'VEHICLE',
                    'UNCLASSIFIED'
                ]
            },
            'id': req_id,
            'service': 'MintAccountService',
            'task': 'getAccountsSorted'
            # 'task': 'getAccountsSortedByBalanceDescending'
        }

        data = {'input': json.dumps([input])}
        account_data_url = ('https://wwws.mint.com/bundledServiceController.'
                            'xevent?legacy=false&token=' + self.token)
        response = self.post(account_data_url, data=data,
                             headers=self.json_headers).text
        self.request_id = self.request_id + 1
        if req_id not in response:
            raise Exception('Could not parse account data: ' + response)

        # Parse the request
        response = json.loads(response)
        accounts = response['response'][req_id]['response']

        # Return datetime objects for dates
        for account in accounts:
            for df in DATE_FIELDS:
                if df in account:
                    # Convert from javascript timestamp to unix timestamp
                    # http://stackoverflow.com/a/9744811/5026
                    try:
                        ts = account[df] / 1e3
                    except __HOLE__:
                        # returned data is not a number, don't parse
                        continue
                    account[df + 'InDate'] = datetime.fromtimestamp(ts)
        if get_detail:
            accounts = self.populate_extended_account_detail(accounts)
        return accounts
dataset/ETHPy150Open mrooney/mintapi/mintapi/api.py/Mint.get_accounts