Skip to content

Commit 7dc8250

Browse files
author
Hariharan Subramanian
committed
Added xml comments for all Public facing Members and methods
1 parent f4b2e24 commit 7dc8250

18 files changed

+449
-75
lines changed

Diff for: Sample/ConsoleApp/Program.cs

+12-12
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using StackExchange.NET.Models;
66

77
namespace StackExchange.NET_Example
8-
{
8+
{
99
class Program
1010
{
1111
static void Main(string[] args)
@@ -17,14 +17,14 @@ static void Main(string[] args)
1717
Page = 1,
1818
Sort = Sort.Votes
1919
};
20-
var res = client.Answers.GetAllAnswers(null);
21-
// var answers = client.Answers.GetAllAnswers(queryString);
20+
21+
// var answers = client.Answers.GetAllAnswers(queryString);
2222
var ids = new List<string>()
2323
{
2424
"44164379","6841479"
2525
};
2626
//var answers = client.Answers.GetAnswerByIds(ids, queryString);
27-
//var answers = client.Answers.GetCommentsByIds(ids, queryString);
27+
//var answers = client.Answers.GetCommentsOnAnswers(ids, queryString);
2828
//var answers = client.Answers.GetQuestionByAnswerIds(ids, queryString);
2929

3030
var badgeFilter = new BadgeFilters()
@@ -40,8 +40,8 @@ static void Main(string[] args)
4040
//var getBadgesByIds = client.Badges.GetNonTaggedBadges(batchIds, badgeFilter);
4141
//var getBadgesByIds = client.Badges.GetBadgesByIds(batchIds, badgeFilter);
4242
//var getBadgesByIds = client.Badges.GetRecentlyAwardedBadges(badgeFilter);
43-
44-
// var getBadgesByIds = client.Badges.GetRecentlyAwardedBadgesByIds(batchIds, badgeFilter);
43+
44+
// var getBadgesByIds = client.Badges.GetRecentlyAwardedBadgesByIds(batchIds, badgeFilter);
4545

4646
//var getBadgesByIds = client.Badges.GetAllTaggedBadges(badgeFilter);
4747
//Console.WriteLine(JsonConvert.SerializeObject(getBadgesByIds));
@@ -56,7 +56,7 @@ static void Main(string[] args)
5656
{
5757
"102165885", "102166303"
5858
};
59-
//var comments = client.Comments.GetCommentsByIds(commentIds,commentFilter);
59+
//var comments = client.Comments.GetCommentsOnAnswers(commentIds,commentFilter);
6060
//Console.WriteLine(JsonConvert.SerializeObject(comments));
6161

6262
var postFilter = new PostFilter()
@@ -75,12 +75,12 @@ static void Main(string[] args)
7575

7676
//var postsByIds = client.Posts.GetCommentsOnPosts(postIds, postFilter);
7777

78-
// var revisionByIds = client.Posts.GetRevisionsByIds(postIds, postFilter);
78+
// var revisionByIds = client.Posts.GetRevisionsByIds(postIds, postFilter);
7979

80-
var suggestedEdits = client.Posts.GetSuggestedEdits(postIds, new SuggestedEditFilter()
81-
{
82-
Sort = PostSort.Creation
83-
});
80+
var suggestedEdits = client.Posts.GetSuggestedEdits(postIds, new SuggestedEditFilter()
81+
{
82+
Sort = PostSort.Creation
83+
});
8484

8585
Console.WriteLine(JsonConvert.SerializeObject(suggestedEdits));
8686
Console.ReadKey();
+7-51
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#region Using Directives
22

3-
using System;
43
using System.Collections.Generic;
54
using StackExchange.NET.Helpers;
65
using StackExchange.NET.Interfaces;
@@ -10,8 +9,14 @@
109

1110
namespace StackExchange.NET.Clients
1211
{
12+
/// <summary>
13+
/// StackExchangeClient used to perform operations on APIs.
14+
/// </summary>
1315
public partial class StackExchangeClient : IAnswers
1416
{
17+
/// <summary>
18+
/// The Answers interface which lists all possible operations.
19+
/// </summary>
1520
public IAnswers Answers => this;
1621
BaseResponse<Answer> IAnswers.GetAllAnswers(AnswerFilters filters)
1722
{
@@ -35,7 +40,7 @@ BaseResponse<Answer> IAnswers.GetAnswerByIds(List<string> ids, AnswerFilters fil
3540
return response;
3641
}
3742

38-
BaseResponse<Answer> IAnswers.GetCommentsByIds(List<string> ids, AnswerFilters filters)
43+
BaseResponse<Answer> IAnswers.GetCommentsOnAnswers(List<string> ids, AnswerFilters filters)
3944
{
4045
var url = ApiUrlBuilder.Initialize(_apiKey)
4146
.ForClient(ClientType.Answers)
@@ -57,54 +62,5 @@ BaseResponse<Question> IAnswers.GetQuestionByAnswerIds(List<string> ids, AnswerF
5762
return response;
5863
}
5964

60-
void IAnswers.AcceptAnAnswer(string id, AnswerFilters filters)
61-
{
62-
throw new NotImplementedException();
63-
}
64-
65-
void IAnswers.UndoAcceptedAnswer(string id, AnswerFilters filters)
66-
{
67-
throw new NotImplementedException();
68-
}
69-
70-
void IAnswers.DeleteAnswer(string id, AnswerFilters filters)
71-
{
72-
throw new NotImplementedException();
73-
}
74-
75-
void IAnswers.DownVoteAnswer(string id, AnswerFilters filters)
76-
{
77-
throw new NotImplementedException();
78-
}
79-
80-
void IAnswers.UndoDownVotedAnswer(string id, AnswerFilters filters)
81-
{
82-
throw new NotImplementedException();
83-
}
84-
85-
void IAnswers.EditAnswer(string id, AnswerFilters filters)
86-
{
87-
throw new NotImplementedException();
88-
}
89-
90-
void IAnswers.GetOptionsOfAnswer(string id, AnswerFilters filters)
91-
{
92-
throw new NotImplementedException();
93-
}
94-
95-
void IAnswers.FlagAnswer(string id, AnswerFilters filters)
96-
{
97-
throw new NotImplementedException();
98-
}
99-
100-
void IAnswers.UpVoteAnswer(string id, AnswerFilters filters)
101-
{
102-
throw new NotImplementedException();
103-
}
104-
105-
void IAnswers.UndoUpVotedAnswer(string id, AnswerFilters filters)
106-
{
107-
throw new NotImplementedException();
108-
}
10965
}
11066
}

Diff for: StackExchange.NET/StackExchange.NET/Clients/Badges.cs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ namespace StackExchange.NET.Clients
1111
{
1212
public partial class StackExchangeClient : IBadges
1313
{
14+
/// <summary>
15+
/// The Badges interface which lists all possible operations.
16+
/// </summary>
1417
public IBadges Badges => this;
1518

1619
BaseResponse<Badge> IBadges.GetAllBadges(BadgeFilters filters, string inName)

Diff for: StackExchange.NET/StackExchange.NET/Clients/Comments.cs

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ namespace StackExchange.NET.Clients
1111
{
1212
public partial class StackExchangeClient : IComments
1313
{
14+
/// <summary>
15+
/// The Comments interface which lists all possible operations.
16+
/// </summary>
1417
public IComments Comments => this;
1518

1619
BaseResponse<Comment> IComments.GetAllComments(CommentFilter filters)

Diff for: StackExchange.NET/StackExchange.NET/Clients/PostsClient.cs

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ namespace StackExchange.NET.Clients
1313
{
1414
public partial class StackExchangeClient : IPosts
1515
{
16+
/// <summary>
17+
/// The Posts interface which lists all possible operations.
18+
/// </summary>
1619
public IPosts Posts => this;
1720

1821
BaseResponse<Post> IPosts.GetAllPosts(PostFilter filters)

Diff for: StackExchange.NET/StackExchange.NET/Exceptions/StackExchangeApiException.cs

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace StackExchange.NET.Exceptions
44
{
5+
/// <summary>
6+
/// StackExchangeApiException
7+
/// </summary>
58
public class StackExchangeApiException : Exception
69
{
710
/// <summary>

Diff for: StackExchange.NET/StackExchange.NET/Helpers/ApiUrlBuilder.cs

+4
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ public class ApiUrlBuilder : IApiUrlHelper
1111
private string _filter;
1212
private readonly string _apiKey;
1313

14+
/// <summary>
15+
/// Constructor used to Build the api url internally
16+
/// </summary>
17+
/// <param name="apiKey"></param>
1418
public ApiUrlBuilder(string apiKey)
1519
{
1620
_apiKey = apiKey;

Diff for: StackExchange.NET/StackExchange.NET/Helpers/ClientType.cs

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
namespace StackExchange.NET.Helpers
22
{
3+
/// <summary>
4+
/// The list of Interfaces exposed for consuming the API
5+
/// </summary>
36
public enum ClientType
47
{
58
Answers,

Diff for: StackExchange.NET/StackExchange.NET/Helpers/ExtensionMethods.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace StackExchange.NET.Helpers
1010
{
1111
internal static class ExtensionMethods
1212
{
13-
public static string GetQueryString(this object obj)
13+
internal static string GetQueryString(this object obj)
1414
{
1515
var properties = from p in obj.GetType().GetProperties()
1616
where p.GetValue(obj, null) != null

Diff for: StackExchange.NET/StackExchange.NET/Helpers/MakeSure.cs

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
namespace StackExchange.NET.Helpers
66
{
7+
/// <summary>
8+
/// Used for Validating parameters for Exceptions
9+
/// </summary>
710
public abstract class MakeSure
811
{
912
/// <summary>Checks an argument to make sure it isn't null</summary>

Diff for: StackExchange.NET/StackExchange.NET/Interfaces/IAnswers.cs

+35-11
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,45 @@
33

44
namespace StackExchange.NET.Interfaces
55
{
6+
/// <summary>
7+
/// The Answers interface which lists all possible operations.
8+
/// </summary>
69
public interface IAnswers
710
{
11+
/// <summary>Returns all the undeleted answers in the system.</summary>
12+
/// <param name="filters">The Answer filters.</param>
13+
/// <returns>This method returns a list of answers</returns>
814
BaseResponse<Answer> GetAllAnswers(AnswerFilters filters);
15+
/// <summary>
16+
/// Gets the set of answers identified by ids.
17+
/// </summary>
18+
/// <param name="ids"></param>
19+
/// <param name="filters"></param>
20+
/// <returns></returns>
921
BaseResponse<Answer> GetAnswerByIds(List<string> ids, AnswerFilters filters);
10-
BaseResponse<Answer> GetCommentsByIds(List<string> ids, AnswerFilters filters);
22+
/// <summary>
23+
/// Gets the comments on a set of answers.
24+
/// </summary>
25+
/// <param name="ids"></param>
26+
/// <param name="filters"></param>
27+
/// <returns></returns>
28+
BaseResponse<Answer> GetCommentsOnAnswers(List<string> ids, AnswerFilters filters);
29+
/// <summary>
30+
/// Returns the questions that answers identified by {ids} are on.
31+
/// </summary>
32+
/// <param name="ids"></param>
33+
/// <param name="filters"></param>
34+
/// <returns></returns>
1135
BaseResponse<Question> GetQuestionByAnswerIds(List<string> ids, AnswerFilters filters);
12-
void AcceptAnAnswer(string id, AnswerFilters filters);
13-
void UndoAcceptedAnswer(string id, AnswerFilters filters);
14-
void DeleteAnswer(string id, AnswerFilters filters);
15-
void DownVoteAnswer(string id, AnswerFilters filters);
16-
void UndoDownVotedAnswer(string id, AnswerFilters filters);
17-
void EditAnswer(string id, AnswerFilters filters);
18-
void GetOptionsOfAnswer(string id, AnswerFilters filters);
19-
void FlagAnswer(string id, AnswerFilters filters);
20-
void UpVoteAnswer(string id, AnswerFilters filters);
21-
void UndoUpVotedAnswer(string id, AnswerFilters filters);
36+
//void AcceptAnAnswer(string id, AnswerFilters filters);
37+
//void UndoAcceptedAnswer(string id, AnswerFilters filters);
38+
//void DeleteAnswer(string id, AnswerFilters filters);
39+
//void DownVoteAnswer(string id, AnswerFilters filters);
40+
//void UndoDownVotedAnswer(string id, AnswerFilters filters);
41+
//void EditAnswer(string id, AnswerFilters filters);
42+
//void GetOptionsOfAnswer(string id, AnswerFilters filters);
43+
//void FlagAnswer(string id, AnswerFilters filters);
44+
//void UpVoteAnswer(string id, AnswerFilters filters);
45+
//void UndoUpVotedAnswer(string id, AnswerFilters filters);
2246
}
2347
}

Diff for: StackExchange.NET/StackExchange.NET/Interfaces/IBadges.cs

+38
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,51 @@
33

44
namespace StackExchange.NET.Interfaces
55
{
6+
/// <summary>
7+
/// The Badges interface which lists all possible operations.
8+
/// </summary>
69
public interface IBadges
710
{
11+
/// <summary>
12+
/// Returns all the badges in the system.
13+
/// </summary>
14+
/// <param name="filters"></param>
15+
/// <param name="inName"></param>
16+
/// <returns></returns>
817
BaseResponse<Badge> GetAllBadges(BadgeFilters filters, string inName = null);
18+
/// <summary>
19+
/// Gets the badges identified in id.
20+
/// </summary>
21+
/// <param name="ids"></param>
22+
/// <param name="filters"></param>
23+
/// <returns></returns>
924
BaseResponse<Badge> GetBadgesByIds(List<string> ids, BadgeFilters filters);
25+
/// <summary>
26+
/// Gets all explicitly named badges in the system.
27+
/// </summary>
28+
/// <param name="ids"></param>
29+
/// <param name="filters"></param>
30+
/// <returns></returns>
1031
BaseResponse<Badge> GetNonTaggedBadges(List<string> ids, BadgeFilters filters);
32+
/// <summary>
33+
/// Returns recently awarded badges in the system.
34+
/// </summary>
35+
/// <param name="filters"></param>
36+
/// <returns></returns>
1137
BaseResponse<Badge> GetRecentlyAwardedBadges(BadgeFilters filters);
38+
/// <summary>
39+
/// Returns recently awarded badges in the system, constrained to a certain set of badges.
40+
/// </summary>
41+
/// <param name="ids"></param>
42+
/// <param name="filters"></param>
43+
/// <returns></returns>
1244
BaseResponse<Badge> GetRecentlyAwardedBadgesByIds(List<string> ids, BadgeFilters filters);
45+
/// <summary>
46+
/// Returns the badges that are awarded for participation in specific tags.
47+
/// </summary>
48+
/// <param name="filters"></param>
49+
/// <param name="inName"></param>
50+
/// <returns></returns>
1351
BaseResponse<Badge> GetAllTaggedBadges(BadgeFilters filters, string inName = null);
1452
}
1553
}

Diff for: StackExchange.NET/StackExchange.NET/Interfaces/IComments.cs

+14
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,23 @@
33

44
namespace StackExchange.NET.Interfaces
55
{
6+
/// <summary>
7+
/// The Comments interface which lists all possible operations.
8+
/// </summary>
69
public interface IComments
710
{
11+
/// <summary>
12+
/// Gets all the comments on the site
13+
/// </summary>
14+
/// <param name="commentFilter"></param>
15+
/// <returns></returns>
816
BaseResponse<Comment> GetAllComments(CommentFilter commentFilter);
17+
/// <summary>
18+
/// Gets the comments identified in id.
19+
/// </summary>
20+
/// <param name="commentIds"></param>
21+
/// <param name="commentFilter"></param>
22+
/// <returns></returns>
923
BaseResponse<Comment> GetCommentsByIds(List<string> commentIds, CommentFilter commentFilter);
1024
}
1125
}

0 commit comments

Comments
 (0)