From 557a1a698162dfcd75733cad2a75144783765fb9 Mon Sep 17 00:00:00 2001 From: AlphaNecron Date: Tue, 22 Jun 2021 16:43:21 +0700 Subject: [PATCH] Updated xmldoc --- Kutt.NET/Domains/Domain.cs | 26 ++++++------- Kutt.NET/DomainsEndpoint.cs | 12 +++--- Kutt.NET/Kutt.NET.csproj | 6 +-- Kutt.NET/KuttException.cs | 5 +-- Kutt.NET/Links/Link.cs | 37 ++++++++---------- Kutt.NET/Links/LinkStats/Data.cs | 11 ++---- Kutt.NET/Links/LinkStats/LinkStats.cs | 56 +++++++++++++++------------ Kutt.NET/Links/LinkStats/Stats.cs | 18 ++++----- Kutt.NET/Links/LinkStats/StatsItem.cs | 10 ++--- Kutt.NET/Links/ListOfLinks.cs | 18 ++++----- Kutt.NET/LinksEndpoint.cs | 32 ++++++++------- Kutt.NET/Users/UserInfo.cs | 9 +++++ Kutt.NET/UsersEndpoint.cs | 6 +-- 13 files changed, 127 insertions(+), 119 deletions(-) diff --git a/Kutt.NET/Domains/Domain.cs b/Kutt.NET/Domains/Domain.cs index f652a0f..63b4a0a 100644 --- a/Kutt.NET/Domains/Domain.cs +++ b/Kutt.NET/Domains/Domain.cs @@ -4,44 +4,44 @@ namespace Kutt.NET.Domains { /// - /// Json Properties for Domain + /// Json Properties for Domain /// public class Domain { /// - /// Domain address + /// Domain's address /// [JsonProperty("address")] public string Address { get; private set; } - + /// - /// Domain status + /// Domain's status /// [JsonProperty("banned")] public bool IsBanned { get; private set; } - + /// - /// Domain unique ID + /// Domain's unique ID /// [JsonProperty("id")] public string Uuid { get; private set; } - + /// - /// Creation date + /// Domain's creation date /// [JsonProperty("created_at")] public DateTime CreatedAt { get; private set; } - + /// - /// Domain homepage + /// Domain's homepage /// [JsonProperty("homepage")] public string Homepage { get; private set; } - + /// - /// Update date + /// Domain's update date /// [JsonProperty("updated_at")] public DateTime UpdatedAt { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/DomainsEndpoint.cs b/Kutt.NET/DomainsEndpoint.cs index 91df264..790e7f4 100644 --- a/Kutt.NET/DomainsEndpoint.cs +++ b/Kutt.NET/DomainsEndpoint.cs @@ -1,7 +1,6 @@ using System; using System.Threading.Tasks; using Kutt.NET.Domains; -using Kutt.NET.Links; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using RestSharp; @@ -12,17 +11,16 @@ namespace Kutt.NET public partial class KuttApi { /// - /// Add a new domain to your account + /// Add a new domain to your account /// /// Domain address /// Domain homepage - /// Created domain + /// Created domain as public async Task CreateDomainAsync(string address, string homepage = "") { var body = new { - address = address ?? throw new ArgumentNullException(nameof(address)), - homepage = homepage + address = address ?? throw new ArgumentNullException(nameof(address)), homepage }; var request = new RestRequest(DOMAINS_ENDPOINT, DataFormat.Json); request.AddJsonBody(body); @@ -35,7 +33,7 @@ public async Task CreateDomainAsync(string address, string homepage = "" } /// - /// Remove a domain from your account + /// Remove a domain from your account /// /// Domain unique ID public async Task DeleteDomainAsync(string uuid) @@ -48,4 +46,4 @@ public async Task DeleteDomainAsync(string uuid) ($"{(int) response.StatusCode}: {(JObject.Parse(response.Content)["error"] ?? "").Value()}"); } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Kutt.NET.csproj b/Kutt.NET/Kutt.NET.csproj index 2d94e13..b5e76af 100644 --- a/Kutt.NET/Kutt.NET.csproj +++ b/Kutt.NET/Kutt.NET.csproj @@ -10,11 +10,11 @@ https://github.com/AlphaNecron/Kutt.NET git kutt url-shortener netstandard library - 1.0.1 - 1.0.1 + 1.0.2 + 1.0.2 kutt.png MIT - 1.0.1 + 1.0.2 diff --git a/Kutt.NET/KuttException.cs b/Kutt.NET/KuttException.cs index 89b75c8..4e36da2 100644 --- a/Kutt.NET/KuttException.cs +++ b/Kutt.NET/KuttException.cs @@ -2,9 +2,6 @@ namespace Kutt.NET { - /// - /// Kutt Exception Class - /// public class KuttException : Exception { public KuttException(string message) : base(message) @@ -13,4 +10,4 @@ public KuttException(string message) : base(message) public override string StackTrace => ""; } -} +} \ No newline at end of file diff --git a/Kutt.NET/Links/Link.cs b/Kutt.NET/Links/Link.cs index 4b3592b..f440428 100644 --- a/Kutt.NET/Links/Link.cs +++ b/Kutt.NET/Links/Link.cs @@ -3,63 +3,60 @@ namespace Kutt.NET.Links { - /// - /// Link Json Properties - /// public class Link { /// - /// Link slug, eg: abc123 + /// Link's slug, eg: abc123 /// [JsonProperty("address")] public string Address { get; private set; } - + /// - /// Link status + /// Link's status /// [JsonProperty("banned")] public bool IsBanned { get; private set; } /// - /// Creation date + /// Link's creation date /// [JsonProperty("created_at")] public DateTime CreatedAt { get; private set; } - + /// - /// Link unique ID + /// Link's unique ID /// [JsonProperty("id")] public string Uuid { get; private set; } - + /// - /// Shortened link + /// Shortened link /// [JsonProperty("link")] public string ShortUrl { get; private set; } - + /// - /// Original link + /// Original link (long) /// [JsonProperty("target")] public string LongUrl { get; private set; } - + /// - /// Description of the link + /// Description of the link /// [JsonProperty("description")] public string Description { get; private set; } - + /// - /// Update date + /// Link's update date /// [JsonProperty("updated_at")] public DateTime UpdatedAt { get; private set; } - + /// - /// Visit count + /// Link's visit count /// [JsonProperty("visit_count")] public int Clicks { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Links/LinkStats/Data.cs b/Kutt.NET/Links/LinkStats/Data.cs index b3d76a0..c0f489c 100644 --- a/Kutt.NET/Links/LinkStats/Data.cs +++ b/Kutt.NET/Links/LinkStats/Data.cs @@ -2,21 +2,18 @@ namespace Kutt.NET.Links.LinkStats { - /// - /// Json Properties for Data.cs - /// public class Data { /// - /// Name + /// Name /// [JsonProperty("name")] public string Name { get; private set; } - + /// - /// Value + /// Value /// [JsonProperty("value")] public int Value { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Links/LinkStats/LinkStats.cs b/Kutt.NET/Links/LinkStats/LinkStats.cs index 6c879a5..1b0c04a 100644 --- a/Kutt.NET/Links/LinkStats/LinkStats.cs +++ b/Kutt.NET/Links/LinkStats/LinkStats.cs @@ -4,80 +4,86 @@ namespace Kutt.NET.Links.LinkStats { /// - /// Json Properties for LinkStats.cs + /// Json Properties for LinkStats.cs /// public class LinkStats { /// - /// All Time + /// All time stats /// [JsonProperty("allTime")] public StatsItem AllTime { get; private set; } - + /// - /// Last Day + /// Last day's stats /// [JsonProperty("lastDay")] public StatsItem LastDay { get; private set; } - + /// - /// Last Week + /// Last week's stats /// [JsonProperty("lastWeek")] public StatsItem LastWeek { get; private set; } - + /// - /// Last Month + /// Last month's stats /// [JsonProperty("lastMonth")] public StatsItem LastMonth { get; private set; } - + /// - /// Updated At + /// Update date /// [JsonProperty("updatedAt")] public DateTime UpdatedAt { get; private set; } - + /// - /// Address + /// Link's slug, eg: abc123 /// [JsonProperty("address")] public string Address { get; private set; } - + /// - /// Domain Banned + /// Link's status /// [JsonProperty("banned")] public bool IsBanned { get; private set; } - + /// - /// CreatedAt + /// Link's creation date /// [JsonProperty("created_at")] public DateTime CreatedAt { get; private set; } - + /// - /// ID + /// Link's unique ID /// [JsonProperty("id")] public string Uuid { get; private set; } - + /// - /// Password + /// Has password /// [JsonProperty("password")] public bool HasPassword { get; private set; } - + /// - /// Target + /// Shortened link + /// + [JsonProperty("link")] + public string Link { get; private set; } + + /// + /// Original link (long) /// [JsonProperty("target")] public string Target { get; private set; } - + /// - /// Visit Counts + /// Visit Counts /// [JsonProperty("visit_count")] public int Clicks { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Links/LinkStats/Stats.cs b/Kutt.NET/Links/LinkStats/Stats.cs index 0a450f9..325e5f0 100644 --- a/Kutt.NET/Links/LinkStats/Stats.cs +++ b/Kutt.NET/Links/LinkStats/Stats.cs @@ -3,32 +3,32 @@ namespace Kutt.NET.Links.LinkStats { /// - /// Json Properties for Domain Stats + /// Json Properties for Domain Stats /// public class Stats { /// - /// Browser + /// Browser /// [JsonProperty("browser")] public Data[] BrowserStats { get; private set; } - + /// - /// Operating System + /// Operating System /// [JsonProperty("os")] public Data[] OsStats { get; private set; } - + /// - /// Country + /// Country /// [JsonProperty("country")] public Data[] CountryStats { get; private set; } - + /// - /// Referrer Stats + /// Referrer Stats /// [JsonProperty("referrer")] public Data[] ReferrerStats { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Links/LinkStats/StatsItem.cs b/Kutt.NET/Links/LinkStats/StatsItem.cs index b432e91..687ea76 100644 --- a/Kutt.NET/Links/LinkStats/StatsItem.cs +++ b/Kutt.NET/Links/LinkStats/StatsItem.cs @@ -3,20 +3,20 @@ namespace Kutt.NET.Links.LinkStats { /// - /// Json Properties for StatsItem + /// Json Properties for StatsItem /// public class StatsItem { /// - /// Stats + /// Stats /// [JsonProperty("stats")] public Stats Stats { get; private set; } - + /// - /// Viewers + /// View count /// [JsonProperty("views")] public int[] Views { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Links/ListOfLinks.cs b/Kutt.NET/Links/ListOfLinks.cs index c75cc1a..9b9d56b 100644 --- a/Kutt.NET/Links/ListOfLinks.cs +++ b/Kutt.NET/Links/ListOfLinks.cs @@ -3,32 +3,32 @@ namespace Kutt.NET.Links { /// - /// Json Propeties for ListOfLinks + /// Json Propeties for ListOfLinks /// public class ListOfLinks { /// - /// Query limit + /// Query limit /// [JsonProperty("limit")] public int Limit { get; private set; } - + /// - /// Amount of queries to skip + /// Amount of links to skip /// [JsonProperty("skip")] public int Skip { get; private set; } - + /// - /// Total queries + /// Total link count /// [JsonProperty("total")] public int Total { get; private set; } - + /// - /// Links + /// List of links /// [JsonProperty("data")] public Link[] Links { get; private set; } } -} +} \ No newline at end of file diff --git a/Kutt.NET/LinksEndpoint.cs b/Kutt.NET/LinksEndpoint.cs index c034d0f..0bdd1a4 100644 --- a/Kutt.NET/LinksEndpoint.cs +++ b/Kutt.NET/LinksEndpoint.cs @@ -10,17 +10,19 @@ namespace Kutt.NET { /// - /// Link Endpoint Class + /// Link Endpoint Class /// public partial class KuttApi { /// - /// Get list of Link + /// Get list of Link /// - /// The Limit Amount - /// The Skip Amount - /// Total Amount - /// + /// Query limit + /// Amount of links to skip + /// Get all links + /// + /// + /// public async Task GetListOfLinksAsync( int limit = 10, int skip = 0, @@ -39,7 +41,7 @@ public async Task GetListOfLinksAsync( } /// - /// Delete Link + /// Delete a link /// /// UUID public async Task DeleteLinkAsync(string uuid) @@ -53,13 +55,13 @@ public async Task DeleteLinkAsync(string uuid) } /// - /// Update a link + /// Update a link /// /// UUID /// Target /// Slug /// The Description - /// Updated link as + /// Updated link as public async Task UpdateLinkAsync( string uuid, string target, @@ -85,10 +87,12 @@ public async Task UpdateLinkAsync( } /// - /// Get link stats + /// Get link stats /// /// Link unique ID - /// + /// + /// + /// public async Task GetLinkStatsAsync(string uuid) { var request = new RestRequest(LINK_STATS_ENDPOINT, Method.PATCH, DataFormat.Json); @@ -102,7 +106,7 @@ public async Task GetLinkStatsAsync(string uuid) } /// - /// Create Link + /// Create Link /// /// Long URL /// Domain @@ -110,7 +114,7 @@ public async Task GetLinkStatsAsync(string uuid) /// Slug /// Reuse /// Password - /// Shortened link as + /// Shortened link as public async Task CreateLinkAsync( string longUrl, string domain = "", @@ -138,4 +142,4 @@ public async Task CreateLinkAsync( return JsonConvert.DeserializeObject(content); } } -} +} \ No newline at end of file diff --git a/Kutt.NET/Users/UserInfo.cs b/Kutt.NET/Users/UserInfo.cs index 77b86a7..2a66368 100644 --- a/Kutt.NET/Users/UserInfo.cs +++ b/Kutt.NET/Users/UserInfo.cs @@ -5,12 +5,21 @@ namespace Kutt.NET.Users { public class UserInfo { + /// + /// User's API key + /// [JsonProperty("apikey")] public string ApiKey { get; private set; } + /// + /// User's email + /// [JsonProperty("email")] public string Email { get; private set; } + /// + /// List of domains + /// [JsonProperty("domains")] public Domain[] Domains { get; private set; } } diff --git a/Kutt.NET/UsersEndpoint.cs b/Kutt.NET/UsersEndpoint.cs index 55081d4..dc13b25 100644 --- a/Kutt.NET/UsersEndpoint.cs +++ b/Kutt.NET/UsersEndpoint.cs @@ -8,12 +8,12 @@ namespace Kutt.NET { /// - /// Users Endpoint Class + /// Users Endpoint Class /// public partial class KuttApi { /// - /// Get user info + /// Get user info /// /// User info public async Task GetUserInfoAsync() @@ -27,4 +27,4 @@ public async Task GetUserInfoAsync() return JsonConvert.DeserializeObject(content); } } -} +} \ No newline at end of file