예제 #1
0
    def test_update_token(self):
        client = Client(username='******', password='******')
        token = client.update_access_token()

        self.assertTrue(token is not None)
        print "Token: '%s'" % token
        pass
예제 #2
0
    def test_resolve_url(self):
        client = Client(access_token=self.TOKEN)

        url = 'http://soundcloud.com/qdance/luna-presents-minus-is-more-december-2014-yearmix'
        #url = 'http://soundcloud.com/julyukie/sets/juliana-yamasaki-new-tracks'
        json_data = client.resolve_url(url)
        pass
예제 #3
0
    def test_resolve_url(self):
        client = Client(access_token=self.TOKEN)

        url = 'http://soundcloud.com/qdance/luna-presents-minus-is-more-december-2014-yearmix'
        #url = 'http://soundcloud.com/julyukie/sets/juliana-yamasaki-new-tracks'
        json_data = client.resolve_url(url)
        pass
예제 #4
0
    def test_update_token(self):
        client = Client(username='******', password='******')
        token = client.update_access_token()

        self.assertTrue(token is not None)
        print "Token: '%s'" % token
        pass
예제 #5
0
    def test_follow(self):
        client = Client(access_token=self.TOKEN)
        json_data = client.follow_user(1701116, False)
        self.assertGreater(len(json_data), 0)

        json_data = client.follow_user(1701116, True)
        self.assertGreater(len(json_data), 0)
        pass
예제 #6
0
    def test_follow(self):
        client = Client(access_token=self.TOKEN)
        json_data = client.follow_user(1701116, False)
        self.assertGreater(len(json_data), 0)

        json_data = client.follow_user(1701116, True)
        self.assertGreater(len(json_data), 0)
        pass
예제 #7
0
    def test_get_playlists(self):
        # me
        client = Client(access_token=self.TOKEN)
        json_data = client.get_playlists('me')
        self.assertGreater(len(json_data), 0)

        # some user
        json_data = client.get_playlists(2442230)
        self.assertGreater(len(json_data), 0)
        pass
예제 #8
0
    def test_get_playlists(self):
        # me
        client = Client(access_token=self.TOKEN)
        json_data = client.get_playlists('me')
        self.assertGreater(len(json_data), 0)

        # some user
        json_data = client.get_playlists(2442230)
        self.assertGreater(len(json_data), 0)
        pass
예제 #9
0
    def test_get_likes(self):
        client = Client(access_token=self.TOKEN)

        # me
        json_data = client.get_user('me')
        user_id = json_data['id']
        json_data = client.get_likes(user_id)
        self.assertGreater(len(json_data), 0)

        # some user
        json_data = client.get_likes('520685', page=2)
        self.assertGreater(len(json_data), 0)
        pass
예제 #10
0
    def test_get_likes(self):
        client = Client(access_token=self.TOKEN)

        # me
        json_data = client.get_user('me')
        user_id = json_data['id']
        json_data = client.get_likes(user_id)
        self.assertGreater(len(json_data), 0)

        # some user
        json_data = client.get_likes('520685', page=2)
        self.assertGreater(len(json_data), 0)
        pass
예제 #11
0
 def test_get_recommended_for_track(self):
     client = Client(access_token=self.TOKEN)
     json_data = client.get_recommended_for_track(193347852, page=1)
     pass
예제 #12
0
 def test_search(self):
     client = Client()
     json_data = client.search('bäume', category='sounds')
     pass
예제 #13
0
 def test_get_track_url(self):
     client = Client()
     json_data = client.get_track_url(77773864)
     pass
예제 #14
0
 def test_get_genre(self):
     client = Client()
     json_data = client.get_genre('techno')
     pass
예제 #15
0
 def test_get_trending(self):
     client = Client()
     json_data = client.get_trending('audio')
     pass
예제 #16
0
    def test_false_token(self):
        client = Client(access_token=self.FALSE_TOKEN)

        # me
        self.assertRaises(ClientException, client.get_user, 'me')
        pass
예제 #17
0
 def test_get_trending(self):
     client = Client()
     json_data = client.get_trending('audio')
     pass
예제 #18
0
    def test_user(self):
        client = Client(access_token=self.TOKEN)
        json_data = client.get_user('me')

        self.assertGreater(len(json_data), 0)
        pass
예제 #19
0
 def test_get_genre(self):
     client = Client()
     json_data = client.get_genre('techno')
     pass
예제 #20
0
 def test_get_stream(self):
     client = Client(access_token=self.TOKEN)
     json_data = client.get_stream()
     pass
예제 #21
0
 def test_get_track_url(self):
     client = Client()
     json_data = client.get_track_url(77773864)
     pass
예제 #22
0
    def test_tracks(self):
        client = Client(access_token=self.TOKEN)
        json_data = client.get_tracks('me')

        json_data = client.get_tracks(1701116)
        pass
예제 #23
0
 def test_get_stream(self):
     client = Client(access_token=self.TOKEN)
     json_data = client.get_stream()
     pass
예제 #24
0
 def test_get_recommended_for_track(self):
     client = Client(access_token=self.TOKEN)
     json_data = client.get_recommended_for_track(193347852, page=1)
     pass
예제 #25
0
 def test_search(self):
     client = Client()
     json_data = client.search('bäume', category='sounds')
     pass
예제 #26
0
    def test_tracks(self):
        client = Client(access_token=self.TOKEN)
        json_data = client.get_tracks('me')

        json_data = client.get_tracks(1701116)
        pass
예제 #27
0
    def test_user(self):
        client = Client(access_token=self.TOKEN)
        json_data = client.get_user('me')

        self.assertGreater(len(json_data), 0)
        pass
예제 #28
0
 def test_get_playlist(self):
     client = Client(access_token=self.TOKEN)
     json_data = client.get_playlist(55019726)
     self.assertGreater(len(json_data), 0)
     pass
예제 #29
0
 def test_get_playlist(self):
     client = Client(access_token=self.TOKEN)
     json_data = client.get_playlist(55019726)
     self.assertGreater(len(json_data), 0)
     pass