示例#1
0
def get_form(fid):
    """ Get specific information about a form.

    :param fid: A form id or uuid
    :returns: uuid, name, works.
    """
    return conn._dunya_query_json("api/makam/form/%s" % str(fid))
示例#2
0
def get_collection(slug):
    """Get the documents (recordings) in a collection.
    Arguments:
      slug: the name of the collection
    """
    path = "document/%s" % slug
    return conn._dunya_query_json(path)
示例#3
0
def get_work(wmbid):
    """ Get specific information about a work.
    Arguments:
      wmbid: A work mbid
    Returns: mbid, title, composer, raagas, taalas, recordings
    """
    return conn._dunya_query_json("api/carnatic/work/%s" % wmbid)
示例#4
0
def get_form(fid):
    """ Get specific information about a form.

    :param fid: A form id or uuid
    :returns: uuid, name, works.
    """
    return conn._dunya_query_json("api/makam/form/%s" % str(fid))
示例#5
0
def get_work(wmbid):
    """ Get specific information about a work.

    :param wmbid: A work mbid
    :returns: mbid, title, composer, raagas, taalas, recordings

    """
    return conn._dunya_query_json("api/makam/work/%s" % wmbid)
示例#6
0
def get_laya(lid):
    """ Get specific information about a laya.

    :param lid: A laya id or uuid
    :returns: id, name, recordings

    """
    return conn._dunya_query_json("api/hindustani/laya/%s" % str(lid))
示例#7
0
def get_work(wmbid):
    """ Get specific information about a work.

    :param wmbid: A work mbid
    :returns: mbid, title, composers, makams, forms, usuls, recordings

    """
    return conn._dunya_query_json("api/makam/work/%s" % wmbid)
示例#8
0
def get_laya(lid):
    """ Get specific information about a laya.

    :param lid: A laya id or uuid
    :returns: id, name, recordings

    """
    return conn._dunya_query_json("api/hindustani/laya/%s" % str(lid))
示例#9
0
def get_taal(tid):
    """ Get specific information about a taal.

    :param tid: A taal id or uuid
    :returns: uuid, name, recordings, composers

    """
    return conn._dunya_query_json("api/hindustani/taal/%s" % str(tid))
示例#10
0
def get_collection(slug):
    """Get the documents (recordings) in a collection.

    :param slug: the name of the collection

    """
    path = "document/%s" % slug
    return conn._dunya_query_json(path)
示例#11
0
def get_taal(tid):
    """ Get specific information about a taal.

    :param tid: A taal id or uuid
    :returns: uuid, name, recordings, composers

    """
    return conn._dunya_query_json("api/hindustani/taal/%s" % str(tid))
示例#12
0
def get_makam(mid):
    """ Get specific information about a makam.

    :param mid: A makam id or uuid
    :returns: uuid, name, works, taksims, gazels.

    the ``taksims`` and ``gazels`` lists are of recordings.
    """
    return conn._dunya_query_json("api/makam/makam/%s" % str(mid))
示例#13
0
def get_work(wmbid):
    """ Get specific information about a work.

    :param wmbid: A work mbid
        :returns: mbid, title, composers, raagas, taalas, recordings

    """
    return conn._dunya_query_json("api/carnatic/work/%s" % (wmbid))
    extra_headers = _get_collections()
