Skip to content

Commit 799f7d1

Browse files
committed
Updated main test code
1 parent 487ca25 commit 799f7d1

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

src/test/java/com/spotify/Main.java

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,19 @@
11
package com.spotify;
22

33
import com.spotify.json.JSONObject;
4-
import com.spotify.requests.tracks.TrackGet;
4+
import com.spotify.requests.AbstractRequest;
5+
import com.spotify.requests.tracks.SeveralTrackAudioFeaturesGet;
56

67
public class Main {
78

8-
private static final String CLIENT_ID = "49d248093d8c41dd8b65aba37c5ef665";
9-
private static final String CLIENT_SECRET = "381ccdf476ac4584b0d936663d5c2232";
10-
private static final String REDIRECT_URL = "http://127.0.0.1:8888/redirect/";
119

1210
public static void main(String[] args) throws IllegalAccessException {
13-
SpotifyClient spotifyClient = new SpotifyClientBuilder(CLIENT_ID, CLIENT_SECRET, REDIRECT_URL)
14-
.printAccessToken()
15-
.getBuiltClient();
11+
SpotifyClient sc = new SpotifyClientBuilderTester().getBuiltClient();
1612

17-
// SpotifyClient spotifyClient = SpotifyClientBuilder.buildFromToken("BQCcVsMYETyr6W-Fs0pS50oxEtDw1TVbZVcLEqZj3VUVAEKbpID9EnQys1f0Nvd6SRu-whdTJabKaTp1I0kJYZ4K9W645SG08deHOL35tMIlvBbeMBpP8tbgRhgUFce1jPB4iPXwoASSJ0otYCL7BCBC4C2jG2fQ0NPfeNHDaJZ9voY");
1813

19-
// AbstractRequest trackGet = new TrackGet("2mgkRsjpp6HH1MTyHYpTeF");
20-
// JSONObject jsonObject = spotifyClient.executeRequest(trackGet);
21-
// System.out.println(jsonObject.toString(4));
14+
AbstractRequest al = new SeveralTrackAudioFeaturesGet("05lBXOMA1uHpVPEQZyjoh3", "1ljziaoMnRH95aPeOSGAtr1");
2215

23-
TrackGet al = new TrackGet("05lBXOMA1uHpVPEQZyjoh3");
24-
25-
// AlbumsSavedMeGet al = new AlbumsSavedMeGet();
26-
JSONObject jsonObject = spotifyClient.executeRequest(al).ok();
16+
JSONObject jsonObject = sc.executeRequest(al).ok();
2717
System.out.println(jsonObject.toString(4));
2818

2919

0 commit comments

Comments
 (0)