Skip to content

Commit

Permalink
Updated xmldoc
Browse files Browse the repository at this point in the history
  • Loading branch information
AlphaNecron committed Jun 22, 2021
1 parent 720eed0 commit 557a1a6
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 119 deletions.
26 changes: 13 additions & 13 deletions Kutt.NET/Domains/Domain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,44 @@
namespace Kutt.NET.Domains
{
/// <summary>
/// Json Properties for Domain
/// Json Properties for Domain
/// </summary>
public class Domain
{
/// <summary>
/// Domain address
/// Domain's address
/// </summary>
[JsonProperty("address")]
public string Address { get; private set; }

/// <summary>
/// Domain status
/// Domain's status
/// </summary>
[JsonProperty("banned")]
public bool IsBanned { get; private set; }

/// <summary>
/// Domain unique ID
/// Domain's unique ID
/// </summary>
[JsonProperty("id")]
public string Uuid { get; private set; }

/// <summary>
/// Creation date
/// Domain's creation date
/// </summary>
[JsonProperty("created_at")]
public DateTime CreatedAt { get; private set; }

/// <summary>
/// Domain homepage
/// Domain's homepage
/// </summary>
[JsonProperty("homepage")]
public string Homepage { get; private set; }

/// <summary>
/// Update date
/// Domain's update date
/// </summary>
[JsonProperty("updated_at")]
public DateTime UpdatedAt { get; private set; }
}
}
}
12 changes: 5 additions & 7 deletions Kutt.NET/DomainsEndpoint.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -12,17 +11,16 @@ namespace Kutt.NET
public partial class KuttApi
{
/// <summary>
/// Add a new domain to your account
/// Add a new domain to your account
/// </summary>
/// <param name="address">Domain address</param>
/// <param name="homepage">Domain homepage</param>
/// <returns>Created domain</returns>
/// <returns>Created domain as <see cref="Domain" /></returns>
public async Task<Domain> 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);
Expand All @@ -35,7 +33,7 @@ public async Task<Domain> CreateDomainAsync(string address, string homepage = ""
}

/// <summary>
/// Remove a domain from your account
/// Remove a domain from your account
/// </summary>
/// <param name="uuid">Domain unique ID</param>
public async Task DeleteDomainAsync(string uuid)
Expand All @@ -48,4 +46,4 @@ public async Task DeleteDomainAsync(string uuid)
($"{(int) response.StatusCode}: {(JObject.Parse(response.Content)["error"] ?? "").Value<string>()}");
}
}
}
}
6 changes: 3 additions & 3 deletions Kutt.NET/Kutt.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<RepositoryUrl>https://github.com/AlphaNecron/Kutt.NET</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>kutt url-shortener netstandard library</PackageTags>
<AssemblyVersion>1.0.1</AssemblyVersion>
<FileVersion>1.0.1</FileVersion>
<AssemblyVersion>1.0.2</AssemblyVersion>
<FileVersion>1.0.2</FileVersion>
<PackageIcon>kutt.png</PackageIcon>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageVersion>1.0.1</PackageVersion>
<PackageVersion>1.0.2</PackageVersion>
</PropertyGroup>
<ItemGroup>
<None Include="kutt.png" Pack="true" PackagePath="$(PackageIcon)"/>
Expand Down
5 changes: 1 addition & 4 deletions Kutt.NET/KuttException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

namespace Kutt.NET
{
/// <summary>
/// Kutt Exception Class
/// </summary>
public class KuttException : Exception
{
public KuttException(string message) : base(message)
Expand All @@ -13,4 +10,4 @@ public KuttException(string message) : base(message)

public override string StackTrace => "";
}
}
}
37 changes: 17 additions & 20 deletions Kutt.NET/Links/Link.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,60 @@