示例#14
0
def get_work(wmbid):
    """ Get specific information about a work.

    :param wmbid: A work mbid
    :returns: mbid, title, recordings

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/work/%s" % wmbid, extra_headers=extra_headers)
示例#15
0
def get_makam(mid):
    """ Get specific information about a makam.

    :param mid: A makam id or uuid
    :returns: uuid, name, works, taksims, gazels.

    the ``taksims`` and ``gazels`` lists are of recordings.
    """
    return conn._dunya_query_json("api/makam/makam/%s" % str(mid))
示例#16
0
def get_recording(rmbid):
    """ Get specific information about a recording. 
    Arguments:
      rmbid: A recording mbid
    Returns: mbid, title, artists, raaga, taala, work
             artists includes performance relationships attached
             to the recording, the release, and the release artists.
    """
    return conn._dunya_query_json("api/carnatic/recording/%s" % rmbid)
示例#17
0
def document(recordingid):
    """Get the available source filetypes for a Musicbrainz recording
    Arguments:
      recordingid: Musicbrainz recording ID
    Returns:
      a list of filetypes in the database for this recording"""
    path = "document/by-id/%s" % recordingid
    recording = conn._dunya_query_json(path)
    return recording
示例#18
0
def get_instrument(iid):
    """ Get specific information about an instrument.
    Arguments:
      iid: An instrument id
    Returns: id, name, artists
             artists includes artists with recording- and release-
             level performance relationships of this instrument.
    """
    return conn._dunya_query_json("api/carnatic/instrument/%s" % str(iid))
示例#19
0
def get_concert(cmbid):
    """ Get specific information about a concert. 
    Arguments:
      cmbid: A concert mbid
    Returns: mbid, title, artists, tracks
             artists includes performance relationships attached
             to the recordings, the release, and the release artists.
    """
    return conn._dunya_query_json("api/carnatic/concert/%s" % cmbid)
示例#20
0
def get_taala(tid):
    """ Get specific information about a taala.
    Arguments:
      tid: A taala id
    Returns: id, name, artists, works, composers
             artists includes artists with recording- and release-
             level relationships to a recording with this raaga
    """
    return conn._dunya_query_json("api/carnatic/taala/%s" % str(tid))
示例#21
0
def get_artist(ambid):
    """ Get specific information about an artist.
    Arguments:
      ambid: An artist mbid
    Returns: mbid, name, concerts, instruments, recordings
             concerts, instruments and recordings include information
             from recording- and release-level relationships, as
             well as release artists
    """
    return conn._dunya_query_json("api/carnatic/artist/%s" % ambid)
示例#22
0
文件: makam.py 项目: EQ4/pycompmusic
def get_symbtr(uuid):
    """ Get a symbtr file info from id
    This function will automatically page through API results.
    
    :param uuid: A symbtr id
    
    returns: name and id of the symbtr file

    """
    return conn._dunya_query_json("api/makam/symbtr/%s" % uuid)
示例#23
0
def get_work(wmbid):
    """ Get specific information about a work.

    :param wmbid: A work mbid
    :returns: mbid, title, recordings

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/work/%s" % wmbid,
                                  extra_headers=extra_headers)
示例#24
0
def get_usul(uid):
    """ Get specific information about a usul.

    :param uid: An usul id or uuid
    :returns: uuid, name, works, taksims, gazels.

    the ``taksims`` and ``gazels`` lists are of recordings. They are
    only valid for the usul ``serbest``
    """
    return conn._dunya_query_json("api/makam/usul/%s" % str(uid))
示例#25
0
def get_usul(uid):
    """ Get specific information about a usul.

    :param uid: An usul id or uuid
    :returns: uuid, name, works, taksims, gazels.

    the ``taksims`` and ``gazels`` lists are of recordings. They are
    only valid for the usul ``serbest``
    """
    return conn._dunya_query_json("api/makam/usul/%s" % str(uid))
示例#26
0
def document(recordingid):
    """Get the available source filetypes for a Musicbrainz recording.

    :param recordingid: Musicbrainz recording ID
    :returns: a list of filetypes in the database for this recording

    """
    path = "document/by-id/%s" % recordingid
    recording = conn._dunya_query_json(path)
    return recording
示例#27
0
def get_symbtr(uuid):
    """ Get a symbtr file info from id
    This function will automatically page through API results.
    
    :param uuid: A symbtr id
    
    returns: name and id of the symbtr file

    """
    return conn._dunya_query_json("api/makam/symbtr/%s" % uuid)
示例#28
0
def get_form(fid):
    """ Get specific information about a form.

    :param fid: A form id or uuid
    :returns: uuid, name, artists, recordings.

         ``artists`` includes artists with recording- and release-
         level relationships to a recording with this form

    """
    return conn._dunya_query_json("api/hindustani/form/%s" % str(fid))
示例#29
0
def get_instrument(iid):
    """ Get specific information about an instrument.

    :param iid: An instrument id
    :returns: id, name, artists.

         ``artists`` includes artists with recording- and release-
         level performance relationships of this instrument.

    """
    return conn._dunya_query_json("api/makam/instrument/%s" % str(iid))
示例#30
0
def get_composer(cmbid):
    """ Get specific information about an composer.

    :param cmbid: A composer mbid
    :returns: mbid, name, works, lyric_works

         ``works`` contains a list of works that the composer has written.
         ``lyric_works`` are works where they were lyricist.

    """
    return conn._dunya_query_json("api/makam/composer/%s" % cmbid)
