david-desmaisons / discogsclient Goto Github PK
View Code? Open in Web Editor NEWDiscogs API C# Client
License: MIT License
Discogs API C# Client
License: MIT License
Is it possible to get a master id of an album using this API; I would like to know because I'd like to search the cover art according to an artist the user enters and I couldn't find a documentation or something to solve my issue.
Hi, I wanted to ask if you were willing to integrate some information that I found in the DiscoGS DB and that are not currently extracted from your library.
For now I can not give you a precise list (in testing my applications sometimes I find something) but for now I could give you two / three that I found.
Thanks in advance,
Traponto
Fetching releases from a label that contains a huge amount of them seems we hit the rate limit.
Here 2 labels to test with:
Label Id=1967
Label Id=10663
And perhaps this can help a bit too:
DiscogsClient.GenerateFromPaginable
var res = await _Client.Execute(request, cancel);
var elements = res?.GetResults();
if (elements == null)
return; //If we hit the limit, response is empty but all pages have not being retrieved.
This package is working perfectly.
But some releases are compilations and each track has a different artist.
It would be nice to add an artist property in the "DiscogsTrack" class.
Thank you.
Hi,
I want to use this package to do some server-side API calls on my site. I don't want to authorise users on my site. I'm just having trouble filling in one seeming gap in the docs.
I have my Discogs App Consumer Key and Secret.
I will be searching for an artist then retrieving the artist info.
I can see from your documentation that the option I might want to take is the Token Auth route...e.g.
var tokenInformation = new TokenAuthenticationInformation("my-token");
var discogsClient = new DiscogsClient.DiscogsClient(tokenInformation);
What i'm wondering is how I get my-token
with only my consumer key
and secret
?
Alternative:
I can see on the discogs dev site that they also offer a QueryString method of authorising requests:
curl "https://api.discogs.com/database/search?q=Nirvana&key=foo123&secret=bar456"
(see: https://www.discogs.com/developers#page:authentication,header:authentication-discogs-auth-flow)
Am I right in thinking this isn't an option with this package?
Thanks for any help you can give.
CS0118: "DiscogsClient" is a namespace but is used like a type
I am getting this error on var discogsClient = new DiscogsClient(token);
Hey there :-)
I am a WPF VB.NET Framework 4.8 programmer and I have some trouble requesting Token and TokenSecret with OAuth programmatically. This is my code (I used an online converter to translate this from C#):
Dim OAuthConsumerInformation = New OAuthConsumerInformation("MyConsumerKey", "MyConsumerSecret")
Dim discogsClient = New DiscogsAuthentifierClient(OAuthConsumerInformation)
Dim aouth = discogsClient.Authorize(Function(s) Task.FromResult(GetToken(s))).Result
Dim successString As String = ""
If aouth IsNot Nothing Then successString = "successful." Else successString = "not sucessful."
However, the problem occurs in line 3: My app submits the request, at least my virus scanner shows a message, that my app is trying to connect. But when I hit the button to grant the connection, nothing happens, I could just wait forever...
When I use the provided demo code in C#, everything works fine:
namespace DiscogsAuthenticationConsole
{
public class Program
{
public static void Main(string[] args)
{
var oAuthConsumerInformation = new OAuthConsumerInformation("MeinConsumerKey", "MeinConsumerSecret");
var discogsClient = new DiscogsAuthentifierClient(oAuthConsumerInformation);
var aouth = discogsClient.Authorize(s => Task.FromResult(GetToken(s))).Result;
Console.WriteLine($"{((aouth != null) ? "Success" : "Fail")}");
Console.WriteLine($"Token:{aouth?.TokenInformation?.Token}, TokenSecret:{aouth?.TokenInformation?.TokenSecret}");
Console.ReadLine();
}
private static string GetToken(string url)
{
Console.WriteLine("Please authourize the application and enter the final key in the console");
Process.Start(url);
string tokenKey = Console.ReadLine();
tokenKey = string.IsNullOrEmpty(tokenKey) ? null : tokenKey;
return tokenKey;
}
}
}
Maybe it's just a translation issue? I can't really figure it out as I am not that familiar with C#...
Because RestSharp
has some breaking changes in newer versions this library currently only works if you use version 106
.
If you have a higher version of RestSharp in your solution installed the package will return errors.
There are two possible solutions to fix this issue:
106
version.RestSharp
to a newer version and fix the code for the new changesIf you update the package a different dependency (from the same author) also has to be updated since it has the same issue: https://github.com/David-Desmaisons/RestSharpHelper
All I want to do is search using the database api.
I don't want to authorize users or anything the like.
I got an consumer key and a consumer secret but all examples I find require an user to click "Authorize".
I just want to do a quit authorization with my own key and search the database.
How?
I ran the project, put in my token, and get this error: C:\Program Files\dotnet\dotnet.exe (process 18648) exited with code 0.
Is there a way to get subtracks of an 'Index' track?
For example: in Pink Floyd Atom Heart Mother I have the track 'Atom Heart Mother' ('Index' track) with subtracks 1.a / 1.f
It looks like your project doesn't support calls to the Discogs marketplace endpoint (I'm specifically looking for /marketplace/price_suggestions/{release_id}
)
Hi,
Can u add images? Like cover_image?
at var observable = await discogsClient.SearchAsync(discogsSearch);
I must be missing something as I am unable to build with DiscogsClient. I am receiving a compilation error related to ForEachAsync.
var observable = _DiscogsClient.Search(discogsSearch);
return observable.ForEachAsync(OnResult);
Exact error is below:
'IObservable' does not contain a definition for 'ForEachAsync' and no accessible extension method 'ForEachAsync' accepting a first argument of type 'IObservable' could be found (are you missing a using directive or an assembly reference?)
Latest version (2.3.0) is installed. Any idea what I might be missing? Any suggestions?
I'm having trouble activating the authorize procedure inside my WinForm application, it seems that the 'GetToken' function is not invoked and the program goes in loop in the 'Authorize' procedure. I took the same instructions in the sample application 'DiscogsAuthenticationConsole' where instead everything is fine.
Hi,
Your script:
var oAuthConsumerInformation = new OAuthConsumerInformation("aaa", "bbb");
var discogsClient = new DiscogsAuthentifierClient(oAuthConsumerInformation);
var aouth = discogsClient.Authorize(s => Task.FromResult(GetToken(s))).Result;
Console.WriteLine($"{((aouth != null)? "Success": "Fail")}");
Console.WriteLine($"Token:{aouth?.TokenInformation?.Token}, Token:{aouth?.TokenInformation?.TokenSecret}");
Print Fail and exit. I am sure that user key and secret key is correct.
Why this script not respond success?
How i can execute some request in discogs DB?
Thank you so much.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.