Beispiel #1
0
def get_concerts():
    """ Get a list of Carnatic concerts in the database.
    This function will automatically page through API results.
    Returns: A list of dictionaries containing concert information.
    {"mbid": Musicbrainz concert id,
     "title": title of the concert
    }
    For additional information about each concert use the
    `get_concert` method. """
    return conn._get_paged_json("api/carnatic/concert")
Beispiel #2
0
def get_raagas():
    """ Get a list of Carnatic raagas in the database.
    This function will automatically page through API results.
    Returns: A list of dictionaries containing raaga information.
    {"id": raaga id,
     "name": name of the raaga
    }
    For additional information about each raaga use the
    `get_raaga` method. """
    return conn._get_paged_json("api/carnatic/raaga")
Beispiel #3
0
def get_instruments():
    """ Get a list of Carnatic instruments in the database.
    This function will automatically page through API results.
    Returns: A list of dictionaries containing instrument information.
    {"id": instrument id,
     "name": Name of the instrument
    }
    For additional information about each instrument use the
    `get_instrument` method. """
    return conn._get_paged_json("api/carnatic/instrument")
Beispiel #4
0
def get_artists():
    """ Get a list of Carnatic artists in the database.
    This function will automatically page through API results.
    Returns: A list of dictionaries containing artist information.
    {"mbid": Musicbrainz artist id,
     "name": Name of the artist
    }
    For additional information about each artist use the
    `get_artist` method. """
    return conn._get_paged_json("api/carnatic/artist")
Beispiel #5
0
def get_recordings():
    """ Get a list of carnatic recordings in the database.
    This function will automatically page through API results.
    Returns: A list of dictionaries containing recording information.
    {"mbid": Musicbrainz recording id,
     "title": Title of the recording
    }
    For additional information about each recording use the
    `get_recording` method. """
    return conn._get_paged_json("api/carnatic/recording")
Beispiel #6
0
def get_works():
    """ Get a list of Carnatic works in the database.
    This function will automatically page through API results.
    Returns: A list of dictionaries containing work information.
    {"mbid": Musicbrainz work id,
     "name": work name
    }
    For additional information about each work use the
    `get_work` method. """
    return conn._get_paged_json("api/carnatic/work")
Beispiel #7
0
def get_symbtrs():
    """ Get a list of musicbrainz id - symbtr mappings in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing symbtr information::

        {"uuid": musicbrainz uuid (could be a work id or a recording id),
         "name": Name of the symbtr track
        }

    """
    return conn._get_paged_json("api/makam/symbtr")
Beispiel #8
0
def get_symbtrs():
    """ Get a list of musicbrainz id - symbtr mappings in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing symbtr information::

        {"uuid": musicbrainz uuid (could be a work id or a recording id),
         "name": Name of the symbtr track
        }

    """
    return conn._get_paged_json("api/makam/symbtr")
Beispiel #9
0
def get_artists():
    """ Get a list of makam artists in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing artist information::

        {"mbid": Musicbrainz artist id,
        "name": Name of the artist}

    For additional information about each artist use :func:`get_artist`

    """
    return conn._get_paged_json("api/makam/artist")
Beispiel #10
0
def get_composers():
    """ Get a list of makam composers in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing composers information::

        {"mbid": Musicbrainz composer id,
        "name": Name of the composer}

    For additional information about each composer use :func:`get_composer`

    """
    return conn._get_paged_json("api/makam/composer")
Beispiel #11
0
def get_composers():
    """ Get a list of makam composers in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing composers information::

        {"mbid": Musicbrainz composer id,
        "name": Name of the composer}

    For additional information about each composer use :func:`get_composer`

    """
    return conn._get_paged_json("api/makam/composer")
Beispiel #12
0
def get_taalas():
    """ Get a list of Carnatic taalas in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing taala information::

        {"uuid": taala uuid,
         "name": name of the taala
        }

    For additional information about each taala use :func:`get_taala`.

    """
    return conn._get_paged_json("api/carnatic/taala")
Beispiel #13
0
def get_forms():
    """ Get a list of Hindustani forms in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing form information::

        {"uuid": form  uuid,
         "name": name of the form
        }

    For additional information about each form use :func:`get_form`

    """
    return conn._get_paged_json("api/hindustani/form")
Beispiel #14
0
def get_layas():
    """ Get a list of Hindustani layas in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing laya information::

        {"id": laya id,
         "name": name of the laya
        }

    For additional information about each laya use :func:`get_laya`.

    """
    return conn._get_paged_json("api/hindustani/laya")
