Example #1
0
 private void AuthorizeToken(string myToken)
 {
     //Create authentication based on Discogs token
     var tokenInformation = new DiscogsClient.Internal.TokenAuthenticationInformation(myToken);
     //Create discogs client using the authentication
     var discogsClient = new DiscogsClient.DiscogsClient(tokenInformation);
 }
Example #2
0
        private DiscogsAPI()
        {
            // If want to use it, Singleton it


            //var discogsConfig = ConfigurationManager.GetSection("Discogs") as NameValueCollection;

            //Create authentication object using private and public keys: you should fournish real keys here

            /*var oAuthCompleteInformation = new OAuthCompleteInformation(discogsConfig["key"],
             *  discogsConfig["secret"], , );
             * //Create discogs client using the authentication
             * var discogsClient = new DiscogsClient.DiscogsClient(oAuthCompleteInformation);*/

            //Create authentication based on Discogs token
            var tokenInformation = new TokenAuthenticationInformation("uiHViDZbDPlVQZNZgvluZypCMBjXoKIUVAYaJbmj");

            //Create discogs client using the authentication
            client = new DiscogsClient.DiscogsClient(tokenInformation);
        }
 public static void SetToken(string token)
 {
     client = new DisClient(new TokenAuthenticationInformation(token), "DiscogsDesktop", 10000);
     TokenChanged?.Invoke();
 }
Example #4
0
        public Discogs(string artist, string title, WaitHandle mEventStopSiteSearches, int timeLimit) : base(artist, title, mEventStopSiteSearches, timeLimit)
        {
            var tokenInformation = new TokenAuthenticationInformation(MPTagThat.LicenseManager.LicenseManager.GetDiscogsToken());

            _discogsClient = new DiscogsClient.DiscogsClient(tokenInformation, "MPTagThat 4.0");
        }