Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwcnewton/sc-java
Java port of https://github.com/jwcnewton/sc-node
https://github.com/jwcnewton/sc-java
Last synced: about 1 month ago
JSON representation
Java port of https://github.com/jwcnewton/sc-node
- Host: GitHub
- URL: https://github.com/jwcnewton/sc-java
- Owner: jwcnewton
- Created: 2019-03-31T20:31:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-05-20T20:56:18.000Z (over 2 years ago)
- Last Synced: 2024-10-30T06:58:59.296Z (about 2 months ago)
- Language: Java
- Size: 18.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![](https://jitpack.io/v/jwcnewton/sc-java.svg)](https://jitpack.io/#jwcnewton/sc-java)
# sc-java
Java port of https://github.com/jwcnewton/sc-node## Usage
Getting user details
```java
String clientId = "";
String userName = "newtnn";SoundcloudScrapper scs = new SoundcloudScrapper(clientId);
UserModel user = scs.GetUserDetails(userName);
System.out.println(user.username);
```Getting all users likes
```java
String clientId = "";
String userName = "newtnn";SoundcloudScrapper scs = new SoundcloudScrapper(clientId);
List likes = scs.GetUsersLikes(userName);
System.out.println(likes.size());
```Getting tracks in a playlist
```java
String clientId = "";
String playlistUri = "https://soundcloud.com/newtnn/sets/thick-mix";SoundcloudScrapper scs = new SoundcloudScrapper(clientId);
PlaylistModel playlist = scs.GetPlaylistTracks(playlistUri);
System.out.println(playlist.tracks.size());
```Downloading the latest liked track
```java
String clientId = "";
String userName = "newtnn";
String outputFolder = "/users/test/Documents/music";SoundcloudScrapper scs = new SoundcloudScrapper(clientId);
List likes = scs.GetUsersLikes(userName);
StreamService streamService = new StreamService(clientId);
streamService.ParseUrlStreamToFile(likes.get(0), outputFolder);
```## Maven (Jitpack)
```xml
...
jitpack.io
https://jitpack.io
com.github.jwcnewton
sc-java
latest...
```## Gradle (Jitpack)
```gradle
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}dependencies {
implementation 'com.github.jwcnewton:sc-java:latest'
}
```## Dependancies
[Google Rest Client](https://developers.google.com/api-client-library/java/google-http-java-client/)