From 787f48974535b3ce7c2b96b478071547ce72fd01 Mon Sep 17 00:00:00 2001
From: Foo <34515228+fooooooooooooooo@users.noreply.github.com>
Date: Wed, 17 Mar 2021 04:14:34 -0700
Subject: [PATCH] refactoring of everything pogu
---
.editorconfig | 134 ++----------------
.idea/.idea.KSoftNet/.idea/encodings.xml | 4 +
.idea/.idea.KSoftNet/.idea/indexLayout.xml | 8 ++
.../.idea/projectSettingsUpdater.xml | 6 +
.idea/.idea.KSoftNet/.idea/vcs.xml | 6 +
.idea/.idea.KSoftNet/.idea/workspace.xml | 128 +++++++++++++++++
KSoftNet.Tests/KSoftAPIUnitTest.cs | 95 ++++++-------
KSoftNet.Tests/KSoftNet.Tests.csproj | 11 +-
KSoftNet/KSoft/BansAPI.cs | 62 ++++----
KSoftNet/KSoft/ImagesAPI.cs | 57 +++-----
KSoftNet/KSoft/KumoAPI.cs | 53 ++++---
KSoftNet/KSoft/MusicAPI.cs | 35 +++--
KSoftNet/KSoftAPI.cs | 86 ++++++-----
KSoftNet/KSoftNet.csproj | 9 +-
KSoftNet/Models/KSoftAlbumInfo.cs | 2 +-
KSoftNet/Models/KSoftCurrency.cs | 2 +-
KSoftNet/Models/KSoftImage.cs | 13 +-
KSoftNet/Models/KSoftRedditPost.cs | 5 +-
KSoftNet/Models/KSoftTags.cs | 2 +-
KSoftNet/Models/KSoftTrackInfo.cs | 2 +-
KSoftNet/Models/KSoftWeather.cs | 2 +-
KSoftNet/Models/KSoftWikiHowPost.cs | 2 +-
22 files changed, 367 insertions(+), 357 deletions(-)
create mode 100644 .idea/.idea.KSoftNet/.idea/encodings.xml
create mode 100644 .idea/.idea.KSoftNet/.idea/indexLayout.xml
create mode 100644 .idea/.idea.KSoftNet/.idea/projectSettingsUpdater.xml
create mode 100644 .idea/.idea.KSoftNet/.idea/vcs.xml
create mode 100644 .idea/.idea.KSoftNet/.idea/workspace.xml
diff --git a/.editorconfig b/.editorconfig
index 49de0d3..c374cc8 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,123 +1,15 @@
-# To learn more about .editorconfig see https://aka.ms/editorconfigdocs
-###############################
-# Core EditorConfig Options #
-###############################
-# All files
+
[*]
-indent_style = space
-# Code files
-[*.{cs,csx,vb,vbx}]
-indent_size = 4
-insert_final_newline = true
-charset = utf-8-bom
-###############################
-# .NET Coding Conventions #
-###############################
-[*.{cs,vb}]
-# Organize usings
-dotnet_sort_system_directives_first = true
-# this. preferences
-dotnet_style_qualification_for_field = false:silent
-dotnet_style_qualification_for_property = false:silent
-dotnet_style_qualification_for_method = false:silent
-dotnet_style_qualification_for_event = false:silent
-# Language keywords vs BCL types preferences
-dotnet_style_predefined_type_for_locals_parameters_members = true:silent
-dotnet_style_predefined_type_for_member_access = true:silent
-# Parentheses preferences
-dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
-dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
-dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
-dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
-# Modifier preferences
-dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
-dotnet_style_readonly_field = true:suggestion
-# Expression-level preferences
-dotnet_style_object_initializer = true:suggestion
-dotnet_style_collection_initializer = true:suggestion
-dotnet_style_explicit_tuple_names = true:suggestion
-dotnet_style_null_propagation = true:suggestion
-dotnet_style_coalesce_expression = true:suggestion
-dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
-dotnet_style_prefer_inferred_tuple_names = true:suggestion
-dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
-dotnet_style_prefer_auto_properties = true:silent
-dotnet_style_prefer_conditional_expression_over_assignment = true:silent
-dotnet_style_prefer_conditional_expression_over_return = true:silent
-###############################
-# Naming Conventions #
-###############################
-# Style Definitions
-dotnet_naming_style.pascal_case_style.capitalization = pascal_case
-# Use PascalCase for constant fields
-dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
-dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
-dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
-dotnet_naming_symbols.constant_fields.applicable_kinds = field
-dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
-dotnet_naming_symbols.constant_fields.required_modifiers = const
-###############################
-# C# Coding Conventions #
-###############################
-[*.cs]
-# var preferences
-csharp_style_var_for_built_in_types = true:silent
-csharp_style_var_when_type_is_apparent = true:silent
-csharp_style_var_elsewhere = true:silent
-# Expression-bodied members
-csharp_style_expression_bodied_methods = false:silent
-csharp_style_expression_bodied_constructors = false:silent
-csharp_style_expression_bodied_operators = false:silent
-csharp_style_expression_bodied_properties = true:silent
-csharp_style_expression_bodied_indexers = true:silent
-csharp_style_expression_bodied_accessors = true:silent
-# Pattern matching preferences
-csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
-csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
-# Null-checking preferences
-csharp_style_throw_expression = true:suggestion
-csharp_style_conditional_delegate_call = true:suggestion
-# Modifier preferences
-csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
-# Expression-level preferences
-csharp_prefer_braces = true:silent
-csharp_style_deconstructed_variable_declaration = true:suggestion
-csharp_prefer_simple_default_expression = true:suggestion
-csharp_style_pattern_local_over_anonymous_function = true:suggestion
-csharp_style_inlined_variable_declaration = true:suggestion
-###############################
-# C# Formatting Rules #
-###############################
-# New line preferences
-csharp_new_line_before_open_brace = all
-csharp_new_line_before_else = true
-csharp_new_line_before_catch = true
-csharp_new_line_before_finally = true
-csharp_new_line_before_members_in_object_initializers = true
-csharp_new_line_before_members_in_anonymous_types = true
-csharp_new_line_between_query_expression_clauses = true
-# Indentation preferences
-csharp_indent_case_contents = true
-csharp_indent_switch_labels = true
-csharp_indent_labels = flush_left
-# Space preferences
+
+# Microsoft .NET properties
csharp_space_after_cast = false
-csharp_space_after_keywords_in_control_flow_statements = true
-csharp_space_between_method_call_parameter_list_parentheses = false
-csharp_space_between_method_declaration_parameter_list_parentheses = false
-csharp_space_between_parentheses = false
-csharp_space_before_colon_in_inheritance_clause = true
-csharp_space_after_colon_in_inheritance_clause = true
-csharp_space_around_binary_operators = before_and_after
-csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
-csharp_space_between_method_call_name_and_opening_parenthesis = false
-csharp_space_between_method_call_empty_parameter_list_parentheses = false
-# Wrapping preferences
-csharp_preserve_single_line_statements = true
-csharp_preserve_single_line_blocks = true
-###############################
-# VB Coding Conventions #
-###############################
-[*.vb]
-# Modifier preferences
-visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion
+
+# ReSharper properties
+resharper_blank_lines_before_block_statements = 1
+resharper_blank_lines_before_control_transfer_statements = 1
+resharper_csharp_blank_lines_around_invocable = 0
+resharper_csharp_blank_lines_around_region = 0
+resharper_csharp_max_line_length = 361
+resharper_csharp_wrap_arguments_style = chop_if_long
+resharper_remove_blank_lines_near_braces_in_code = false
+resharper_remove_blank_lines_near_braces_in_declarations = false
diff --git a/.idea/.idea.KSoftNet/.idea/encodings.xml b/.idea/.idea.KSoftNet/.idea/encodings.xml
new file mode 100644
index 0000000..df87cf9
--- /dev/null
+++ b/.idea/.idea.KSoftNet/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.KSoftNet/.idea/indexLayout.xml b/.idea/.idea.KSoftNet/.idea/indexLayout.xml
new file mode 100644
index 0000000..7b08163
--- /dev/null
+++ b/.idea/.idea.KSoftNet/.idea/indexLayout.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.KSoftNet/.idea/projectSettingsUpdater.xml b/.idea/.idea.KSoftNet/.idea/projectSettingsUpdater.xml
new file mode 100644
index 0000000..4bb9f4d
--- /dev/null
+++ b/.idea/.idea.KSoftNet/.idea/projectSettingsUpdater.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.KSoftNet/.idea/vcs.xml b/.idea/.idea.KSoftNet/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/.idea.KSoftNet/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.KSoftNet/.idea/workspace.xml b/.idea/.idea.KSoftNet/.idea/workspace.xml
new file mode 100644
index 0000000..1a29f21
--- /dev/null
+++ b/.idea/.idea.KSoftNet/.idea/workspace.xml
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1615976183439
+
+
+ 1615976183439
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KSoftNet.Tests/KSoftAPIUnitTest.cs b/KSoftNet.Tests/KSoftAPIUnitTest.cs
index 51de7be..cd8ef0b 100644
--- a/KSoftNet.Tests/KSoftAPIUnitTest.cs
+++ b/KSoftNet.Tests/KSoftAPIUnitTest.cs
@@ -1,48 +1,50 @@
-using KSoftNet.Models;
+using System;
+using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
-using System;
-using System.Threading.Tasks;
namespace KSoftNet.Tests {
[TestClass]
public class KSoftAPIUnitTest {
- public string token = "";
- readonly KSoftAPI kSoftAPI;
-
- public KSoftAPIUnitTest() {
- IConfigurationRoot configuration = new ConfigurationBuilder().AddJsonFile("config.json").Build();
- token = configuration["token"];
-
- kSoftAPI = new KSoftAPI(token);
- }
-
- public JsonSerializerSettings jsonSettings = new JsonSerializerSettings {
+ private readonly JsonSerializerSettings _jsonSettings = new JsonSerializerSettings {
ContractResolver = new DefaultContractResolver {
NamingStrategy = new SnakeCaseNamingStrategy()
}
};
- public void LogObject(object obj) {
- Console.WriteLine(JsonConvert.SerializeObject(obj, jsonSettings));
+ private readonly KSoftAPI _kSoftAPI;
+
+ public KSoftAPIUnitTest() {
+ var configuration = new ConfigurationBuilder().AddJsonFile("config.json").Build();
+ var token = configuration["token"];
+
+ _kSoftAPI = new KSoftAPI(token);
+ }
+
+ private void LogObject(object obj) {
+ Console.WriteLine(JsonConvert.SerializeObject(obj, _jsonSettings));
}
+ // I know that these are not really unit tests and that they're bad tests in general
+ // but they are just so I can click a button and know that I didn't horribly break
+ // something :)
+
[TestMethod]
public void TestCreation() {
- Assert.IsNotNull(kSoftAPI.imagesAPI);
- Assert.IsNotNull(kSoftAPI.kumoAPI);
- Assert.IsNotNull(kSoftAPI.musicAPI);
- Assert.IsNotNull(kSoftAPI.imagesAPI);
- Assert.IsNotNull(kSoftAPI.BaseUrl);
+ Assert.IsNotNull(_kSoftAPI.imagesAPI);
+ Assert.IsNotNull(_kSoftAPI.kumoAPI);
+ Assert.IsNotNull(_kSoftAPI.musicAPI);
+ Assert.IsNotNull(_kSoftAPI.imagesAPI);
+ Assert.IsNotNull(KSoftAPI.BaseUrl);
}
[TestMethod]
public async Task TestRandomImage() {
- KSoftImage image = await kSoftAPI.imagesAPI.RandomImage("pepe");
+ var image = await _kSoftAPI.imagesAPI.RandomImage("pepe");
LogObject(image);
@@ -55,7 +57,7 @@ public async Task TestRandomImage() {
[TestMethod]
public async Task TestTags() {
- KSoftTags tags = await kSoftAPI.imagesAPI.Tags();
+ var tags = await _kSoftAPI.imagesAPI.Tags();
LogObject(tags);
@@ -66,7 +68,7 @@ public async Task TestTags() {
[TestMethod]
public async Task TestTagSearch() {
- KSoftTags tags = await kSoftAPI.imagesAPI.TagSearch("birb");
+ var tags = await _kSoftAPI.imagesAPI.TagSearch("birb");
LogObject(tags);
@@ -76,7 +78,7 @@ public async Task TestTagSearch() {
[TestMethod]
public async Task TestImageFromSnowflake() {
- KSoftImage image = await kSoftAPI.imagesAPI.ImageFromSnowflake("i-7n36tlpw-30");
+ var image = await _kSoftAPI.imagesAPI.ImageFromSnowflake("i-7n36tlpw-30");
LogObject(image);
@@ -88,7 +90,7 @@ public async Task TestImageFromSnowflake() {
[TestMethod]
public async Task TestRandomMeme() {
- KSoftRedditPost meme = await kSoftAPI.imagesAPI.RandomMeme();
+ var meme = await _kSoftAPI.imagesAPI.RandomMeme();
LogObject(meme);
@@ -109,7 +111,7 @@ public async Task TestRandomMeme() {
[TestMethod]
public async Task TestRandomWikiHow() {
- KSoftWikiHowPost wh = await kSoftAPI.imagesAPI.RandomWikiHow();
+ var wh = await _kSoftAPI.imagesAPI.RandomWikiHow();
LogObject(wh);
@@ -121,7 +123,7 @@ public async Task TestRandomWikiHow() {
[TestMethod]
public async Task TestRandomAww() {
- KSoftRedditPost aww = await kSoftAPI.imagesAPI.RandomAww();
+ var aww = await _kSoftAPI.imagesAPI.RandomAww();
LogObject(aww);
@@ -142,7 +144,7 @@ public async Task TestRandomAww() {
[TestMethod]
public async Task TestRandomNsfw() {
- KSoftRedditPost nsfw = await kSoftAPI.imagesAPI.RandomNsfw(false);
+ var nsfw = await _kSoftAPI.imagesAPI.RandomNsfw(false);
LogObject(nsfw);
@@ -163,7 +165,7 @@ public async Task TestRandomNsfw() {
[TestMethod]
public async Task TestRandomReddit() {
- KSoftRedditPost aww = await kSoftAPI.imagesAPI.RandomReddit("pics", true, "day");
+ var aww = await _kSoftAPI.imagesAPI.RandomReddit("pics", true, "day");
LogObject(aww);
@@ -184,7 +186,7 @@ public async Task TestRandomReddit() {
[TestMethod]
public async Task TestGeoIP() {
- KSoftGeoIP geoip = await kSoftAPI.kumoAPI.GeoIP("8.8.8.8");
+ var geoip = await _kSoftAPI.kumoAPI.GeoIP("8.8.8.8");
LogObject(geoip);
@@ -195,19 +197,19 @@ public async Task TestGeoIP() {
[TestMethod]
public async Task TestCurrencyConversion() {
- KSoftCurrency currency = await kSoftAPI.kumoAPI.CurrencyConversion("USD", "CAD", 100);
+ var currency = await _kSoftAPI.kumoAPI.CurrencyConversion("USD", "CAD", 100);
LogObject(currency);
Assert.IsFalse(currency.Error);
- Assert.AreEqual(127.371, currency.Value);
- Assert.AreEqual("127.37 CAD", currency.Pretty);
+ Assert.AreEqual(124.6437, currency.Value);
+ Assert.AreEqual("124.64 CAD", currency.Pretty);
}
[TestMethod]
public async Task TestSearchLyrics() {
- KSoftLyrics lyrics = await kSoftAPI.musicAPI.SearchLyrics("Is this the real life? Is this just fantasy?", true, 1);
+ var lyrics = await _kSoftAPI.musicAPI.SearchLyrics("Is this the real life? Is this just fantasy?", true, 1);
LogObject(lyrics);
@@ -218,7 +220,7 @@ public async Task TestSearchLyrics() {
[TestMethod]
public async Task TestArtistByID() {
- KSoftArtistInfo artist = await kSoftAPI.musicAPI.ArtistByID(28333);
+ var artist = await _kSoftAPI.musicAPI.ArtistByID(28333);
LogObject(artist);
@@ -232,7 +234,7 @@ public async Task TestArtistByID() {
[TestMethod]
public async Task TestAlbumByID() {
- KSoftAlbumInfo album = await kSoftAPI.musicAPI.AlbumByID(88287);
+ var album = await _kSoftAPI.musicAPI.AlbumByID(88287);
LogObject(album);
@@ -247,7 +249,7 @@ public async Task TestAlbumByID() {
[TestMethod]
public async Task TestTrackByID() {
- KSoftTrackInfo track = await kSoftAPI.musicAPI.TrackByID(628942);
+ var track = await _kSoftAPI.musicAPI.TrackByID(628942);
LogObject(track);
@@ -266,7 +268,7 @@ public async Task TestTrackByID() {
[TestMethod]
public async Task TestBanInfo() {
- KSoftBanInfo banInfo = await kSoftAPI.bansAPI.BanInfo("766186017979760681");
+ var banInfo = await _kSoftAPI.bansAPI.BanInfo("766186017979760681");
LogObject(banInfo);
@@ -287,7 +289,7 @@ public async Task TestBanInfo() {
[TestMethod]
public async Task TestBanCheck() {
- KSoftBanCheck banCheck = await kSoftAPI.bansAPI.BanCheck("69");
+ var banCheck = await _kSoftAPI.bansAPI.BanCheck("69");
LogObject(banCheck);
@@ -296,7 +298,7 @@ public async Task TestBanCheck() {
[TestMethod]
public async Task TestBanCheck2() {
- KSoftBanCheck banCheck = await kSoftAPI.bansAPI.BanCheck("766186017979760681");
+ var banCheck = await _kSoftAPI.bansAPI.BanCheck("766186017979760681");
LogObject(banCheck);
@@ -305,7 +307,7 @@ public async Task TestBanCheck2() {
[TestMethod]
public async Task TestBanList() {
- KSoftBanList banList = await kSoftAPI.bansAPI.BanList(1, 2);
+ var banList = await _kSoftAPI.bansAPI.BanList(1, 2);
LogObject(banList);
@@ -322,16 +324,13 @@ public async Task TestBanList() {
[TestMethod]
public async Task TestBanUpdates() {
- DateTime time = DateTime.Now - TimeSpan.FromDays(10);
- KSoftBanUpdates banUpdates = await kSoftAPI.bansAPI.BanUpdates(time);
+ var time = DateTime.Now - TimeSpan.FromDays(10);
+ var banUpdates = await _kSoftAPI.bansAPI.BanUpdates(time);
LogObject(banUpdates);
Assert.IsNotNull(banUpdates.CurrentTimestamp);
Assert.IsNotNull(banUpdates.Data);
}
-
-
-
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet.Tests/KSoftNet.Tests.csproj b/KSoftNet.Tests/KSoftNet.Tests.csproj
index f0890ac..9e1d963 100644
--- a/KSoftNet.Tests/KSoftNet.Tests.csproj
+++ b/KSoftNet.Tests/KSoftNet.Tests.csproj
@@ -12,10 +12,13 @@
-
-
-
-
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
diff --git a/KSoftNet/KSoft/BansAPI.cs b/KSoftNet/KSoft/BansAPI.cs
index aea566a..236728a 100644
--- a/KSoftNet/KSoft/BansAPI.cs
+++ b/KSoftNet/KSoft/BansAPI.cs
@@ -1,18 +1,18 @@
-using KSoftNet.Models;
-using System;
+using System;
using System.Collections.Specialized;
using System.Net.Http;
using System.Threading.Tasks;
+using KSoftNet.Models;
namespace KSoftNet.KSoft {
///
- /// Advanced and powerful global ban list API
+ /// Advanced and powerful global ban list API
///
public class BansAPI {
private readonly KSoftAPI _kSoftAPI;
///
- /// Advanced and powerful global ban list API
+ /// Advanced and powerful global ban list API
///
/// Base KSoftAPI class
public BansAPI(KSoftAPI kSoftAPI) {
@@ -22,7 +22,8 @@ public BansAPI(KSoftAPI kSoftAPI) {
#region Bans API
///
- /// This endpoint allows you to add bans to the list. If you don't have BAN_MANAGER permission your ban will be automatically converted to a ban report and we will take a look and act accordingly.
+ /// This endpoint allows you to add bans to the list. If you don't have BAN_MANAGER permission your ban will be
+ /// automatically converted to a ban report and we will take a look and act accordingly.
///
/// Users Discord ID that you are banning/reporting
/// Reason why user should be globally banned
@@ -34,89 +35,78 @@ public BansAPI(KSoftAPI kSoftAPI) {
/// KSoftBan
public async Task AddBan(string userID, string reason, string proof, long mod = 0, string userName = "0", string userDiscriminator = "0", bool appealPossible = false) {
- NameValueCollection queries = new NameValueCollection();
+ var queries = new NameValueCollection {
+ {"user", userID},
+ {"reason", reason},
+ {"proof", proof},
+ {"mod", mod.ToString()},
+ {"user_name", userName},
+ {"user_discriminator", userDiscriminator},
+ {"appeal_possible", appealPossible.ToString()}
+ };
- queries.Add(name: "user", value: userID);
- queries.Add(name: "reason", value: reason);
- queries.Add(name: "proof", value: proof);
- queries.Add(name: "mod", value: mod.ToString());
- queries.Add(name: "user_name", value: userName);
- queries.Add(name: "user_discriminator", value: userDiscriminator);
- queries.Add(name: "appeal_possible", value: appealPossible.ToString());
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "bans/add", queries);
}
///
- /// Get more information about a ban
+ /// Get more information about a ban
///
/// Users Discord ID who's ban you'd like to check
/// KSoftBanInfo
public async Task BanInfo(string userID) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "user", value: userID);
+ var queries = new NameValueCollection {{"user", userID}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "bans/info", queries);
}
///
- /// Simple way to check if the user is banned
+ /// Simple way to check if the user is banned
///
/// Users Discord ID that you'd like to check
/// KSoftBanCheck
public async Task BanCheck(string userID) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "user", value: userID);
+ var queries = new NameValueCollection {{"user", userID}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "bans/check", queries);
}
///
- /// Delete a ban, only users with BAN_MANAGER permission can use this.
+ /// Delete a ban, only users with BAN_MANAGER permission can use this.
///
/// Users Discord ID
/// Default: false, if true it deletes the entry from the database instead of deactivating
/// KSoftBanDeletion
public async Task DeleteBan(string userID, bool force = false) {
- NameValueCollection queries = new NameValueCollection();
+ var queries = new NameValueCollection {{"user", userID}, {"force", force.ToString()}};
- queries.Add(name: "user", value: userID);
- queries.Add(name: "force", value: force.ToString());
return await _kSoftAPI.ExecuteAsync(HttpMethod.Delete, "bans/delete", queries);
}
///
- /// Pagination of bans, you can request up to 1000 records per page, default is 20.
+ /// Pagination of bans, you can request up to 1000 records per page, default is 20.
///
/// Page number (default: 1)
/// Number of bans per page (default: 20)
/// KSoftBanList
public async Task BanList(int page, int perPage) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "page", value: page.ToString());
- queries.Add(name: "per_page", value: perPage.ToString());
+ var queries = new NameValueCollection {{"page", page.ToString()}, {"per_page", perPage.ToString()}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "bans/list", queries);
}
///
- /// Gets updates from the previous update
+ /// Gets updates from the previous update
///
/// Timestamp in seconds from 1.1.1970 (epoch time)
/// KSoftBanUpdates
public async Task BanUpdates(DateTime timestamp) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "timestamp", value: ((DateTimeOffset)timestamp).ToUnixTimeSeconds().ToString());
+ var queries = new NameValueCollection {{"timestamp", ((DateTimeOffset)timestamp).ToUnixTimeSeconds().ToString()}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "bans/updates", queries);
}
#endregion
-
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/KSoft/ImagesAPI.cs b/KSoftNet/KSoft/ImagesAPI.cs
index fdab64e..29efbd1 100644
--- a/KSoftNet/KSoft/ImagesAPI.cs
+++ b/KSoftNet/KSoft/ImagesAPI.cs
@@ -1,17 +1,17 @@
-using KSoftNet.Models;
-using System.Collections.Specialized;
+using System.Collections.Specialized;
using System.Net.Http;
using System.Threading.Tasks;
+using KSoftNet.Models;
namespace KSoftNet.KSoft {
///
- /// Random hand-picked images, random memes from Reddit and other Reddit parsers.
+ /// Random hand-picked images, random memes from Reddit and other Reddit parsers.
///
public class ImagesAPI {
private readonly KSoftAPI _kSoftAPI;
///
- /// Random hand-picked images, random memes from Reddit and other Reddit parsers.
+ /// Random hand-picked images, random memes from Reddit and other Reddit parsers.
///
///
public ImagesAPI(KSoftAPI kSoftAPI) {
@@ -20,32 +20,27 @@ public ImagesAPI(KSoftAPI kSoftAPI) {
#region Images API
///
- /// Gets random image from the specified tag.
+ /// Gets random image from the specified tag.
///
/// Default: false, if to show nsfw content
- /// Name of the tag
+ /// Name of the tag
/// KSoftImage
public async Task RandomImage(string tag, bool nsfw = false) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "tag", value: tag);
- queries.Add(name: "nsfw", value: nsfw.ToString());
+ var queries = new NameValueCollection {{"tag", tag}, {"nsfw", nsfw.ToString()}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "images/random-image", queries);
}
///
- /// Retrieve the list of all available tags.
+ /// Retrieve the list of all available tags.
///
/// KSoftTags
public async Task Tags() {
- NameValueCollection queries = new NameValueCollection();
-
- return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "images/tags", queries);
+ return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "images/tags");
}
///
- /// Search for tags.
+ /// Search for tags.
///
/// Search query
/// KSoftTags
@@ -54,7 +49,7 @@ public async Task TagSearch(string query) {
}
///
- /// Retrieve image data.
+ /// Retrieve image data.
///
/// Image snowflake (unique ID)
/// KSoftImage
@@ -63,7 +58,7 @@ public async Task ImageFromSnowflake(string snowflake) {
}
///
- /// Retrieves a random meme from the cache. Source: reddit
+ /// Retrieves a random meme from the cache. Source: reddit
///
/// KSoftRedditPost
public async Task RandomMeme() {
@@ -71,57 +66,51 @@ public async Task RandomMeme() {
}
///
- /// Retrieves weird images from WikiHow
+ /// Retrieves weird images from WikiHow
///
/// Default: false, if to display nsfw content.
/// KSoftWikiHowPost
public async Task RandomWikiHow(bool nsfw = false) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "nsfw", value: nsfw.ToString());
+ var queries = new NameValueCollection {{"nsfw", nsfw.ToString()}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "images/random-wikihow", queries);
}
///
- /// Get random cute pictures, mostly animals.
+ /// Get random cute pictures, mostly animals.
///
/// KSoftRedditPost
public async Task RandomAww() {
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "images/random-meme");
-
}
///
- /// Retrieves random NSFW pics. (real life stuff)
+ /// Retrieves random NSFW pics. (real life stuff)
///
/// Default: false, if to retrieve gifs instead of images
/// KSoftRedditPost
public async Task RandomNsfw(bool gifs) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "gifs", value: gifs.ToString());
+ var queries = new NameValueCollection {{"gifs", gifs.ToString()}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "images/random-nsfw", queries);
}
///
- /// Retrieve images from the specified subreddit.
+ /// Retrieve images from the specified subreddit.
///
/// Specified subreddit
/// Default: false, if set to true, endpoint will filter out nsfw posts.
- /// Default: "day", value: select range from which to get the images. Can be one of the following: "hour", value: "day", value: "week", value: "month", value: "year", value: "all"
+ ///
+ /// Default: "day", value: select range from which to get the images. Can be one of the following:
+ /// "hour", value: "day", value: "week", value: "month", value: "year", value: "all"
+ ///
/// KSoftRedditPost
public async Task RandomReddit(string subreddit, bool removeNsfw, string span) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "remove-nsfw", value: removeNsfw.ToString());
- queries.Add(name: "span", value: span);
+ var queries = new NameValueCollection {{"remove-nsfw", removeNsfw.ToString()}, {"span", span}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, $"images/rand-reddit/{subreddit}", queries);
}
#endregion
-
}
}
\ No newline at end of file
diff --git a/KSoftNet/KSoft/KumoAPI.cs b/KSoftNet/KSoft/KumoAPI.cs
index 23dbd7b..e97bb3d 100644
--- a/KSoftNet/KSoft/KumoAPI.cs
+++ b/KSoftNet/KSoft/KumoAPI.cs
@@ -1,19 +1,20 @@
-using KSoftNet.Models;
-using System;
+using System;
using System.Collections.Specialized;
+using System.Globalization;
using System.Net.Http;
using System.Threading.Tasks;
+using KSoftNet.Models;
namespace KSoftNet.KSoft {
///
- /// This is advanced real-time information API for geo-spatial, weather and information gathering data
+ /// This is advanced real-time information API for geo-spatial, weather and information gathering data
///
public class KumoAPI {
private readonly KSoftAPI _kSoftAPI;
///
- /// This is advanced real-time information API for geo-spatial, weather and information gathering data
+ /// This is advanced real-time information API for geo-spatial, weather and information gathering data
///
/// Base KSoftAPI class
public KumoAPI(KSoftAPI kSoftAPI) {
@@ -23,57 +24,55 @@ public KumoAPI(KSoftAPI kSoftAPI) {
#region Kumo API
///
- /// Gets weather by location.
+ /// Gets weather by location.
///
- /// Select weather report type. Can be one of: "currently", value: "minutely", value: "hourly", value: "daily"
+ ///
+ /// Select weather report type. Can be one of: "currently", value: "minutely", value: "hourly",
+ /// value: "daily"
+ ///
/// Location query
- /// Default: auto, select units, you can choose from: "si", value: "us", value: "uk2", value: "ca", value: "auto"
- /// Default: en, select language, all available languages: 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'en', 'es', 'et', 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'ka', 'ko', 'kw', 'nb', 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'tet', 'tr', 'uk', 'x-pig-latin', 'zh', 'zh-tw'
+ ///
+ /// Default: auto, select units, you can choose from: "si", value: "us", value: "uk2", value: "ca",
+ /// value: "auto"
+ ///
+ ///
+ /// Default: en, select language, all available languages: 'ar', 'az', 'be', 'bg', 'bs', 'ca', 'cs',
+ /// 'da', 'de', 'el', 'en', 'es', 'et', 'fi', 'fr', 'he', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'ka', 'ko', 'kw', 'nb',
+ /// 'nl', 'no', 'pl', 'pt', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'tet', 'tr', 'uk', 'x-pig-latin', 'zh', 'zh-tw'
+ ///
/// Default: original, select icon pack
/// KSoftWeather
[Obsolete("Kumo weather endpoints are deprecated and not supported.")]
public async Task BasicWeather(string reportType, string query, string units = "auto", string language = "en", string icons = "original") {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "q", value: query);
- queries.Add(name: "units", value: units);
- queries.Add(name: "lang", value: language);
- queries.Add(name: "icons", value: icons);
+ var queries = new NameValueCollection {{"q", query}, {"units", units}, {"lang", language}, {"icons", icons}};
return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, $"kumo/weather/{reportType}", queries);
}
///
- /// Gets location data from the IP address.
+ /// Gets location data from the IP address.
///
/// IP address
/// KSoftGeoIP
public async Task GeoIP(string ip) {
- NameValueCollection queries = new NameValueCollection();
-
- queries.Add(name: "ip", value: ip);
+ var queries = new NameValueCollection {{"ip", ip}};
- return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, $"kumo/geoip", queries);
+ return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "kumo/geoip", queries);
}
///
- /// Currency conversion.
+ /// Currency conversion.
///
/// ISO Standard for 3 letter currency naming: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
/// ISO Standard for 3 letter currency naming: https://en.wikipedia.org/wiki/ISO_4217#Active_codes
/// Float or Integer you want to convert
/// KSoftCurrency
public async Task CurrencyConversion(string from, string to, float value) {
- NameValueCollection queries = new NameValueCollection();
+ var queries = new NameValueCollection {{"from", from}, {"to", to}, {"value", value.ToString(CultureInfo.InvariantCulture)}};
- queries.Add(name: "from", value: from);
- queries.Add(name: "to", value: to);
- queries.Add(name: "value", value: value.ToString());
-
- return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, $"kumo/currency", queries);
+ return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "kumo/currency", queries);
}
#endregion
-
}
}
\ No newline at end of file
diff --git a/KSoftNet/KSoft/MusicAPI.cs b/KSoftNet/KSoft/MusicAPI.cs
index 388d710..fbd8095 100644
--- a/KSoftNet/KSoft/MusicAPI.cs
+++ b/KSoftNet/KSoft/MusicAPI.cs
@@ -1,19 +1,21 @@
-using KSoftNet.Models;
-using Newtonsoft.Json;
-using System.Collections.Specialized;
+using System.Collections.Specialized;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
+using KSoftNet.Models;
+using Newtonsoft.Json;
namespace KSoftNet.KSoft {
///
- /// This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs, it can also search by lyrics and does not need a separate artist and song name entries.
+ /// This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs, it can also
+ /// search by lyrics and does not need a separate artist and song name entries.
///
public class MusicAPI {
private readonly KSoftAPI _kSoftAPI;
///
- /// This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs, it can also search by lyrics and does not need a separate artist and song name entries.
+ /// This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs, it can also
+ /// search by lyrics and does not need a separate artist and song name entries.
///
/// Base KSoftAPI class
public MusicAPI(KSoftAPI kSoftAPI) {
@@ -22,36 +24,32 @@ public MusicAPI(KSoftAPI kSoftAPI) {
#region Music API
///
- /// Searches for lyrics and returns a list of results.
+ /// Searches for lyrics and returns a list of results.
///
/// Search query.
/// Default: false, if set to 'true' then it only searches inside the lyrics.
/// Default: 10, how many results should the endpoint return.
/// KSoftLyrics
public async Task SearchLyrics(string query, bool textOnly, int limit) {
- NameValueCollection queries = new NameValueCollection();
+ var queries = new NameValueCollection {{"q", query}, {"text_only", textOnly.ToString()}, {"limit", limit.ToString()}};
- queries.Add(name: "q", value: query);
- queries.Add(name: "text_only", value: textOnly.ToString());
- queries.Add(name: "limit", value: limit.ToString());
-
- return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, $"lyrics/search", queries);
+ return await _kSoftAPI.ExecuteAsync(HttpMethod.Get, "lyrics/search", queries);
}
///
- /// Retrieves music recommendations based on tracks user inputs.
+ /// Retrieves music recommendations based on tracks user inputs.
///
/// List of tracks.
/// Format in which you'll provide tracks. Can be: youtube, youtube_ids, spotify
/// KSoftRecommendations
public async Task MusicRecommendations(string[] tracks, string provider) {
- StringContent json = new StringContent(JsonConvert.SerializeObject(new { tracks, provider }), Encoding.UTF8, "application/json");
+ var json = new StringContent(JsonConvert.SerializeObject(new {tracks, provider}), Encoding.UTF8, "application/json");
- return await _kSoftAPI.ExecuteAsync(HttpMethod.Post, $"music/recommendations", json);
+ return await _kSoftAPI.ExecuteAsync(HttpMethod.Post, "music/recommendations", json);
}
///
- /// Retrieves all albums and songs by that artist.
+ /// Retrieves all albums and songs by that artist.
///
/// Artist ID, you can get it from the lyrics search
/// KSoftArtistInfo
@@ -60,7 +58,7 @@ public async Task ArtistByID(int id) {
}
///
- /// Retrieves artist name and all tracks in the album.
+ /// Retrieves artist name and all tracks in the album.
///
/// Album ID, you can get it from the lyrics search
/// KSoftAlbumInfo
@@ -69,7 +67,7 @@ public async Task AlbumByID(int id) {
}
///
- /// Get info about a song.
+ /// Get info about a song.
///
/// Track ID, you can get it from artist by id, album by id or lyrics search endpoints
/// KSoftTrackInfo
@@ -78,6 +76,5 @@ public async Task TrackByID(int id) {
}
#endregion
-
}
}
\ No newline at end of file
diff --git a/KSoftNet/KSoftAPI.cs b/KSoftNet/KSoftAPI.cs
index 7b9ceac..35ba0b1 100644
--- a/KSoftNet/KSoftAPI.cs
+++ b/KSoftNet/KSoftAPI.cs
@@ -1,48 +1,48 @@
-using Newtonsoft.Json;
-using System;
+using System;
using System.Collections.Specialized;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;
using System.Web;
using KSoftNet.KSoft;
+using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
-using System.Net;
namespace KSoftNet {
///
- /// KSoftAPI class
+ /// KSoftAPI class
///
public class KSoftAPI {
///
- /// Base KSoft API url. Don't change unless you know what you're doing
+ /// Base KSoft API url. Don't change unless you know what you're doing
///
- public string BaseUrl = "https://api.ksoft.si/";
+ public const string BaseUrl = "https://api.ksoft.si/";
private readonly HttpClient _httpClient;
///
- /// Random hand-picked images, random memes from Reddit and other Reddit parsers.
+ /// Advanced and powerful global ban list API
///
- public ImagesAPI imagesAPI;
+ public readonly BansAPI bansAPI;
///
- /// This is advanced real-time information API for geo-spatial, weather and information gathering data
+ /// Random hand-picked images, random memes from Reddit and other Reddit parsers.
///
- public KumoAPI kumoAPI;
+ public readonly ImagesAPI imagesAPI;
///
- /// Advanced and powerful global ban list API
+ /// This is advanced real-time information API for geo-spatial, weather and information gathering data
///
- public BansAPI bansAPI;
+ public readonly KumoAPI kumoAPI;
///
- /// This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs, it can also search by lyrics and does not need a separate artist and song name entries.
+ /// This API provides deep and powerful tools for searching lyrics, artists or albums. Unlike other APIs, it can also
+ /// search by lyrics and does not need a separate artist and song name entries.
///
- public MusicAPI musicAPI;
+ public readonly MusicAPI musicAPI;
///
- /// KSoftAPI class
+ /// KSoftAPI class
///
/// KSoft api token located on your dashboard
public KSoftAPI(string accountToken) {
@@ -55,41 +55,34 @@ public KSoftAPI(string accountToken) {
musicAPI = new MusicAPI(this);
}
- private async Task DoShitAsync(HttpMethod method, string endpoint, NameValueCollection queries = null, StringContent jsonContent = null) where T : new() {
- UriBuilder builder = new UriBuilder(BaseUrl) {
- Port = -1,
- Path = endpoint,
- };
+ private async Task DoShitAsync(HttpMethod method, string endpoint, NameValueCollection queries = null,
+ HttpContent jsonContent = null) where T : new() {
+ var builder = new UriBuilder(BaseUrl) {Port = -1, Path = endpoint};
- NameValueCollection query = HttpUtility.ParseQueryString(builder.Query);
+ var query = HttpUtility.ParseQueryString(builder.Query);
- if (queries != null)
- query.Add(queries);
+ if (queries != null) query.Add(queries);
builder.Query = query.ToString();
- string url = builder.ToString();
+ var url = builder.ToString();
HttpResponseMessage response;
- if (jsonContent != null) {
+ if (jsonContent != null)
response = await _httpClient.PostAsync(url, jsonContent);
- } else {
+ else
response = await _httpClient.SendAsync(new HttpRequestMessage(method, url));
- }
- if (!response.IsSuccessStatusCode) {
- throw new HttpRequestException("401: Unauthorized. Is your token valid?");
- }
+ if (!response.IsSuccessStatusCode) throw new HttpRequestException("401: Unauthorized. Is your token valid?");
- return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync(), new JsonSerializerSettings {
- ContractResolver = new DefaultContractResolver {
- NamingStrategy = new SnakeCaseNamingStrategy()
- }
- });
+ return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync(),
+ new JsonSerializerSettings {
+ ContractResolver = new DefaultContractResolver {NamingStrategy = new SnakeCaseNamingStrategy()}
+ });
}
- ///
- /// Get response from the specified KSoft endpoint
+ ///
+ /// Get response from the specified KSoft endpoint
///
/// JSON deserialization response model
/// HTTP Method
@@ -97,43 +90,46 @@ public KSoftAPI(string accountToken) {
/// Name Value Collection of query names and values
/// JSON body
/// Deserialized JSON model
- public async Task ExecuteAsync(HttpMethod method, string endpoint, NameValueCollection queries = null, StringContent jsonContent = null) where T : new() {
+ public async Task ExecuteAsync(HttpMethod method, string endpoint, NameValueCollection queries,
+ StringContent jsonContent) where T : new() {
return await DoShitAsync(method, endpoint, queries, jsonContent);
}
///
- /// Get response from the specified KSoft endpoint
+ /// Get response from the specified KSoft endpoint
///
/// JSON deserialization response model
/// HTTP Method
/// Endpoint URL
/// Name Value Collection of query names and values
/// Deserialized JSON model
- public async Task ExecuteAsync(HttpMethod method, string endpoint, NameValueCollection queries = null) where T : new() {
+ public async Task ExecuteAsync(HttpMethod method, string endpoint, NameValueCollection queries)
+ where T : new() {
return await DoShitAsync(method, endpoint, queries);
}
///
- /// Get response from the specified KSoft endpoint
+ /// Get response from the specified KSoft endpoint
///
/// JSON deserialization response model
/// HTTP Method
/// Endpoint URL
/// JSON body
/// Deserialized JSON model
- public async Task ExecuteAsync(HttpMethod method, string endpoint, StringContent jsonContent = null) where T : new() {
+ public async Task ExecuteAsync(HttpMethod method, string endpoint, StringContent jsonContent)
+ where T : new() {
return await DoShitAsync(method, endpoint, null, jsonContent);
}
///
- /// Get response from the specified KSoft endpoint
+ /// Get response from the specified KSoft endpoint
///
/// JSON deserialization response model
/// HTTP Method
/// Endpoint URL
/// Deserialized JSON model
public async Task ExecuteAsync(HttpMethod method, string endpoint) where T : new() {
- return await DoShitAsync(method, endpoint, null, null);
+ return await DoShitAsync(method, endpoint);
}
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/KSoftNet.csproj b/KSoftNet/KSoftNet.csproj
index 5665815..f453ea7 100644
--- a/KSoftNet/KSoftNet.csproj
+++ b/KSoftNet/KSoftNet.csproj
@@ -9,18 +9,23 @@
en-UStrueKSoftNet
- 3.0.0.0
- 3.0.0.0
+ 3.0.1.0
+ 3.0.1.0GPL-3.0-onlyhttps://github.com/KSoft-Si/KSoft.Nettrue
+ 3.0.1bin\Debug\netcoreapp2.0\KSoftNet.xml
+
+ bin\Release\KSoftNet.xml
+
+
diff --git a/KSoftNet/Models/KSoftAlbumInfo.cs b/KSoftNet/Models/KSoftAlbumInfo.cs
index d3af78d..78a3ac5 100644
--- a/KSoftNet/Models/KSoftAlbumInfo.cs
+++ b/KSoftNet/Models/KSoftAlbumInfo.cs
@@ -26,4 +26,4 @@ public class KSoftAlbumInfo {
public bool Error { get; set; }
public string Message { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftCurrency.cs b/KSoftNet/Models/KSoftCurrency.cs
index 16e58ea..1d50e6b 100644
--- a/KSoftNet/Models/KSoftCurrency.cs
+++ b/KSoftNet/Models/KSoftCurrency.cs
@@ -8,4 +8,4 @@ public class KSoftCurrency {
public int Code { get; set; }
public string Message { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftImage.cs b/KSoftNet/Models/KSoftImage.cs
index 95f4b69..26aa0db 100644
--- a/KSoftNet/Models/KSoftImage.cs
+++ b/KSoftNet/Models/KSoftImage.cs
@@ -7,19 +7,8 @@ public class KSoftImage {
// Error
- ///
- /// Error code
- ///
public int Code { get; set; }
-
- ///
- /// Error message
- ///
public string Message { get; set; }
-
- ///
- /// Error
- ///
public bool Cache { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftRedditPost.cs b/KSoftNet/Models/KSoftRedditPost.cs
index 5008d94..290b90a 100644
--- a/KSoftNet/Models/KSoftRedditPost.cs
+++ b/KSoftNet/Models/KSoftRedditPost.cs
@@ -1,6 +1,5 @@
namespace KSoftNet.Models {
- public class KSoftRedditPost
- {
+ public class KSoftRedditPost {
public string Title { get; set; }
public string ImageUrl { get; set; }
public string Source { get; set; }
@@ -15,4 +14,4 @@ public class KSoftRedditPost
public bool MetaCached { get; set; }
public bool MetaProcessed { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftTags.cs b/KSoftNet/Models/KSoftTags.cs
index 816d9f7..7870e43 100644
--- a/KSoftNet/Models/KSoftTags.cs
+++ b/KSoftNet/Models/KSoftTags.cs
@@ -11,4 +11,4 @@ public class KSoftTags {
public IList Tags { get; set; }
public IList NsfwTags { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftTrackInfo.cs b/KSoftNet/Models/KSoftTrackInfo.cs
index f6e28ee..6af9ea2 100644
--- a/KSoftNet/Models/KSoftTrackInfo.cs
+++ b/KSoftNet/Models/KSoftTrackInfo.cs
@@ -50,4 +50,4 @@ public class KSoftTrackInfo {
public string Url { get; set; }
public int Popularity { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftWeather.cs b/KSoftNet/Models/KSoftWeather.cs
index 747b928..a7a5a20 100644
--- a/KSoftNet/Models/KSoftWeather.cs
+++ b/KSoftNet/Models/KSoftWeather.cs
@@ -52,4 +52,4 @@ public class KSoftWeather {
public string Message { get; set; }
public KSoftWeatherData Data { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/KSoftNet/Models/KSoftWikiHowPost.cs b/KSoftNet/Models/KSoftWikiHowPost.cs
index 9104685..bfb9b32 100644
--- a/KSoftNet/Models/KSoftWikiHowPost.cs
+++ b/KSoftNet/Models/KSoftWikiHowPost.cs
@@ -5,4 +5,4 @@ public class KSoftWikiHowPost {
public bool Nsfw { get; set; }
public string ArticleUrl { get; set; }
}
-}
+}
\ No newline at end of file