Skip to content

Commit

Permalink
Merge pull request #18 from dragonfruitnetwork/uint-change
Browse files Browse the repository at this point in the history
more uint changes
  • Loading branch information
aspriddell committed Jan 2, 2021
2 parents cd3d264 + 0bd4aa3 commit 8a7b217
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions src/Legacy/Requests/OsuLegacyUserRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace DragonFruit.Orbit.Api.Legacy.Requests
{
public class OsuLegacyUserRequest : OsuLegacyUserBasedRequest
{
private uint? _dateRange;
private int? _dateRange;

public override string Target => "user";

Expand All @@ -18,7 +18,7 @@ public OsuLegacyUserRequest(string userIdentifier)
}

[QueryParameter("event_days")]
public uint EventDateRange
public int EventDateRange
{
get => _dateRange ??= 7;
set
Expand Down
2 changes: 1 addition & 1 deletion src/Ranking/Entities/OsuCountryStatistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class OsuCountryStatistics
public string Code { get; set; }

[JsonProperty("active_users")]
public uint ActiveUsers { get; set; }
public int ActiveUsers { get; set; }

[JsonProperty("play_count")]
public ulong PlayCount { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Ranking/Entities/OsuLeaderboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace DragonFruit.Orbit.Api.Ranking.Entities
public class OsuLeaderboard<T> : IPaginatedByCursor
{
[JsonProperty("total")]
public uint TotalEntries { get; set; }
public int TotalEntries { get; set; }

[JsonProperty("ranking")]
public IEnumerable<T> Ranking { get; set; }
Expand Down
12 changes: 6 additions & 6 deletions src/Ranking/Entities/OsuScoreStatistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ namespace DragonFruit.Orbit.Api.Ranking.Entities
public class OsuScoreStatistics
{
[JsonProperty("count_50")]
public uint Count50 { get; set; }
public int Count50 { get; set; }

[JsonProperty("count_100")]
public uint Count100 { get; set; }
public int Count100 { get; set; }

[JsonProperty("count_300")]
public uint Count300 { get; set; }
public int Count300 { get; set; }

[JsonProperty("count_geki")]
public uint CountGeki { get; set; }
public int CountGeki { get; set; }

[JsonProperty("count_katu")]
public uint CountKatu { get; set; }
public int CountKatu { get; set; }

[JsonProperty("count_miss")]
public uint CountMiss { get; set; }
public int CountMiss { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/Ranking/Entities/OsuUserBestScore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DragonFruit.Orbit.Api.Ranking.Entities
public class OsuUserBestScore
{
[JsonProperty("position")]
public uint? Position { get; set; }
public int? Position { get; set; }

[JsonProperty("score")]
public OsuScore Score { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Ranking/Extensions/OsuLeaderboardExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class OsuLeaderboardExtensions
/// <param name="spotlight">Optional spotlight id to return entries for</param>
/// <param name="variant"><see cref="LeaderboardVariant"/> for osu!mania 4/7 keys</param>
/// <param name="last">Optional previous response that is used to get the next set</param>
public static OsuUserLeaderboard GetLeaderboard<T>(this T client, GameMode mode, LeaderboardType type, LeaderboardFilterMode? filter = null, string country = null, uint? spotlight = null,
public static OsuUserLeaderboard GetLeaderboard<T>(this T client, GameMode mode, LeaderboardType type, LeaderboardFilterMode? filter = null, string country = null, int? spotlight = null,
LeaderboardVariant? variant = null, OsuUserLeaderboard last = null)
where T : OrbitClient
{
Expand Down
4 changes: 2 additions & 2 deletions src/Ranking/Requests/OsuLeaderboardRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace DragonFruit.Orbit.Api.Ranking.Requests
public class OsuLeaderboardRequest : OrbitRequest, IPaginatedByCursor
{
private string _country;
private uint? _spotlight;
private int? _spotlight;
private LeaderboardVariant? _variant;

protected override string Stub => $"rankings/{Mode.ToExternalValue()}/{Type.ToExternalValue()}";
Expand All @@ -39,7 +39,7 @@ public string Country
}

[QueryParameter("spotlight")]
public uint? Spotlight
public int? Spotlight
{
get => Type == LeaderboardType.Spotlight ? _spotlight : null;
set => _spotlight = value;
Expand Down
8 changes: 4 additions & 4 deletions src/User/Entities/OsuUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class OsuUser : OsuUserCard
public bool HasSupported { get; set; }

[JsonProperty("support_level")]
public uint? SupporterLevel { get; set; }
public int? SupporterLevel { get; set; }

#region Socials

Expand Down Expand Up @@ -89,13 +89,13 @@ public class OsuUser : OsuUserCard
#region Counts

[JsonProperty("post_count")]
public uint PostCount { get; set; }
public int PostCount { get; set; }

[JsonProperty("favourite_beatmapset_count")]
public uint FavouriteMapsetCount { get; set; }
public int FavouriteMapsetCount { get; set; }

[JsonProperty("graveyard_beatmapset_count")]
public uint GraveyardMapsetCount { get; set; }
public int GraveyardMapsetCount { get; set; }

[JsonProperty("loved_beatmapset_count")]
public uint LovedMapsetCount { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/User/Entities/OsuUserAchievement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace DragonFruit.Orbit.Api.User.Entities
public class OsuUserAchievement
{
[JsonProperty("achievement_id")]
public uint AchievementId { get; set; }
public int AchievementId { get; set; }

[JsonProperty("achieved_at")]
public DateTimeOffset UnlockedAt { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/User/Entities/OsuUserRankPosition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ namespace DragonFruit.Orbit.Api.User.Entities
public class OsuUserRankPosition
{
[JsonProperty("global")]
public uint Global { get; set; }
public int Global { get; set; }

[JsonProperty("country")]
public uint Country { get; set; }
public int Country { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/User/Entities/OsuUserStatistics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ public class OsuUserStatistics
public double Performance { get; set; }

[JsonProperty("pp_rank")]
public uint GlobalRank { get; set; }
public int GlobalRank { get; set; }

[JsonProperty("hit_accuracy")]
public double Accuracy { get; set; }

[JsonProperty("maximum_combo")]
public uint MaxCombo { get; set; }
public int MaxCombo { get; set; }

[JsonProperty("play_count")]
public uint TotalPerformances { get; set; }
Expand Down

0 comments on commit 8a7b217

Please sign in to comment.