Пример #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