Add mods and ruleset parameters to GetDifficultyAttributesAsync#2
Add mods and ruleset parameters to GetDifficultyAttributesAsync#2matte-ek wants to merge 7 commits into
Conversation
|
Marked as draft for now as I noticed the |
|
Sorry for being slow with this, been very busy lately and haven't had any time. Anyway I initially thought of doing some easy overloading like: However this will have problems with ambiguity if you were trying to do something like
Do you have any other better ideas? EDIT: Or we could just have another overload without mods at all, not sure why I didn't think of that initially, lack of sleep catching up with me I guess :) |
|
What is the object overload for? I'd make one overload for passing the int, one for passing the array and one for passing a mod string. |
|
Oh my bad, I just saw that its the private method. Maybe instead just have it's own implementation in each method and then in the end we'll see how we can abstract it |
b962e4b to
067fa71
Compare
|
I'm pretty happy over how things are right now. Please let me know if you want anything to be changed. Everything seems to work fine from my quick testing var score = await OsuApiClient.GetDifficultyAttributesAsync(2833172); // diff-rating: 6.22964001
var scoreMania = await OsuApiClient.GetDifficultyAttributesAsync(2833172, "mania"); // diff-rating: 3.01440001
var scoreHr = await OsuApiClient.GetDifficultyAttributesAsync(2833172, ["HR"]); // diff-rating: 6.45979977
var scoreHrBitset = await OsuApiClient.GetDifficultyAttributesAsync(2833172, 16); // diff-rating: 6.45979977
var scoreDtMania = await OsuApiClient.GetDifficultyAttributesAsync(2833172, ["DT"], "mania"); // diff-rating: 4.05667019067fa71 is somewhat outside the scope of this PR but is a bug I noticed while retrieving scores, so added it to this PR. |
|
Just noticed that the change to use the Could you add another overload for specifying strings such as |
|
Am I being totally stupid, or has StringEnumConverter::WriteJson ever worked? |
Never tried it lol. |
As per a discussion in a previous PR.
Adds the ability to pass
modsandrulesetto theGetDifficultyAttributesAsyncmethod and the ability to send data in the body during a POST request.