Beispiel #15
0
def get_taals():
    """ Get a list of Hindustani taals in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing taal information::

        {"uuid": taal uuid,
         "name": name of the taal
        }

    For additional information about each taal use :func:`get_taal`.

    """
    return conn._get_paged_json("api/hindustani/taal")
Beispiel #16
0
def get_raags():
    """ Get a list of Hindustani raags in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing raag information::

        {"uuid": raag uuid,
         "name": name of the raag
        }

    For additional information about each raag use :func:`get_raag`.

    """
    return conn._get_paged_json("api/hindustani/raag")
Beispiel #17
0
def get_forms():
    """ Get a list of Hindustani forms in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing form information::

        {"uuid": form  uuid,
         "name": name of the form
        }

    For additional information about each form use :func:`get_form`

    """
    return conn._get_paged_json("api/hindustani/form")
Beispiel #18
0
def get_layas():
    """ Get a list of Hindustani layas in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing laya information::

        {"id": laya id,
         "name": name of the laya
        }

    For additional information about each laya use :func:`get_laya`.

    """
    return conn._get_paged_json("api/hindustani/laya")
Beispiel #19
0
def get_usuls():
    """ Get a list of makam usuls in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing usul information::

        {"uuid": usul uuid,
         "name": Name of the usul
        }

    For additional information about each usul use :func:`get_usul`

    """
    return conn._get_paged_json("api/makam/usul")
Beispiel #20
0
def get_taalas():
    """ Get a list of Carnatic taalas in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing taala information::

        {"uuid": taala uuid,
         "name": name of the taala
        }

    For additional information about each taala use :func:`get_taala`.

    """
    return conn._get_paged_json("api/carnatic/taala")
Beispiel #21
0
def get_recordings():
    """ Get a list of makam recordings in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing recording information::

        {"mbid": Musicbrainz recording id,
         "title": Title of the recording
        }

    For additional information about each recording use :func:`get_recording`.

    """
    return conn._get_paged_json("api/makam/recording")
Beispiel #22
0
def get_releases():
    """ Get a list of makam 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`

    """
    return conn._get_paged_json("api/makam/release")
Beispiel #23
0
def get_instruments():
    """ Get a list of makam instruments in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing instrument information::

        {"id": instrument id,
         "name": Name of the instrument
        }

    For additional information about each instrument use :func:`get_instrument`

    """
    return conn._get_paged_json("api/makam/instrument")
Beispiel #24
0
def get_usuls():
    """ Get a list of makam usuls in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing usul information::

        {"uuid": usul uuid,
         "name": Name of the usul
        }

    For additional information about each usul use :func:`get_usul`

    """
    return conn._get_paged_json("api/makam/usul")
Beispiel #25
0
def get_taals():
    """ Get a list of Hindustani taals in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing taal information::

        {"uuid": taal uuid,
         "name": name of the taal
        }

    For additional information about each taal use :func:`get_taal`.

    """
    return conn._get_paged_json("api/hindustani/taal")
Beispiel #26
0
def get_instruments():
    """ Get a list of makam instruments in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing instrument information::

        {"id": instrument id,
         "name": Name of the instrument
        }

    For additional information about each instrument use :func:`get_instrument`

    """
    return conn._get_paged_json("api/makam/instrument")
Beispiel #27
0
def get_makams():
    """ Get a list of makam makams in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing makam information::

        {"uuid": makam uuid,
         "name": Name of the makam
        }

    For additional information about each makam use :func:`get_makam`

    """
    return conn._get_paged_json("api/makam/makam")
Beispiel #28
0
def get_works_by_query(mid='', uid='', fid='', cmbid='', ambid=''):
    """ Get the works filtered according to the input makam uuid, usul uuid
	form uuid, composer mbid and artist mbid

    :param mid: A makam id or uuid
    :param uid: An usul id or uuid
    :param fid: A form id or uuid
    :param cmbid: A composer mbid
    :param ambid: An artist mbid
    :return: A list of dictionaries containing work/s
    """
    path = 'work?usul={0}&performer={1}&form={2}&artist={3}&makam={4}'
    path = path.format(uid, ambid, fid, cmbid, mid)
    return conn._get_paged_json("api/makam/" + path)
Beispiel #29
0
def get_works():
    """ Get a list of makam works in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing work information::

        {"mbid": Musicbrainz work id,
         "name": work name
        }

    For additional information about each work use :func:`get_work`.

    """
    return conn._get_paged_json("api/makam/work")
Beispiel #30
0
def get_makams():
    """ Get a list of makam makams in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing makam information::

        {"uuid": makam uuid,
         "name": Name of the makam
        }

    For additional information about each makam use :func:`get_makam`

    """
    return conn._get_paged_json("api/makam/makam")