示例#31
0
def get_release(cmbid):
    """ Get specific information about a release.

    :param cmbid: A release mbid
    :returns: mbid, title, artists, tracks.

         ``artists`` includes performance relationships attached
         to the recordings, the release, and the release artists.

    """
    return conn._dunya_query_json("api/makam/release/%s" % cmbid)
示例#32
0
def get_raag(rid):
    """ Get specific information about a raag.
    Arguments:
    :param rid: A raag id or uuid
    :returns: uuid, name, artists, recordings, composers

             ``artists`` includes artists with recording-level
             relationships to a recording with this raag

    """
    return conn._dunya_query_json("api/hindustani/raag/%s" % str(rid))
示例#33
0
def get_form(fid):
    """ Get specific information about a form.

    :param fid: A form id or uuid
    :returns: uuid, name, artists, recordings.

         ``artists`` includes artists with recording- and release-
         level relationships to a recording with this form

    """
    return conn._dunya_query_json("api/hindustani/form/%s" % str(fid))
示例#34
0
def get_raag(rid):
    """ Get specific information about a raag.
    Arguments:
    :param rid: A raag id or uuid
    :returns: uuid, name, artists, recordings, composers

             ``artists`` includes artists with recording-level
             relationships to a recording with this raag

    """
    return conn._dunya_query_json("api/hindustani/raag/%s" % str(rid))
示例#35
0
def get_instrument(iid):
    """ Get specific information about an instrument.

    :param iid: An instrument id
    :returns: id, name, artists.

         ``artists`` includes artists with recording- and release-
         level performance relationships of this instrument.

    """
    return conn._dunya_query_json("api/makam/instrument/%s" % str(iid))
示例#36
0
def get_release(cmbid):
    """ Get specific information about a release.

    :param cmbid: A release mbid
    :returns: mbid, title, artists, tracks.

         ``artists`` includes performance relationships attached
         to the recordings, the release, and the release artists.

    """
    return conn._dunya_query_json("api/makam/release/%s" % cmbid)
示例#37
0
def get_taala(tid):
    """ Get specific information about a taala.

    :param tid: A taala id or uuid
    :returns: uuid, name, artists, works, composers.

         ``artists`` includes artists with recording- and release-
         level relationships to a recording with this raaga

    """
    return conn._dunya_query_json("api/carnatic/taala/%s" % str(tid))
示例#38
0
def get_composer(cmbid):
    """ Get specific information about an composer.

    :param cmbid: A composer mbid
    :returns: mbid, name, works, lyric_works

         ``works`` contains a list of works that the composer has written.
         ``lyric_works`` are works where they were lyricist.

    """
    return conn._dunya_query_json("api/makam/composer/%s" % cmbid)
示例#39
0
def get_recording(rmbid):
    """ Get specific information about a recording.

    :param rmbid: A recording mbid

    :returns: mbid, title, artists, raaga, taala, work.

         ``artists`` includes performance relationships
         attached to the recording, the release, and the release artists.

    """
    return conn._dunya_query_json("api/makam/recording/%s" % rmbid)
示例#40
0
def get_release(cmbid):
    """ Get specific information about a release.

    :param cmbid: A release mbid
    :returns: mbid, title, artists, tracks, release artists

         ``artists`` includes performance relationships attached
         to the recordings, the release, and the release artists.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/release/%s" % cmbid, extra_headers=extra_headers)
示例#41
0
def get_artist(ambid):
    """ Get specific information about an artist.

    :param ambid: An artist mbid
    :returns: mbid, name, releases, instruments.

         ``releases``, ``instruments`` and ``recordings`` include
         information from recording- and release-level
         relationships, as well as release artists

    """
    return conn._dunya_query_json("api/makam/artist/%s" % ambid)
示例#42
0
def get_recording(rmbid):
    """ Get specific information about a recording.

    :param rmbid: A recording mbid

    :returns: mbid, title, releases, performers, work.

         ``artists`` includes performance relationships
         attached to the recording, the release, and the release artists.

    """
    return conn._dunya_query_json("api/makam/recording/%s" % rmbid)
示例#43
0
def get_raaga(rid):
    """ Get specific information about a raaga.

    :param rid: A raaga id or uuid

    :returns: uuid, name, artists, works, composers.

         ``artists`` includes artists with recording- and release-
         level relationships to a recording with this raaga

    """
    return conn._dunya_query_json("api/carnatic/raaga/%s" % str(rid))
示例#44
0
def get_artist(ambid):
    """ Get specific information about an artist.

    :param ambid: An artist mbid
    :returns: mbid, name, releases, instruments, recordings.

         ``releases``, ``instruments`` and ``recordings`` include
         information from recording- and release-level
         relationships, as well as release artists

    """
    return conn._dunya_query_json("api/makam/artist/%s" % ambid)
示例#45
0
def get_concert(cmbid):
    """ Get specific information about a concert.

    :param cmbid: A concert mbid
    :returns: mbid, title, artists, tracks.

         ``artists`` includes performance relationships attached
         to the recordings, the release, and the release artists.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/carnatic/concert/%s" % cmbid,
                                  extra_headers=extra_headers)
