From a13aadc986a18ec9eb414020d21837fa291277f1 Mon Sep 17 00:00:00 2001 From: eltoncezar Date: Thu, 17 Mar 2016 19:03:01 -0300 Subject: [PATCH] New method GetId Just a simple way to get the track id to use in the Web API. --- SpotifyAPI/Local/Models/Track.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SpotifyAPI/Local/Models/Track.cs b/SpotifyAPI/Local/Models/Track.cs index 8c18ac0e..22889017 100644 --- a/SpotifyAPI/Local/Models/Track.cs +++ b/SpotifyAPI/Local/Models/Track.cs @@ -157,5 +157,10 @@ namespace SpotifyAPI.Local.Models return wc.DownloadData(url); } } + + public string GetId() + { + return this.TrackResource.Uri.Substring(14); + } } } \ No newline at end of file