namespace Kutt.NET.Links
{
/// <summary>
/// Link Json Properties
/// </summary>
public class Link
{
/// <summary>
/// Link slug, eg: abc123
/// Link's slug, eg: abc123
/// </summary>
[JsonProperty("address")]
public string Address { get; private set; }

/// <summary>
/// Link status
/// Link's status
/// </summary>
[JsonProperty("banned")]
public bool IsBanned { get; private set; }

/// <summary>
/// Creation date
/// Link's creation date
/// </summary>
[JsonProperty("created_at")]
public DateTime CreatedAt { get; private set; }

/// <summary>
/// Link unique ID
/// Link's unique ID
/// </summary>
[JsonProperty("id")]
public string Uuid { get; private set; }

/// <summary>
/// Shortened link
/// Shortened link
/// </summary>
[JsonProperty("link")]
public string ShortUrl { get; private set; }

/// <summary>
/// Original link
/// Original link (long)
/// </summary>
[JsonProperty("target")]
public string LongUrl { get; private set; }

/// <summary>
/// Description of the link
/// Description of the link
/// </summary>
[JsonProperty("description")]
public string Description { get; private set; }

/// <summary>
/// Update date
/// Link's update date
/// </summary>
[JsonProperty("updated_at")]
public DateTime UpdatedAt { get; private set; }

/// <summary>
/// Visit count
/// Link's visit count
/// </summary>
[JsonProperty("visit_count")]
public int Clicks { get; private set; }
}
}
}
11 changes: 4 additions & 7 deletions Kutt.NET/Links/LinkStats/Data.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

namespace Kutt.NET.Links.LinkStats
{
/// <summary>
/// Json Properties for Data.cs
/// </summary>
public class Data
{
/// <summary>
/// Name
/// Name
/// </summary>
[JsonProperty("name")]
public string Name { get; private set; }

/// <summary>
/// Value
/// Value
/// </summary>
[JsonProperty("value")]
public int Value { get; private set; }
}
}
}
56 changes: 31 additions & 25 deletions Kutt.NET/Links/LinkStats/LinkStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,86 @@
namespace Kutt.NET.Links.LinkStats
{
/// <summary>
/// Json Properties for LinkStats.cs
/// Json Properties for LinkStats.cs
/// </summary>
public class LinkStats
{
/// <summary>
/// All Time
/// All time stats
/// </summary>
[JsonProperty("allTime")]
public StatsItem AllTime { get; private set; }

/// <summary>
/// Last Day
/// Last day's stats
/// </summary>
[JsonProperty("lastDay")]
public StatsItem LastDay { get; private set; }

/// <summary>
/// Last Week
/// Last week's stats
/// </summary>
[JsonProperty("lastWeek")]
public StatsItem LastWeek { get; private set; }

/// <summary>
/// Last Month
/// Last month's stats
/// </summary>
[JsonProperty("lastMonth")]
public StatsItem LastMonth { get; private set; }

/// <summary>
/// Updated At
/// Update date
/// </summary>
[JsonProperty("updatedAt")]
public DateTime UpdatedAt { get; private set; }

/// <summary>
/// Address
/// Link's slug, eg: abc123
/// </summary>
[JsonProperty("address")]
public string Address { get; private set; }

/// <summary>
/// Domain Banned
/// Link's status
/// </summary>
[JsonProperty("banned")]
public bool IsBanned { get; private set; }

/// <summary>
/// CreatedAt
/// Link's creation date
/// </summary>
[JsonProperty("created_at")]
public DateTime CreatedAt { get; private set; }

/// <summary>
/// ID
/// Link's unique ID
/// </summary>
[JsonProperty("id")]
public string Uuid { get; private set; }

/// <summary>
/// Password
/// Has password
/// </summary>
[JsonProperty("password")]
public bool HasPassword { get; private set; }

/// <summary>
/// Target
/// Shortened link
/// </summary>
[JsonProperty("link")]
public string Link { get; private set; }

/// <summary>
/// Original link (long)
/// </summary>
[JsonProperty("target")]
public string Target { get; private set; }

/// <summary>
/// Visit Counts
/// Visit Counts
/// </summary>
[JsonProperty("visit_count")]
public int Clicks { get; private set; }
}
}
}
Loading

0 comments on commit 557a1a6

Please sign in to comment.