示例#46
0
def get_release(cmbid):
    """ Get specific information about a release.

    :param cmbid: A release mbid
    :returns: mbid, title, artists, tracks, release artists

         ``artists`` includes performance relationships attached
         to the recordings, the release, and the release artists.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/release/%s" % cmbid,
                                  extra_headers=extra_headers)
示例#47
0
def get_work(wmbid, with_bootlegs=False):
    """ Get specific information about a work.

    :param wmbid: A work mbid
    :param with_bootlegs: If True and you are authenticated as a staff user
        include bootleg recordings in the returned data
    :returns: mbid, title, composers, raagas, taalas, recordings

    """
    if with_bootlegs:
        bootleg = "?with_bootlegs=True"
    else:
        bootleg = ""
    return conn._dunya_query_json("api/carnatic/work/%s%s" % (wmbid, bootleg))
示例#48
0
def get_recording(rmbid):
    """ Get specific information about a recording.

    Arguments:
    :param rmbid: A recording mbid

    :returns: mbid, title, artists, raags, taals, layas, forms and works.

         ``artists`` include performance relationships attached
         to the recording, the release, and the release artists.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/recording/%s" % rmbid, extra_headers=extra_headers)
示例#49
0
def get_recording(rmbid):
    """ Get specific information about a recording.

    :param rmbid: A recording mbid

    :returns: mbid, title, artists, raaga, taala, work.

         ``artists`` includes performance relationships
         attached to the recording, the release, and the release artists.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/carnatic/recording/%s" % rmbid,
                                  extra_headers=extra_headers)
示例#50
0
def get_artist(ambid):
    """ Get specific information about an artist.

    Arguments:
    :param ambid: An artist mbid

    :returns: mbid, name, releases, instruments, recordings

             ``releases``, ``instruments`` and ``recordings`` include
             information from recording- and release-level
             relationships, as well as release artists

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/artist/%s" % ambid, extra_headers=extra_headers)
示例#51
0
def get_artist(ambid):
    """ Get specific information about an artist.

    :param ambid: An artist mbid
    
    :returns: mbid, name, concerts, instruments, recordings.

         ``concerts``, ``instruments`` and ``recordings`` include
         information from recording- and release-level
         relationships, as well as release artists

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/carnatic/artist/%s" % (ambid),
                                  extra_headers=extra_headers)
示例#52
0
def get_recording(rmbid):
    """ Get specific information about a recording.

    Arguments:
    :param rmbid: A recording mbid

    :returns: mbid, title, artists, raags, taals, layas, forms and works.

         ``artists`` include performance relationships attached
         to the recording, the release, and the release artists.

    """
    extra_headers = _get_collections()
    return conn._dunya_query_json("api/hindustani/recording/%s" % rmbid,
                                  extra_headers=extra_headers)
示例#53
0
def get_artist(ambid, with_bootlegs=False):
    """ Get specific information about an artist.

    :param ambid: An artist mbid
    :param with_bootlegs: If True and you are authenticated as a staff user
        include bootleg concerts and recordings in the returned data
    :returns: mbid, name, concerts, instruments, recordings.

         ``concerts``, ``instruments`` and ``recordings`` include
         information from recording- and release-level
         relationships, as well as release artists

    """
    if with_bootlegs:
        bootleg = "?with_bootlegs=True"
    else:
        bootleg = ""
    return conn._dunya_query_json("api/carnatic/artist/%s%s" % (ambid, bootleg))