Download:
https://github.com/jackkoolage/DeezerSDK/releases
Help:
https://github.com/jackkoolage/DeezerSDK/wiki
NuGet:
- Assemblies for .NET 4.5.2 and .NET Standard 2.0 and .NET Core 2.1
- Just one external reference (Newtonsoft.Json)
- Easy installation using NuGet
- Upload/Download tracking support
- Proxy Support
- Upload/Download cancellation support
Token
- GetAccessToken
- GetVerificationCode
- ExchangingVerificationCodeForAToken
- Register
AccountClient
- UserInfo
- UserOptions
- ApplicationGrantedPermissions
- GetCFtoken
Albums
- List
- ListRecursively
- Metadata
- Rate
- Comments
- CommentsRecursively
Artists
- ListRecursively
- List
- Metadata
- Albums
- AlbumsRecursively
- Comments
- CommentsRecursively
- Playlists
- PlaylistsRecursively
- Fans
- FansRecursively
- Top5Tracks
- RelatedArtists
- RelatedArtistsRecursively
- MixesTracks
Comments
- PlaylistComments
- PlaylistCommentsRecursively
- AlbumCommentsRecursively
- AlbumComments
- ArtistComments
- ArtistCommentsRecursively
- WritePlaylistComment
- WriteArtistComment
- WriteAlbumComment
- Delete
- Metadata
Favorites
- RemovePlaylist
- AddPlaylist
- AddPodcast
- RemovePodcast
- AddRadio
- RemoveRadio
- AddAlbum
- RemoveAlbum
- AddArtist
- RemoveArtist
- AddTrack
- RemoveTrack
Folders
- Metadata
- List
- ListRecursively
- Create
- AddPlaylist
- RemovePlaylist
- AddAlbum
- RemoveAlbum
- Items
Genres
- AllGenres
- Artists
- Radios
- Metadata
History
- RecentlyPlayedTracks
- RecentlyPlayedTracksRecursively
Mine
- RecommendedAlbums
- RecommendedPlaylists
- RecommendedArtists
- RecommendedTracks
- UploadMP3
- SetAvatarPicture
- UnFollow
- Follow
- Followers
- FollowersRecursively
- Followings
- FollowingsRecursively
- IsFollowingMe
- MyMP3s
- MyMP3sRecursively
- ListFlowTracks
Playlists
- List
- ListRecursively
- Add
- AddMultiple
- Remove
- RemoveMultiple
- Metadata
- Exists
- Create
- Edit
- Delete
- Clear
- Rate
- OrderInPlaylist
- SetArtwork
- MarkAsSeen
- Tracks
- RecommendationTracks
- Fans
- TrackExists
- Search
Radios
- Tracks
- List2
- List3
- Genres
- Metadata
- Top25Radios
- List
- ListRecursively
Search
- Playlists
- Tracks
- Artists
- Albums
- Historys
- Radios
- Users
- AdvancedTracksSearch
- AutocompleteSearch
StaffPicks
- AlbumsOfTheWeek
- TopTrackAlbumArtistPlaylist
- NewAlbumsInCountry
- NewAlbumsInCountryRecursively
Tracks
- List
- ListRecursively
- Delete
- Metadata
- Exists
- GenerateDirectLink
Users
- Metadata
- Albums
- AlbumsRecursively
- Artists
- ArtistsRecursively
- Playlists
- PlaylistsRecursively
- Followings
- FollowingsRecursively
- Followers
- FollowersRecursively
- Tracks
- TracksRecursively
- Radios
- RadiosRecursively
- TopAlbums
- TopPlaylists
- TopArtists
- TopTracks
- ListFlowTracks
- PushNotification
'first login (one time only)
Async Sub GetToken()
Dim scop As New List(Of DeezerSDK.GetToken.ScopesEnum) From {ScopesEnum.delete_library, ScopesEnum.basic_access, ScopesEnum.email, ScopesEnum.listening_history, ScopesEnum.manage_community, ScopesEnum.manage_library, ScopesEnum.offline_access}
Dim intgrationUrl = DeezerSDK.GetToken.GetAccessToken("app_id", scop)
End Sub
'Set your client
Dim Clnt As DeezerSDK.IClient = New DeezerSDK.SClient("xxxxtokenxxxxx", New ConnectionSettings With {.CloseConnection = True, .TimeOut = TimeSpan.FromMinutes(80), .Proxy = New ProxyConfig With {.SetProxy = True, .ProxyIP = "127.0.0.1", .ProxyPort = 80, .ProxyUsername = "user", .ProxyPassword = "123456"}})
'Functions:
''Albums
Await CLNT.Albums("album_id").Comments(50, 0)
Await CLNT.Albums("album_id").CommentsRecursively()
Await CLNT.Albums(Nothing).List(50, 0)
Await CLNT.Albums(Nothing).ListRecursively()
Await CLNT.Albums("album_id").Metadata()
Await CLNT.Albums("album_id").Rate(3)
''Artists
Await CLNT.Artists("artist_id").Albums(50, 0)
Await CLNT.Artists("artist_id").AlbumsRecursively()
Await CLNT.Artists("artist_id").Comments(50, 0)
Await CLNT.Artists("artist_id").CommentsRecursively()
Await CLNT.Artists("artist_id").Fans(50, 0)
Await CLNT.Artists("artist_id").FansRecursively()
Await CLNT.Artists(Nothing).List(50, 0)
Await CLNT.Artists(Nothing).ListRecursively()
Await CLNT.Artists("artist_id").Metadata()
Await CLNT.Artists("artist_id").MixesTracks(50)
Await CLNT.Artists("artist_id").Playlists(50, 0)
Await CLNT.Artists("artist_id").PlaylistsRecursively()
Await CLNT.Artists("artist_id").RelatedArtists(50, 0)
Await CLNT.Artists("artist_id").RelatedArtistsRecursively()
Await CLNT.Artists("artist_id").Top5Tracks()
''Comments
Await CLNT.Comments(Nothing).AlbumComments("album_id", 50, 0)
Await CLNT.Comments(Nothing).AlbumCommentsRecursively("album_id")
Await CLNT.Comments(Nothing).ArtistComments("artist_id", 50, 0)
Await CLNT.Comments(Nothing).ArtistCommentsRecursively("album_id")
Await CLNT.Comments("comment_id").Delete
Await CLNT.Comments("comment_id").Metadata
Await CLNT.Comments(Nothing).PlaylistComments("playlist_id", 50, 0)
Await CLNT.Comments(Nothing).PlaylistCommentsRecursively("playlist_id")
Await CLNT.Comments(Nothing).WriteAlbumComment("album_id", "nice album")
Await CLNT.Comments(Nothing).WriteArtistComment("artist_id", "nice artist")
Await CLNT.Comments(Nothing).WritePlaylistComment("playlist_id", "nice playlist")
''Genres
Await CLNT.Genres(Nothing).AllGenres()
Await CLNT.Genres("genre_id").Artists()
Await CLNT.Genres("genre_id").Metadata()
Await CLNT.Genres("genre_id").Radios()
''Historys
Await CLNT.Historys.RecentlyPlayedTracks(OrderByEnum.ARTIST_ASC, 50, 0)
Await CLNT.Historys.RecentlyPlayedTracksRecursively(OrderByEnum.ARTIST_ASC)
''Mine.Account
Await CLNT.Mine.Account.UserInfo
Await CLNT.Mine.Account.ApplicationGrantedPermissions
Await CLNT.Mine.Account.UserOptions
''Mine.Favorites
Await CLNT.Mine.Favorites.AddAlbum("album_id")
Await CLNT.Mine.Favorites.AddArtist("artist_id")
Await CLNT.Mine.Favorites.AddPlaylist("playlist_id")
Await CLNT.Mine.Favorites.AddPodcast("prodcast_id")
Await CLNT.Mine.Favorites.AddRadio("radio_id")
Await CLNT.Mine.Favorites.AddTrack("track_id")
Await CLNT.Mine.Favorites.RemoveAlbum("album_id")
Await CLNT.Mine.Favorites.RemoveArtist("artist_id")
Await CLNT.Mine.Favorites.RemovePlaylist("playlist_id")
Await CLNT.Mine.Favorites.RemovePodcast("prodcast_id")
Await CLNT.Mine.Favorites.RemoveRadio("radio_id")
Await CLNT.Mine.Favorites.RemoveTrack("track_id")
''Mine.Folders
Await CLNT.Mine.Folders("folder_id").AddAlbum("album_id")
Await CLNT.Mine.Folders("folder_id").AddPlaylist("playlist_id")
Await CLNT.Mine.Folders(Nothing).Create("folderName", True, False, "all my")
Await CLNT.Mine.Folders("folder_id").Items(50, 0)
Await CLNT.Mine.Folders(Nothing).List(50, 0)
Await CLNT.Mine.Folders(Nothing).ListRecursively()
Await CLNT.Mine.Folders("folder_id").Metadata
Await CLNT.Mine.Folders("folder_id").RemoveAlbum("album_id")
Await CLNT.Mine.Folders("folder_id").RemovePlaylist("playlist_id")
''Mine
Await CLNT.Mine.Follow("user_id")
Await CLNT.Mine.UnFollow("user_id")
Await CLNT.Mine.Followers(50, 0)
Await CLNT.Mine.FollowersRecursively()
Await CLNT.Mine.Followings(50, 0)
Await CLNT.Mine.FollowingsRecursively()
Await CLNT.Mine.IsFollowingMe("user_id")
Await CLNT.Mine.MyMP3s(50, 0)
Await CLNT.Mine.MyMP3sRecursively()
Await CLNT.Mine.RecommendedAlbums()
Await CLNT.Mine.RecommendedArtists()
Await CLNT.Mine.RecommendedPlaylists()
Await CLNT.Mine.RecommendedTracks()
Await CLNT.Mine.ListFlowTracks
Dim UploadCancellationToken As New Threading.CancellationTokenSource()
Dim _ReportCls As New Progress(Of DeezerSDK.ReportStatus)(Sub(r)
Button41.Text = String.Format("{0}/{1}", (r.BytesTransferred), (r.TotalBytes))
Button41.Text = CInt(r.ProgressPercentage)
Button41.Text = If(CStr(r.TextStatus) Is Nothing, "Uploading...", CStr(r.TextStatus))
End Sub)
Await CLNT.Mine.SetAvatarPicture("C:\\myimg.jpg", UploadTypes.FilePath, "myimg.jpg", _ReportCls, UploadCancellationToken.Token)
Await CLNT.Mine.UploadMP3("C:\\myaudio.mp3", UploadTypes.FilePath, "myaudio.mp3", "testing audio", _ReportCls, UploadCancellationToken.Token)
''Playlists
Await CLNT.Playlists("playlist_id").Add("track_id")
Await CLNT.Playlists("playlist_id").AddMultiple(New List(Of Long) From {{"track_id"}, {"track_id"}})
Await CLNT.Playlists("playlist_id").Clear
Await CLNT.Playlists("playlist_id").Create("my tracks list", True, False, Nothing)
Await CLNT.Playlists("playlist_id").Delete
Await CLNT.Playlists("playlist_id").Edit("my tracks list", True, False, Nothing)
Await CLNT.Playlists("playlist_id").Exists
Await CLNT.Playlists("playlist_id").Fans(50)
Await CLNT.Playlists(Nothing).List(OrderByEnum.ARTIST_ASC, 50, 0)
Await CLNT.Playlists(Nothing).ListRecursively(OrderByEnum.TRACK_ASC)
Await CLNT.Playlists("playlist_id").MarkAsSeen
Await CLNT.Playlists("playlist_id").Metadata
Await CLNT.Playlists("playlist_id").OrderInPlaylist("track_id")
Await CLNT.Playlists("playlist_id").Rate(3)
Await CLNT.Playlists("playlist_id").RecommendationTracks(OrderByEnum.TRACK_ASC, 50, 0)
Await CLNT.Playlists("playlist_id").Remove("track_id")
Await CLNT.Playlists("playlist_id").RemoveMultiple(New List(Of Long) From {{"track_id"}, {"track_id"}})
Await CLNT.Playlists(Nothing).Search("tracks list", OrderByEnum.ARTIST_ASC)
Await CLNT.Playlists("playlist_id").SetArtwork("C:\\myimg.jpg", UploadTypes.FilePath, "myimg.jpg", _ReportCls, UploadCancellationToken.Token)
Await CLNT.Playlists("playlist_id").TrackExists("track_id")
Await CLNT.Playlists("playlist_id").Tracks(OrderByEnum.ARTIST_ASC, 50, 0)
''Radios
Await CLNT.Radios("radio_id").Metadata
Await CLNT.Radios(Nothing).Genres()
Await CLNT.Radios(Nothing).List(50, 0)
Await CLNT.Radios(Nothing).List2()
Await CLNT.Radios(Nothing).List3(OrderByEnum.ARTIST_ASC, 50, 0)
Await CLNT.Radios(Nothing).ListRecursively
Await CLNT.Radios(Nothing).Top25Radios
Await CLNT.Radios("radio_id").Tracks(50)
''Search
Await CLNT.Search(50, 0).Albums("whats new", AlbumOrderByEnum.RANKING)
Await CLNT.Search(50, 0).Artists("emi", ArtistOrderByEnum.ARTIST_ASC)
Await CLNT.Search(50, 0).Historys("hello", OrderByEnum.DURATION_ASC)
Await CLNT.Search(50, 0).Playlists("tracks list")
Await CLNT.Search(50, 0).Radios("pop")
Await CLNT.Search(50, 0).Tracks("money", OrderByEnum.ARTIST_ASC)
Await CLNT.Search(50, 0).Users("james")
Await CLNT.Search(50, 0).AdvancedTracksSearch("hello", "adele", Nothing, 40000, 1000, OrderByEnum.RATING_ASC)
Await CLNT.Search(50, 0).AutocompleteSearch("emine", OrderByEnum.ARTIST_ASC)
''StaffPicks
Await CLNT.StaffPicks.AlbumsOfTheWeek
Await CLNT.StaffPicks.NewAlbumsInCountry(50, 0)
Await CLNT.StaffPicks.NewAlbumsInCountryRecursively()
Await CLNT.StaffPicks.TopTrackAlbumArtistPlaylist(50)
''Tracks
Await CLNT.Tracks("track_id").Delete
Await CLNT.Tracks("track_id").Exists
Await CLNT.Tracks(Nothing).List
Await CLNT.Tracks(Nothing).ListRecursively
Await CLNT.Tracks("track_id").Metadata
CLNT.Tracks(Nothing).GenerateDirectLink("7e4b6942c6c3835dd8c4c1e0988dbd79", "658765292", "3", "1")
''Users
Await CLNT.Users("user_id").Metadata
Await CLNT.Users("user_id").Albums(50, 0)
Await CLNT.Users("user_id").AlbumsRecursively
Await CLNT.Users("user_id").Artists(50, 0)
Await CLNT.Users("user_id").ArtistsRecursively
Await CLNT.Users("user_id").Followers(50, 0)
Await CLNT.Users("user_id").FollowersRecursively
Await CLNT.Users("user_id").Followings(50, 0)
Await CLNT.Users("user_id").FollowingsRecursively
Await CLNT.Users("user_id").ListFlowTracks
Await CLNT.Users("user_id").Playlists(OrderByEnum.ARTIST_ASC, 50, 0)
Await CLNT.Users("user_id").PlaylistsRecursively(OrderByEnum.RANKING)
Await CLNT.Users("user_id").PushNotification("hi there")
Await CLNT.Users("user_id").Radios(50, 0)
Await CLNT.Users("user_id").RadiosRecursively
Await CLNT.Users("user_id").TopAlbums
Await CLNT.Users("user_id").TopArtists
Await CLNT.Users("user_id").TopPlaylists
Await CLNT.Users("user_id").TopTracks
Await CLNT.Users("user_id").Tracks(OrderByEnum.ARTIST_ASC, 50, 0)
Await CLNT.Users("user_id").TracksRecursively(OrderByEnum.ALBUM_ASC)