Ejemplo n.º 1
0
 def test_browse_includes(self):
     area = "74e50e58-5deb-4b99-93a2-decbb365c07f"
     musicbrainzngs.browse_events(area=area,
                                  includes=["aliases", "area-rels"])
     self.assertEqual(
         "http://musicbrainz.org/ws/2/event/?area=74e50e58-5deb-4b99-93a2-decbb365c07f&inc=aliases+area-rels",
         self.opener.get_url())
Ejemplo n.º 2
0
 def test_browse_limit_offset(self):
     """Limit and offset values"""
     area = "74e50e58-5deb-4b99-93a2-decbb365c07f"
     musicbrainzngs.browse_events(area=area, limit=50, offset=100)
     self.assertEqual(
         "http://musicbrainz.org/ws/2/event/?area=74e50e58-5deb-4b99-93a2-decbb365c07f&limit=50&offset=100",
         self.opener.get_url())
Ejemplo n.º 3
0
 def pull_page(self, mbid, seed_type, limit, offset):
     args = dict(includes=["event-rels", "place-rels", "artist-rels"], \
       limit=limit, offset=offset)
     if seed_type == 'venue':
         args['place'] = mbid
     else:
         args[seed_type] = mbid
     result = musicbrainzngs.browse_events(**args)
     return result
Ejemplo n.º 4
0
def musicbrainz_ids_by_isrc():
    res = musicbrainzngs.search_recordings(query='')
    res = musicbrainzngs.browse_events(
        area=None,
        artist='650e7db6-b795-4eb5-a702-5ea2fc46c848',
        place=None,
        includes=[],
        limit=100,
        offset=None)
    pp.pprint(res)
Ejemplo n.º 5
0
    def test_browse_event(self):
        area = "f03d09b3-39dc-4083-afd6-159e3f0d462f"
        musicbrainzngs.browse_events(area=area)
        self.assertEqual("http://musicbrainz.org/ws/2/event/?area=f03d09b3-39dc-4083-afd6-159e3f0d462f", self.opener.get_url())

        artist = "0383dadf-2a4e-4d10-a46a-e9e041da8eb3"
        musicbrainzngs.browse_events(artist=artist)
        self.assertEqual("http://musicbrainz.org/ws/2/event/?artist=0383dadf-2a4e-4d10-a46a-e9e041da8eb3", self.opener.get_url())

        place = "8a6161bb-fb50-4234-82c5-1e24ab342499"
        musicbrainzngs.browse_events(place=place)
        self.assertEqual("http://musicbrainz.org/ws/2/event/?place=8a6161bb-fb50-4234-82c5-1e24ab342499", self.opener.get_url())
Ejemplo n.º 6
0
    def test_browse_event(self):
        area = "f03d09b3-39dc-4083-afd6-159e3f0d462f"
        musicbrainzngs.browse_events(area=area)
        self.assertEqual(
            "http://musicbrainz.org/ws/2/event/?area=f03d09b3-39dc-4083-afd6-159e3f0d462f",
            self.opener.get_url())

        artist = "0383dadf-2a4e-4d10-a46a-e9e041da8eb3"
        musicbrainzngs.browse_events(artist=artist)
        self.assertEqual(
            "http://musicbrainz.org/ws/2/event/?artist=0383dadf-2a4e-4d10-a46a-e9e041da8eb3",
            self.opener.get_url())

        place = "8a6161bb-fb50-4234-82c5-1e24ab342499"
        musicbrainzngs.browse_events(place=place)
        self.assertEqual(
            "http://musicbrainz.org/ws/2/event/?place=8a6161bb-fb50-4234-82c5-1e24ab342499",
            self.opener.get_url())
Ejemplo n.º 7
0
 def test_browse(self):
     area = "74e50e58-5deb-4b99-93a2-decbb365c07f"
     musicbrainzngs.browse_events(area=area)
     self.assertEqual(
         "http://musicbrainz.org/ws/2/event/?area=74e50e58-5deb-4b99-93a2-decbb365c07f",
         self.opener.get_url())
Ejemplo n.º 8
0
 def test_browse_limit_offset(self):
     """Limit and offset values"""
     area = "74e50e58-5deb-4b99-93a2-decbb365c07f"
     musicbrainzngs.browse_events(area=area, limit=50, offset=100)
     self.assertEqual("http://musicbrainz.org/ws/2/event/?area=74e50e58-5deb-4b99-93a2-decbb365c07f&limit=50&offset=100", self.opener.get_url())
Ejemplo n.º 9
0
 def test_browse_single_include(self):
     area = "74e50e58-5deb-4b99-93a2-decbb365c07f"
     musicbrainzngs.browse_events(area=area, includes="aliases")
     self.assertEqual("http://musicbrainz.org/ws/2/event/?area=74e50e58-5deb-4b99-93a2-decbb365c07f&inc=aliases", self.opener.get_url())
Ejemplo n.º 10
0
 def test_browse(self):
     area = "74e50e58-5deb-4b99-93a2-decbb365c07f"
     musicbrainzngs.browse_events(area=area)
     self.assertEqual("http://musicbrainz.org/ws/2/event/?area=74e50e58-5deb-4b99-93a2-decbb365c07f", self.opener.get_url())