# Path: compmusic/dunya/conn.py
# HOSTNAME = "https://dunya.compmusic.upf.edu"
# TOKEN = None
#     HOSTNAME = hostname
#     TOKEN = token
# class HTTPError(Exception):
# class ConnectionError(Exception):
# def set_hostname(hostname):
# def set_token(token):
# def _get_paged_json(path, **kwargs):
# def _dunya_url_query(url, extra_headers=None):
# def _dunya_post(url, data=None, files=None):
# def _make_url(path, **kwargs):
# def _dunya_query_json(path, **kwargs):
# def _dunya_query_file(path, **kwargs):


import errno
import logging
import os
import compmusic.dunya.docserver
from requests.exceptions import HTTPError
from compmusic.dunya import conn
        args['detail'] = '1'
    return conn._get_paged_json("api/jingju/artist", extra_headers=extra_headers, **args)


def get_artist(ambid):
    """ Get specific information about an artist.

    :param ambid: An artist mbid

    :returns: alias, instrument, mbid, name, recordings, role_type.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/jingju/artist/%s" % (ambid), extra_headers=extra_headers)


def get_releases():
    """ Get a list of Jingju releases in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing release information::

        {"mbid": Musicbrainz release id,
         "title": title of the release
        }

    For additional information about each release use :func:`get_release`

    """
    extra_headers = _get_collections()

# Path: compmusic/dunya/conn.py
# HOSTNAME = "https://dunya.compmusic.upf.edu"
# TOKEN = None
#     HOSTNAME = hostname
#     TOKEN = token
# class HTTPError(Exception):
# class ConnectionError(Exception):
# def set_hostname(hostname):
# def set_token(token):
# def _get_paged_json(path, **kwargs):
# def _dunya_url_query(url, extra_headers=None):
# def _dunya_post(url, data=None, files=None):
# def _make_url(path, **kwargs):
# def _dunya_query_json(path, **kwargs):
# def _dunya_query_file(path, **kwargs):


# Path: compmusic/dunya/jingju.py
import errno
import logging
import os
import compmusic.dunya.docserver
from requests.exceptions import HTTPError
from compmusic.dunya import conn

        args['detail'] = '1'
    return conn._get_paged_json("api/jingju/artist", extra_headers=extra_headers, **args)


def get_artist(ambid):
    """ Get specific information about an artist.

    :param ambid: An artist mbid

    :returns: alias, instrument, mbid, name, recordings, role_type.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/jingju/artist/%s" % (ambid), extra_headers=extra_headers)


def get_releases():
    """ Get a list of Jingju releases in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing release information::

        {"mbid": Musicbrainz release id,
         "title": title of the release
        }

    For additional information about each release use :func:`get_release`

    """
    extra_headers = _get_collections()

    return conn._get_paged_json("api/jingju/release", extra_headers=extra_headers)