# Path: kano_profile/paths.py
# TRACKER_UUIDS_PATH = os.path.join(kanoprofile_dir, 'tracker', 'uuids')
# PAUSED_SESSIONS_FILE = os.path.join(kanoprofile_dir, '.paused_sessions')
# 
# Path: kano_world/connection.py
# def _remove_sensitive_data(request_debug):
# def request_wrapper(method, endpoint, data=None, headers=None,
#                     session=None, files=None, params=None):
# 
# Path: kano_world/functions.py
# def get_glob_session():
#     return glob_session
# 
# def get_kano_world_id():
#     try:
#         kw_id = load_profile()['kanoworld_id']
#     except Exception:
#         kw_id = ''
#     return kw_id


import os
from slugify import slugify
from kano.utils import get_home, download_url, ensure_dir, read_json, write_json
from kano_profile.paths import app_profiles_file
from kano.logging import logger
from .connection import request_wrapper, content_type_json
from .functions import get_glob_session, get_kano_world_id
    if user_id:
        payload['user_id'] = user_id

    success, text, data = request_wrapper(
        'get', '/share', headers=content_type_json, params=payload
    )
    if not success:
        return success, text, None

    if 'entries' in data:
        return True, None, data

    return False, _("Something wrong with listing shares!"), None


def get_comments(share_id):
    success, text, data = request_wrapper(
        'get', '/comments/share/{}'.format(share_id)
    )

    if not success:
        return success, text, None

    if 'entries' in data:
        return True, None, data['entries']

    return False, _("Something wrong retrieving comments!"), None


def post_comment(share_id, comment):

# Path: kano_profile/paths.py
# TRACKER_UUIDS_PATH = os.path.join(kanoprofile_dir, 'tracker', 'uuids')
# PAUSED_SESSIONS_FILE = os.path.join(kanoprofile_dir, '.paused_sessions')
# 
# Path: kano_world/connection.py
# def _remove_sensitive_data(request_debug):
# def request_wrapper(method, endpoint, data=None, headers=None,
#                     session=None, files=None, params=None):
# 
# Path: kano_world/functions.py
# def get_glob_session():
#     return glob_session
# 
# def get_kano_world_id():
#     try:
#         kw_id = load_profile()['kanoworld_id']
#     except Exception:
#         kw_id = ''
#     return kw_id


# Path: kano_world/share.py
import os
from slugify import slugify
from kano.utils import get_home, download_url, ensure_dir, read_json, write_json
from kano_profile.paths import app_profiles_file
from kano.logging import logger
from .connection import request_wrapper, content_type_json
from .functions import get_glob_session, get_kano_world_id

    if user_id:
        payload['user_id'] = user_id

    success, text, data = request_wrapper(
        'get', '/share', headers=content_type_json, params=payload
    )
    if not success:
        return success, text, None

    if 'entries' in data:
        return True, None, data

    return False, _("Something wrong with listing shares!"), None


def get_comments(share_id):
    success, text, data = request_wrapper(
        'get', '/comments/share/{}'.format(share_id)
    )

    if not success:
        return success, text, None

    if 'entries' in data:
        return True, None, data['entries']

    return False, _("Something wrong retrieving comments!"), None


def post_comment(share_id, comment):

    glob_session = get_glob_session()