Beispiel #31
0
def get_works():
    """ Get a list of makam works in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing work information::

        {"mbid": Musicbrainz work id,
         "name": work name
        }

    For additional information about each work use :func:`get_work`.

    """
    return conn._get_paged_json("api/makam/work")
Beispiel #32
0
def get_raags():
    """ Get a list of Hindustani raags in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing raag information::

        {"uuid": raag uuid,
         "name": name of the raag
        }

    For additional information about each raag use :func:`get_raag`.

    """
    return conn._get_paged_json("api/hindustani/raag")
Beispiel #33
0
def get_works():
    """ Get a list of Hindustani works in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing work information::

        {"mbid": Musicbrainz work id,
        "name": work name
        }

    For additional information about each work use :func:`get_work`.

    """
    extra_headers = _get_collections()
    return conn._get_paged_json("api/hindustani/work", extra_headers=extra_headers)
Beispiel #34
0
def get_artists():
    """ Get a list of Hindustani artists in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing artist information::

        {"mbid": Musicbrainz artist id,
         "name": Name of the artist
        }

    For additional information about each artist use :func:`get_artist`.

    """
    extra_headers = _get_collections()
    return conn._get_paged_json("api/hindustani/artist", extra_headers=extra_headers)
Beispiel #35
0
def get_releases():
    """ Get a list of Hindustani 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/hindustani/release", extra_headers=extra_headers)
Beispiel #36
0
def get_artists():
    """ Get a list of Hindustani artists in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing artist information::

        {"mbid": Musicbrainz artist id,
         "name": Name of the artist
        }

    For additional information about each artist use :func:`get_artist`.

    """
    extra_headers = _get_collections()
    return conn._get_paged_json("api/hindustani/artist",
                                extra_headers=extra_headers)
Beispiel #37
0
def get_concerts():
    """ Get a list of Carnatic concerts in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing concert information::

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

    For additional information about each concert use :func:`get_concert`

    """
    extra_headers = _get_collections()
    return conn._get_paged_json("api/carnatic/concert",
                                extra_headers=extra_headers)
Beispiel #38
0
def get_works():
    """ Get a list of Hindustani works in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing work information::

        {"mbid": Musicbrainz work id,
        "name": work name
        }

    For additional information about each work use :func:`get_work`.

    """
    extra_headers = _get_collections()
    return conn._get_paged_json("api/hindustani/work",
                                extra_headers=extra_headers)
Beispiel #39
0
def get_recordings():
    """ Get a list of carnatic recordings in the database.
    This function will automatically page through API results.

    returns: A list of dictionaries containing recording information::

        {"mbid": Musicbrainz recording id,
         "title": Title of the recording
        }

    For additional information about each recording use :func:`get_recording`.

    """
    extra_headers = _get_collections()
    return conn._get_paged_json("api/carnatic/recording",
                                extra_headers=extra_headers)
Beispiel #40
0
def get_releases():
    """ Get a list of Hindustani 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/hindustani/release",
                                extra_headers=extra_headers)
Beispiel #41
0
def get_recordings(with_bootlegs=False):
    """ Get a list of carnatic recordings in the database.
    This function will automatically page through API results.

    :param with_bootlegs: If True and you are authenticated as a staff user
        include recordings from bootleg concerts

    returns: A list of dictionaries containing recording information::

        {"mbid": Musicbrainz recording id,
         "title": Title of the recording
        }

    For additional information about each recording use :func:`get_recording`.

    """
    if with_bootlegs:
        bootleg = "?with_bootlegs=True"
    else:
        bootleg = ""
    return conn._get_paged_json("api/carnatic/recording%s" % (bootleg, ))
Beispiel #42
0
def get_concerts(with_bootlegs=False):
    """ Get a list of Carnatic concerts in the database.
    This function will automatically page through API results.

    :param with_bootlegs: If True and you are authenticated as a staff user
        include bootleg concerts

    returns: A list of dictionaries containing concert information::

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

    For additional information about each concert use :func:`get_concert`

    """
    if with_bootlegs:
        bootleg = "?with_bootlegs=True"
    else:
        bootleg = ""
    return conn._get_paged_json("api/carnatic/concert%s" % (bootleg, ))
Beispiel #43
0
def get_collections():
    """Get a list of all collections in the server"""
    path = "document/collections"
    return conn._get_paged_json(path)
Beispiel #44
0
def get_collections():
    """Get a list of all collections in the server."""
    path = "document/collections"
    return conn._get_paged_json(path)