SoundCloudExplode 1.3.1

.NET 5.0 .NET Core 3.0 .NET Standard 2.0 .NET Framework 4.6.1
NuGet\Install-Package SoundCloudExplode -Version 1.3.1
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.
dotnet add package SoundCloudExplode --version 1.3.1
<PackageReference Include="SoundCloudExplode" Version="1.3.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SoundCloudExplode --version 1.3.1
#r "nuget: SoundCloudExplode, 1.3.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install SoundCloudExplode as a Cake Addin
#addin nuget:?package=SoundCloudExplode&version=1.3.1

// Install SoundCloudExplode as a Cake Tool
#tool nuget:?package=SoundCloudExplode&version=1.3.1

SoundCloudExplode

Version Downloads

SoundCloudExplode is a library that provides an interface to query metadata of SoundCloud tracks and playlistschannels, as well as to resolve and download streams.

🌟STAR THIS REPOSITORY TO SUPPORT THE DEVELOPER AND ENCOURAGE THE DEVELOPMENT OF THE APPLICATION!

Install

  • πŸ“¦ NuGet: dotnet add package SoundCloudExplode (main package)

Usage

SoundCloudExplode exposes its functionality through a single entry point β€” the SoundCloudClient class. Create an instance of this class and use the provided operations to send requests.

Tracks

Retrieving track metadata

To retrieve the metadata associated with a Soundcloud track, call Tracks.GetAsync(...):

using SoundCloudExplode;

var soundcloud = new SoundCloudClient();

var track = await soundcloud.Tracks.GetAsync("https://soundcloud.com/purityy79/dororo-op-piano-sheet-in-description");

var title = track.Title;
var duration = track.Duration;

Playlists

Retrieving playlist metadata

You can get the metadata associated with a Soundcloud playlist by calling Playlists.GetAsync(...) method:

using SoundCloudExplode;

var soundcloud = new SoundCloudClient();

var playlist = await soundcloud.Playlists.GetAsync(
    "https://soundcloud.com/tommy-enjoy/sets/aimer"
);

var title = playlist.Title;
var artworkUrl = playlist.ArtworkUrl;
...
Getting tracks included in a playlist

To get the tracks included in a playlist, call Playlists.GetTracksAsync(...):

using SoundCloudExplode;
using SoundCloudExplode.Common;

var soundcloud = new SoundCloudClient();

// Get all playlist tracks
var tracks = await soundcloud.Playlists.GetTracksAsync(
    "https://soundcloud.com/tommy-enjoy/sets/aimer"
);

// Get only the first 20 playlist tracks
var tracksSubset = await soundcloud.Playlists
    .GetTracksAsync("https://soundcloud.com/tommy-enjoy/sets/aimer")
    .CollectAsync(20);

You can also enumerate the tracks iteratively without waiting for the whole list to load:

using SoundCloudExplode;

var soundcloud = new SoundCloudClient();

await foreach (var track in soundcloud.Playlists.GetTracksAsync(
    "https://soundcloud.com/tommy-enjoy/sets/aimer"
))
{
    var title = track.Title;
    var duration = track.Duration;
}

If you need precise control over how many requests you send to Soundcloud, use Playlists.GetTrackBatchesAsync(...) which returns tracks wrapped in batches:

using SoundCloudExplode;

var soundcloud = new SoundCloudClient();

// Each batch corresponds to one request
await foreach (var batch in soundcloud.Playlists.GetTrackBatchesAsync(
    "https://soundcloud.com/tommy-enjoy/sets/aimer"
))
{
    foreach (var track in batch.Items)
    {
        var title = track.Title;
        var duration = track.Duration;
    }
}
Downloading tracks
using System;
using System.IO;
using SoundCloudExplode;

var soundcloud = new SoundCloudClient();

var track = await soundcloud.GetAsync("https://soundcloud.com/purityy79/dororo-op-piano-sheet-in-description");

var trackName = string.Join("_", track.Title.Split(Path.GetInvalidFileNameChars()));

await soundcloud.DownloadAsync(track, $@"{Environment.CurrentDirectory}\Download\{trackName}.mp3");

You can request the download url for a particular track by calling Tracks.GetDownloadUrlAsync(...):

using SoundCloudExplode;

var soundcloud = new SoundCloudClient();

var track = await soundcloud.Tracks.GetAsync("https://soundcloud.com/purityy79/dororo-op-piano-sheet-in-description");

var downloadUrl = await soundcloud.Tracks.GetDownloadUrlAsync(
    track
);
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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.3.1 61 9/14/2022
1.3.0 48 9/13/2022
1.2.5 93 6/16/2022
1.2.4 74 6/14/2022
1.2.3 75 6/14/2022
1.2.0 86 5/25/2022