# 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
# share.py
#
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#




def list_shares(app_name=None, page=0, featured=False, user_id=None):
    payload = {
        'app_name': app_name,
        'page': page,
        'featured': int(featured),
        'limit': 10
    }
    if user_id:
        payload['user_id'] = user_id

    success, text, data = request_wrapper(

# 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

# share.py
#
# Copyright (C) 2014, 2015 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
#




def list_shares(app_name=None, page=0, featured=False, user_id=None):
    payload = {
        'app_name': app_name,
        'page': page,
        'featured': int(featured),
        'limit': 10
    }
    if user_id:
        payload['user_id'] = user_id

    success, text, data = request_wrapper(

        'get', '/share', headers=content_type_json, params=payload