예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #8
0
파일: makam.py 프로젝트: EQ4/pycompmusic
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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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)
예제 #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")
예제 #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")
예제 #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")
예제 #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")
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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)
예제 #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, ))
예제 #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, ))
예제 #43
0
def get_collections():
    """Get a list of all collections in the server"""
    path = "document/collections"
    return conn._get_paged_json(path)
예제 #44
0
def get_collections():
    """Get a list of all collections in the server."""
    path = "document/collections"
    return conn._get_paged_json(path)