Skip to content

Commit 309ddf7

Browse files
Automatically update Dotnet SDK
1 parent c33496e commit 309ddf7

9 files changed

Lines changed: 49 additions & 80 deletions

File tree

src/TrophyApi.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio Version 17
44
VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrophyApi", "TrophyApi\TrophyApi.csproj", "{FE7A1BB4-9293-4155-910C-7CCA74719912}"
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrophyApi", "TrophyApi\TrophyApi.csproj", "{5BF5A4F1-08F6-4CAC-9351-67906FF7373F}"
77
EndProject
8-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrophyApi.Test", "TrophyApi.Test\TrophyApi.Test.csproj", "{A5415215-EA4F-4EC5-9FD0-B928A846143F}"
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TrophyApi.Test", "TrophyApi.Test\TrophyApi.Test.csproj", "{980EA656-04B4-430F-9C77-685187D78447}"
99
EndProject
1010
Global
1111
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -16,13 +16,13 @@ Global
1616
HideSolutionNode = FALSE
1717
EndGlobalSection
1818
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19-
{FE7A1BB4-9293-4155-910C-7CCA74719912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{FE7A1BB4-9293-4155-910C-7CCA74719912}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{FE7A1BB4-9293-4155-910C-7CCA74719912}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{FE7A1BB4-9293-4155-910C-7CCA74719912}.Release|Any CPU.Build.0 = Release|Any CPU
23-
{A5415215-EA4F-4EC5-9FD0-B928A846143F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24-
{A5415215-EA4F-4EC5-9FD0-B928A846143F}.Debug|Any CPU.Build.0 = Debug|Any CPU
25-
{A5415215-EA4F-4EC5-9FD0-B928A846143F}.Release|Any CPU.ActiveCfg = Release|Any CPU
26-
{A5415215-EA4F-4EC5-9FD0-B928A846143F}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{5BF5A4F1-08F6-4CAC-9351-67906FF7373F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{5BF5A4F1-08F6-4CAC-9351-67906FF7373F}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{5BF5A4F1-08F6-4CAC-9351-67906FF7373F}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{5BF5A4F1-08F6-4CAC-9351-67906FF7373F}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{980EA656-04B4-430F-9C77-685187D78447}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{980EA656-04B4-430F-9C77-685187D78447}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{980EA656-04B4-430F-9C77-685187D78447}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{980EA656-04B4-430F-9C77-685187D78447}.Release|Any CPU.Build.0 = Release|Any CPU
2727
EndGlobalSection
2828
EndGlobal

src/TrophyApi/Achievements/AchievementsClient.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,7 @@ public async Task<IEnumerable<AchievementWithStatsResponse>> AllAsync(
9898
/// User = new UpsertedUser
9999
/// {
100100
/// Email = "user@example.com",
101-
/// Name = "User",
102101
/// Tz = "Europe/London",
103-
/// DeviceTokens = new List&lt;string&gt;() { "token1", "token2" },
104-
/// SubscribeToEmails = true,
105-
/// Attributes = new Dictionary&lt;string, string&gt;()
106-
/// {
107-
/// { "department", "engineering" },
108-
/// { "role", "developer" },
109-
/// },
110102
/// Id = "user-id",
111103
/// },
112104
/// }

src/TrophyApi/Leaderboards/Requests/LeaderboardsGetRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public record LeaderboardsGetRequest
1313
public int? Offset { get; set; }
1414

1515
/// <summary>
16-
/// Maximum number of rankings to return.
16+
/// Maximum number of rankings to return. Cannot be greater than the size of the leaderboard.
1717
/// </summary>
1818
[JsonIgnore]
1919
public int? Limit { get; set; }
@@ -31,7 +31,7 @@ public record LeaderboardsGetRequest
3131
public string? UserId { get; set; }
3232

3333
/// <summary>
34-
/// Attribute key and value to filter the rankings by, separated by a colon. This parameter is required, and only valid for leaderboards with a breakdown attribute.
34+
/// Attribute key and value to filter the rankings by, separated by a colon. For example, `city:London`. This parameter is required, and only valid for leaderboards with a breakdown attribute.
3535
/// </summary>
3636
[JsonIgnore]
3737
public string? UserAttributes { get; set; }

src/TrophyApi/Metrics/MetricsClient.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,7 @@ internal MetricsClient(RawClient client)
2626
/// User = new UpsertedUser
2727
/// {
2828
/// Email = "user@example.com",
29-
/// Name = "User",
3029
/// Tz = "Europe/London",
31-
/// DeviceTokens = new List&lt;string&gt;() { "token1", "token2" },
32-
/// SubscribeToEmails = true,
3330
/// Attributes = new Dictionary&lt;string, string&gt;()
3431
/// {
3532
/// { "department", "engineering" },

src/TrophyApi/TrophyApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<!-- 🔹 NuGet Metadata -->
1111
<PackageId>Trophy</PackageId>
12-
<Version>1.0.31</Version>
12+
<Version>1.0.32</Version>
1313
<Authors>Trophy Labs, Inc</Authors>
1414
<Description>.NET SDK for the Trophy API</Description>
1515
<PackageTags>trophy; api; gamification; sdk</PackageTags>

src/TrophyApi/Types/UpdatedUser.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ public record UpdatedUser
1414
/// The user's email address. Required if subscribeToEmails is true.
1515
/// </summary>
1616
[JsonPropertyName("email")]
17-
public required string Email { get; set; }
17+
public string? Email { get; set; }
1818

1919
/// <summary>
2020
/// The name to refer to the user by in emails.
2121
/// </summary>
2222
[JsonPropertyName("name")]
23-
public required string Name { get; set; }
23+
public string? Name { get; set; }
2424

2525
/// <summary>
2626
/// The user's timezone (used for email scheduling).
@@ -32,19 +32,19 @@ public record UpdatedUser
3232
/// The user's device tokens, used for push notifications.
3333
/// </summary>
3434
[JsonPropertyName("deviceTokens")]
35-
public IEnumerable<string> DeviceTokens { get; set; } = new List<string>();
35+
public IEnumerable<string>? DeviceTokens { get; set; }
3636

3737
/// <summary>
3838
/// Whether the user should receive Trophy-powered emails. If false, Trophy will not store the user's email address.
3939
/// </summary>
4040
[JsonPropertyName("subscribeToEmails")]
41-
public required bool SubscribeToEmails { get; set; }
41+
public bool? SubscribeToEmails { get; set; }
4242

4343
/// <summary>
4444
/// User attributes as key-value pairs. Keys must match existing user attributes set up in the Trophy dashboard.
4545
/// </summary>
4646
[JsonPropertyName("attributes")]
47-
public Dictionary<string, string> Attributes { get; set; } = new Dictionary<string, string>();
47+
public Dictionary<string, string>? Attributes { get; set; }
4848

4949
/// <summary>
5050
/// Additional properties received from the response, if any.

src/TrophyApi/Types/UpsertedUser.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ public record UpsertedUser
2020
/// The user's email address. Required if subscribeToEmails is true.
2121
/// </summary>
2222
[JsonPropertyName("email")]
23-
public required string Email { get; set; }
23+
public string? Email { get; set; }
2424

2525
/// <summary>
2626
/// The name to refer to the user by in emails.
2727
/// </summary>
2828
[JsonPropertyName("name")]
29-
public required string Name { get; set; }
29+
public string? Name { get; set; }
3030

3131
/// <summary>
3232
/// The user's timezone (used for email scheduling).
@@ -38,19 +38,19 @@ public record UpsertedUser
3838
/// The user's device tokens, used for push notifications.
3939
/// </summary>
4040
[JsonPropertyName("deviceTokens")]
41-
public IEnumerable<string> DeviceTokens { get; set; } = new List<string>();
41+
public IEnumerable<string>? DeviceTokens { get; set; }
4242

4343
/// <summary>
4444
/// Whether the user should receive Trophy-powered emails. If false, Trophy will not store the user's email address.
4545
/// </summary>
4646
[JsonPropertyName("subscribeToEmails")]
47-
public required bool SubscribeToEmails { get; set; }
47+
public bool? SubscribeToEmails { get; set; }
4848

4949
/// <summary>
5050
/// User attributes as key-value pairs. Keys must match existing user attributes set up in the Trophy dashboard.
5151
/// </summary>
5252
[JsonPropertyName("attributes")]
53-
public Dictionary<string, string> Attributes { get; set; } = new Dictionary<string, string>();
53+
public Dictionary<string, string>? Attributes { get; set; }
5454

5555
/// <summary>
5656
/// Additional properties received from the response, if any.

src/TrophyApi/Types/User.cs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,56 +10,38 @@ namespace TrophyApi;
1010
[Serializable]
1111
public record User
1212
{
13-
/// <summary>
14-
/// Whether the user is in the control group, meaning they do not receive emails or other communications from Trophy.
15-
/// </summary>
16-
[JsonPropertyName("control")]
17-
public required bool Control { get; set; }
18-
19-
/// <summary>
20-
/// The date and time the user was created, in ISO 8601 format.
21-
/// </summary>
22-
[JsonPropertyName("created")]
23-
public required DateTime Created { get; set; }
24-
25-
/// <summary>
26-
/// The date and time the user was last updated, in ISO 8601 format.
27-
/// </summary>
28-
[JsonPropertyName("updated")]
29-
public required DateTime Updated { get; set; }
30-
3113
/// <summary>
3214
/// The ID of the user in your database. Must be a string.
3315
/// </summary>
3416
[JsonPropertyName("id")]
3517
public required string Id { get; set; }
3618

3719
/// <summary>
38-
/// The user's email address. Required if subscribeToEmails is true.
20+
/// The user's email address.
3921
/// </summary>
4022
[JsonPropertyName("email")]
41-
public required string Email { get; set; }
23+
public string? Email { get; set; }
4224

4325
/// <summary>
44-
/// The name to refer to the user by in emails.
26+
/// The name of the user.
4527
/// </summary>
4628
[JsonPropertyName("name")]
47-
public required string Name { get; set; }
29+
public string? Name { get; set; }
4830

4931
/// <summary>
50-
/// The user's timezone (used for email scheduling).
32+
/// The user's timezone.
5133
/// </summary>
5234
[JsonPropertyName("tz")]
5335
public string? Tz { get; set; }
5436

5537
/// <summary>
56-
/// The user's device tokens, used for push notifications.
38+
/// The user's device tokens.
5739
/// </summary>
5840
[JsonPropertyName("deviceTokens")]
5941
public IEnumerable<string> DeviceTokens { get; set; } = new List<string>();
6042

6143
/// <summary>
62-
/// Whether the user should receive Trophy-powered emails. If false, Trophy will not store the user's email address.
44+
/// Whether the user is opted into receiving Trophy-powered emails.
6345
/// </summary>
6446
[JsonPropertyName("subscribeToEmails")]
6547
public required bool SubscribeToEmails { get; set; }
@@ -70,6 +52,24 @@ public record User
7052
[JsonPropertyName("attributes")]
7153
public Dictionary<string, string> Attributes { get; set; } = new Dictionary<string, string>();
7254

55+
/// <summary>
56+
/// Whether the user is in the control group, meaning they do not receive emails or other communications from Trophy.
57+
/// </summary>
58+
[JsonPropertyName("control")]
59+
public required bool Control { get; set; }
60+
61+
/// <summary>
62+
/// The date and time the user was created, in ISO 8601 format.
63+
/// </summary>
64+
[JsonPropertyName("created")]
65+
public required DateTime Created { get; set; }
66+
67+
/// <summary>
68+
/// The date and time the user was last updated, in ISO 8601 format.
69+
/// </summary>
70+
[JsonPropertyName("updated")]
71+
public required DateTime Updated { get; set; }
72+
7373
/// <summary>
7474
/// Additional properties received from the response, if any.
7575
/// </summary>

src/TrophyApi/Users/UsersClient.cs

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,7 @@ internal UsersClient(RawClient client)
1818
/// Create a new user.
1919
/// </summary>
2020
/// <example><code>
21-
/// await client.Users.CreateAsync(
22-
/// new UpsertedUser
23-
/// {
24-
/// Email = "user@example.com",
25-
/// Name = "User",
26-
/// DeviceTokens = new List&lt;string&gt;() { "token1", "token2" },
27-
/// SubscribeToEmails = true,
28-
/// Attributes = new Dictionary&lt;string, string&gt;()
29-
/// {
30-
/// { "department", "engineering" },
31-
/// { "role", "developer" },
32-
/// },
33-
/// Id = "user-id",
34-
/// }
35-
/// );
21+
/// await client.Users.CreateAsync(new UpsertedUser { Id = "user-id" });
3622
/// </code></example>
3723
public async Task<User> CreateAsync(
3824
UpsertedUser request,
@@ -169,10 +155,7 @@ public async Task<User> GetAsync(
169155
/// new UpdatedUser
170156
/// {
171157
/// Email = "user@example.com",
172-
/// Name = "User",
173158
/// Tz = "Europe/London",
174-
/// DeviceTokens = new List&lt;string&gt;() { "token1", "token2" },
175-
/// SubscribeToEmails = true,
176159
/// Attributes = new Dictionary&lt;string, string&gt;()
177160
/// {
178161
/// { "department", "engineering" },
@@ -252,10 +235,7 @@ public async Task<User> IdentifyAsync(
252235
/// new UpdatedUser
253236
/// {
254237
/// Email = "user@example.com",
255-
/// Name = "User",
256238
/// Tz = "Europe/London",
257-
/// DeviceTokens = new List&lt;string&gt;() { "token1", "token2" },
258-
/// SubscribeToEmails = true,
259239
/// Attributes = new Dictionary&lt;string, string&gt;()
260240
/// {
261241
/// { "department", "engineering" },

0 commit comments

Comments
 (0)