Skip to content

Commit 4dadfcd

Browse files
committed
Add query parameters to removed ugc endpoint
1 parent 63dc9a8 commit 4dadfcd

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

Runtime/Game/Requests/ReporRequets.cs

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,44 @@ public static void GetReportTypes(Action<LootLockerReportsGetTypesResponse> onCo
114114
public static void GetRemovedUGCForPlayer(GetRemovedUGCForPlayerInput input, Action<LootLockerReportsGetRemovedAssetsResponse> onComplete)
115115
{
116116
EndPointClass endPoint = LootLockerEndPoints.reportsGetRemovedUGCForPlayer;
117-
LootLockerServerRequest.CallAPI(endPoint.endPoint, endPoint.httpMethod, null, ((serverResponse) =>
117+
string tempEndpoint = endPoint.endPoint;
118+
119+
if (!string.IsNullOrEmpty(input.After))
120+
{
121+
tempEndpoint = tempEndpoint + "?after={0}";
122+
tempEndpoint = string.Format(tempEndpoint, input.After);
123+
}
124+
125+
if (input.Count > 0)
126+
{
127+
if (tempEndpoint.IndexOf("?") > -1)
128+
{
129+
tempEndpoint = tempEndpoint + "&";
130+
} else
131+
{
132+
tempEndpoint = tempEndpoint + "?";
133+
}
134+
135+
tempEndpoint = tempEndpoint + "count={0}";
136+
tempEndpoint = string.Format(tempEndpoint, input.Count);
137+
}
138+
139+
if (!string.IsNullOrEmpty(input.Since))
140+
{
141+
if (tempEndpoint.IndexOf("?") > -1)
142+
{
143+
tempEndpoint = tempEndpoint + "&";
144+
}
145+
else
146+
{
147+
tempEndpoint = tempEndpoint + "?";
148+
}
149+
150+
tempEndpoint = tempEndpoint + "since={0}";
151+
tempEndpoint = string.Format(tempEndpoint, input.Since);
152+
}
153+
154+
LootLockerServerRequest.CallAPI(tempEndpoint, endPoint.httpMethod, null, ((serverResponse) =>
118155
{
119156
LootLockerReportsGetRemovedAssetsResponse response = new LootLockerReportsGetRemovedAssetsResponse();
120157
if (string.IsNullOrEmpty(serverResponse.Error))

0 commit comments

Comments
 (0)