mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 10:18:27 -04:00
- Updated editorconfig rules to hopefully look a bit nicer.
- Removed configureawait(false) from everywhere as it doesnt' do anything in a console app and just makes the code look ugly - Started using .WhenAll extension instead of Task.WhenAll to make it look nicer when chaining methods
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#nullable disable
|
||||
#nullable disable
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
@@ -19,7 +19,7 @@ public class SoundCloudApiService : INService
|
||||
|
||||
using (var http = _httpFactory.CreateClient())
|
||||
{
|
||||
response = await http.GetStringAsync($"https://scapi.nadeko.bot/resolve?url={url}").ConfigureAwait(false);
|
||||
response = await http.GetStringAsync($"https://scapi.nadeko.bot/resolve?url={url}");
|
||||
}
|
||||
|
||||
var responseObj = JsonConvert.DeserializeObject<SoundCloudVideo>(response);
|
||||
@@ -37,7 +37,7 @@ public class SoundCloudApiService : INService
|
||||
var response = string.Empty;
|
||||
using (var http = _httpFactory.CreateClient())
|
||||
{
|
||||
response = await http.GetStringAsync(new Uri($"https://scapi.nadeko.bot/tracks?q={Uri.EscapeDataString(query)}")).ConfigureAwait(false);
|
||||
response = await http.GetStringAsync(new Uri($"https://scapi.nadeko.bot/tracks?q={Uri.EscapeDataString(query)}"));
|
||||
}
|
||||
|
||||
var responseObj = JsonConvert.DeserializeObject<SoundCloudVideo[]>(response)
|
||||
|
Reference in New Issue
Block a user