Skip to content

Commit b2fad8c

Browse files
committed
feat: add new reaction query params (#88)
1 parent cf73a71 commit b2fad8c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/Models/ReactionOptions.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ private enum OpType
2222
private readonly List<OpType> _ops;
2323
private readonly List<string> _kindFilters;
2424

25+
private string _userId;
26+
private string _childrenUserId;
27+
2528
private ReactionOption()
2629
{
2730
_ops = new List<OpType>();
@@ -45,6 +48,12 @@ internal void Apply(RestRequest request)
4548

4649
if (_kindFilters.Count != 0)
4750
request.AddQueryParameter("reactionKindsFilter", string.Join(",", _kindFilters));
51+
52+
if (!string.IsNullOrWhiteSpace(_userId))
53+
request.AddQueryParameter("filter_user_id", _userId);
54+
55+
if (!string.IsNullOrWhiteSpace(_childrenUserId))
56+
request.AddQueryParameter("children_user_id", _userId);
4857
}
4958

5059
public static ReactionOption With()
@@ -87,5 +96,17 @@ public ReactionOption KindFilter(string value)
8796
_kindFilters.Add(value);
8897
return this;
8998
}
99+
100+
public ReactionOption UserFilter(string value)
101+
{
102+
_userId = value;
103+
return this;
104+
}
105+
106+
public ReactionOption ChildrenUserFilter(string value)
107+
{
108+
_childrenUserId = value;
109+
return this;
110+
}
90111
}
91112
}

0 commit comments

Comments
 (0)