File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4040import static org .schabi .newpipe .extractor .utils .Utils .*;
4141
4242public class SoundcloudParsingHelper {
43- private static final String HARDCODED_CLIENT_ID =
44- "nGKlrpy2IotLQ0QGwBOmIgSFayis6H4e " ; // Updated on 04/11 /21
43+ static final String HARDCODED_CLIENT_ID =
44+ "1NKODbzHzEpoowFHxTAmS7oB08DObPuK " ; // Updated on 08/12 /21
4545 private static String clientId ;
4646 public static final String SOUNDCLOUD_API_V2_URL = "https://api-v2.soundcloud.com/" ;
4747
Original file line number Diff line number Diff line change 55import org .junit .Test ;
66import org .schabi .newpipe .downloader .DownloaderTestImpl ;
77import org .schabi .newpipe .extractor .NewPipe ;
8+ import org .schabi .newpipe .extractor .exceptions .ExtractionException ;
89
10+ import static org .junit .Assert .assertEquals ;
911import static org .junit .Assert .assertTrue ;
1012
13+ import java .io .IOException ;
14+
1115public class SoundcloudParsingHelperTest {
1216 @ BeforeClass
1317 public static void setUp () {
@@ -20,6 +24,14 @@ public void assertThatHardcodedClientIdIsValid() throws Exception {
2024 SoundcloudParsingHelper .checkIfHardcodedClientIdIsValid ());
2125 }
2226
27+ @ Test
28+ public void assertHardCodedClientIdMatchesCurrentClientId () throws IOException , ExtractionException {
29+ assertEquals (
30+ "Hardcoded client doesn't match extracted clientId" ,
31+ SoundcloudParsingHelper .HARDCODED_CLIENT_ID ,
32+ SoundcloudParsingHelper .clientId ());
33+ }
34+
2335 @ Test
2436 public void resolveUrlWithEmbedPlayerTest () throws Exception {
2537 Assert .assertEquals ("https://soundcloud.com/trapcity" , SoundcloudParsingHelper .resolveUrlWithEmbedPlayer ("https://api.soundcloud.com/users/26057743" ));
You can’t perform that action at this time.
0 commit comments