SCAPI_Core 1.0.1.47

dotnet add package SCAPI_Core --version 1.0.1.47                
NuGet\Install-Package SCAPI_Core -Version 1.0.1.47                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SCAPI_Core" Version="1.0.1.47" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SCAPI_Core --version 1.0.1.47                
#r "nuget: SCAPI_Core, 1.0.1.47"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SCAPI_Core as a Cake Addin
#addin nuget:?package=SCAPI_Core&version=1.0.1.47

// Install SCAPI_Core as a Cake Tool
#tool nuget:?package=SCAPI_Core&version=1.0.1.47                

SoundCloud C# API

Find SCAPI on Nuget as SCAPI_Core

NuGet Badge

Soundcloud API Changes

due to SoundCloud making changes to the API the authentication now needs to change. You need to use the /connect flow to be able to use this. If you have a working callback url you can just use the existing connect flow. If you have a non working callback url you can still use a browser.

https://api.soundcloud.com/connect?client_id={clientId}&redirect_uri={redirectUrl-UrlEncoded}&response_type=code&scope=&state=randomstring

Fill in the blanks aside from scope and state then visit the above link in a web browser to generate a connect id. After clicking the Connect and Continue it will use your redirect URl for the callback. In the web browser you can see the generated ID in the address bar if the callback fails

SCAPI.xml

this file is needed to persist the session token and store information on the refresh time. Storing the connect id and session token is needed to continue the /connect flow, without this you would have to reconnect for every request. You choose the location for this file with the Authenticate method and you can view its contents.

Commands

Authentication

SoundCloudClient.Authenticate(clientId, clientSecret, redirectUrl, connectCode, storagePath);

//optionally open internet browser with /connect url in case of failure: 

SoundCloudClient.Authenticate(clientId, clientSecret, redirectUrl, connectCode, storagePath, true);

Logging

SoundCloudClient.LogLevel = SCAPI.Contracts.LogLevel.All;        // outputs results errors and all debug information
SoundCloudClient.LogLevel = SCAPI.Contracts.LogLevel.Error;      // outputs results and errors
SoundCloudClient.LogLevel = SCAPI.Contracts.LogLevel.OutputOnly; // will only output results but no other infomration
Me Commands
UserObject me = Me.GetMe();
List<StreamTracks> activities = Me.GetMyActivities(10);
List<StreamTracks> activitiesAllOwn = Me.GetMyActivitiesAllOwn(10);
List<StreamTracks> activitiesTracks = Me.GetMyActivitiesTracks(10);
List<TrackObject> myLikedTracks = Me.GetMyLikedTracks(10);
List<PlaylistObject> myLikedPlaylists = Me.GetMyLikedPlaylists(10);
List<UserObject> followings = Me.GetMyFolowings(10);
List<TrackObject> tracks = Me.GetMyFolowingsTracks(10);
StatusResultObject followUserStatus = Me.FollowUser(Id);
StatusResultObject unFollowUserStatus = Me.UnFollowUser(Id);
List<UserObject> followers = Me.GetMyFollowers(10);
List<TrackObject> myTracks = Me.GetMyTracks(10);
List<PlaylistObject> myPlaylists = Me.GetMyPlaylists(10);
Search Commands
List<SearchObject> tracksQuery = Track.SearchTracks(testQuery, 10);
List<SearchObject> playlistsQuery = Playlist.SearchPlaylists(testQuery, 10);
List<SearchObject> usersQuery = User.SearchUsers(testQuery, 10);
Playlist Commands
PlaylistObject newPlaylist = Playlist.CreatePlaylist("Test Playlist", "Test Description", "private", new int[] { trackId, trackId });
PlaylistObject foundPlaylist = Playlist.GetPlaylist(Id);
StatusResultObject deleteStatus1 = Playlist.DeletePlaylist(Id);
PlaylistObject updatedPlaylist = Playlist.UpdatePlaylist(Id, "Test Updated Title", "Test Updated Description", "private", new int?[] { trackId, trackId });
PlaylistObject replacedPlaylist = Playlist.ReplacePlaylist(Id, "Test Replace Title", "Test Replace Description", "private", new int[] { trackId, trackId });
List<TrackObject> tracksFromPlaylist = Playlist.GetPlaylistTracks(Id);
List<UserObject> usersFromPlaylist = Playlist.GetPlaylistReposters(Id, 10);
Playlist.AddPlaylistToLikes(Id));
Playlist.RemovePlaylistFromLikes(Id));
Playlist.RepostPlaylist(Id)
Playlist.DeleteRepostedPlaylist(Id)
todo: PlaylistObject resolved =  Playlist.Resolve(id);
User Commands
UserObject foundUser = User.GetUser(Id);
List<UserObject> usersFollowers = User.GetFollowers(Id, 10);
List<UserObject> usersFollowings = User.GetFollowings(Id, 10);
List<PlaylistObject> usersPlaylists = User.GetPlaylists(Id, 10);
List<TrackObject> usersTracks = User.GetTracks(Id, 10);
List<WebProfileObject> usersWebProfiles = User.GetWebProfiles(Id, 10);
List<TrackObject> usersLikedTracks = User.GetLikedTracks(Id, 10);
List<PlaylistObject> usersLikedPlaylists = User.GetLikedPlaylists(Id, 10);
todo: UserObject resolved =  User.Resolve(id);
Track Commands
todo: Track.CreateTrack();
TrackObject t = Track.GetTrack(Id);
todo: Track.UpdateTrack();
todo: Track.DeleteTrack();
StreamUrlsObject streamUrlsFromTrack = Track.GetTrackStreamUrls(Id);
List<TrackCommentObject> commentsFromTrack = Track.GetTrackComments(Id, 10);
AddCommentResultObject result = Track.AddTrackComment(Id, "Test Comment", 10);
List<UserObject> usersWhoLikedTrack = Track.GetTrackLikers(Id, 10);
List<UserObject> usersWhoRepostedTrack = Track.GetTrackReposters(Id, 10);
List<TrackObject> relatedTracks = Track.GetTrackRelated(Id, 10);
Track.AddTrackToLikes(Id);
Track.RemoveTrackFromLikes(Id));
Track.RepostTrack(Id)
Track.DeleteRepostedTrack(Id)
todo: TrackObject resolved =  Track.Resolve(id);
DownloadResult result = Track
.GetTrack(Id)
.DownloadTo(@"\\Desktop\\");
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1.47 352 2/1/2023
1.0.1.46 307 1/11/2023
1.0.1.44 312 1/10/2023
1.0.1.43 306 1/9/2023
1.0.1.41 320 1/7/2023
1.0.1.40 304 1/7/2023
1.0.1.39 322 1/4/2023
1.0.1.38 841 11/14/2019
1.0.1.37 530 11/13/2019
1.0.1.36 541 11/13/2019
1.0.1.35 1,004 8/2/2017
1.0.1.34 910 8/2/2017
1.0.1.33 898 7/30/2017
1.0.1.32 923 7/29/2017
1.0.1.31 939 7/27/2017
1.0.1.30 947 7/27/2017
1.0.1.29 937 7/25/2017
1.0.1.28 927 7/25/2017
1.0.1.27 933 7/25/2017
1.0.1.26 916 7/25/2017
1.0.1.25 936 7/25/2017
1.0.1.24 926 7/25/2017
1.0.1.23 963 5/24/2017
1.0.1.22 1,080 5/20/2017
1.0.1.21 922 5/19/2017
1.0.1.20 902 5/19/2017
1.0.1.19 925 5/19/2017
1.0.1.18 937 5/18/2017
1.0.1.17 1,012 5/18/2017