-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
147b13b
commit 5d6faaf
Showing
8 changed files
with
109 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace DevRant.Dtos | ||
{ | ||
/// <summary> | ||
/// Represents a data-transfer-object used for basic information about a rant. | ||
/// </summary> | ||
public class RantInfo | ||
{ | ||
/// <summary> | ||
/// Represents the identity of the rant. | ||
/// </summary> | ||
[JsonProperty("id")] | ||
public int Id { get; set; } | ||
|
||
/// <summary> | ||
/// Represents the text of the rant. | ||
/// </summary> | ||
[JsonProperty("text")] | ||
public string Text { get; set; } | ||
|
||
/// <summary> | ||
/// Represents the number of upvotes of the rant. | ||
/// </summary> | ||
[JsonProperty("num_upvotes")] | ||
public int NrOfUpvotes { get; set; } | ||
|
||
/// <summary> | ||
/// Represents the number of downvotes of the rant. | ||
/// </summary> | ||
[JsonProperty("num_downvotes")] | ||
public int NrOfDownvotes { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace DevRant.Dtos | ||
{ | ||
/// <summary> | ||
/// Represents an enum which indicates the sorting of the rants list. | ||
/// </summary> | ||
public enum RantSort | ||
{ | ||
/// <summary> | ||
/// Indicates that the sorting is by algorithm. | ||
/// </summary> | ||
Algo = 0, | ||
|
||
/// <summary> | ||
/// Indicates that the sorting is by most recent. | ||
/// </summary> | ||
Recent = 1, | ||
|
||
/// <summary> | ||
/// Indicates that the sorting is by most upvotes. | ||
/// </summary> | ||
Top = 2 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters