From 0cefd0ac1384adfa9382e1849201b3cde8a71549 Mon Sep 17 00:00:00 2001 From: "Johnny @PC" Date: Sun, 31 Jul 2016 16:19:58 +0200 Subject: [PATCH] Removed wrong factory --- .../Auth/Factories/CredentialWebFactory.cs | 42 ------------------- 1 file changed, 42 deletions(-) delete mode 100644 SpotifyAPI/Web/Auth/Factories/CredentialWebFactory.cs diff --git a/SpotifyAPI/Web/Auth/Factories/CredentialWebFactory.cs b/SpotifyAPI/Web/Auth/Factories/CredentialWebFactory.cs deleted file mode 100644 index efefb2fc..00000000 --- a/SpotifyAPI/Web/Auth/Factories/CredentialWebFactory.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Threading; -using System.Threading.Tasks; -using SpotifyAPI.Web.Enums; -using SpotifyAPI.Web.Models; - -namespace SpotifyAPI.Web.Auth.Factories -{ - public class CredentialWebFactory - { - private readonly string _secretId; - private readonly string _clientId; - private readonly Scope _scope; - - public CredentialWebFactory(string secretId, string clientId, Scope scope) - { - _secretId = secretId; - _clientId = clientId; - _scope = scope; - } - - public async Task GetWebApi() - { - var authentication = new ClientCredentialsAuth() - { - ClientId = _clientId, - Scope = _scope, - ClientSecret = _secretId - }; - - AutoResetEvent authenticationWaitFlag = new AutoResetEvent(false); - SpotifyWebAPI spotifyWebApi = null; - - Token token = await authentication.DoAuthAsync(); - - if(token.Error != null) - throw new SpotifyWebApiException(token.Error); - - return Task.FromResult(spotifyWebApi); - } - } -} \ No newline at end of file