Skip to content

Commit be02130

Browse files
committed
tempoary fix to objects
made floats, ints and bools nullabe because of Team Aminos stupid decision to set them to null on some cases Will be replaced with a Json Serializer Option later
1 parent 19245fa commit be02130

67 files changed

Lines changed: 483 additions & 456 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Amino.NET/Objects/AdditionalItemBenefits.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ namespace Amino.Objects
44
{
55
public class AdditionalItemBenefits
66
{
7-
[JsonPropertyName("firstMonthFreeAminoPlusMembership")] public bool FirstMonthFreeAminoPlus { get; set; }
7+
[JsonPropertyName("firstMonthFreeAminoPlusMembership")] public bool? FirstMonthFreeAminoPlus { get; set; }
88
}
99
}

Amino.NET/Objects/AdvancedCommunityInfo.cs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Text.Json.Serialization;
34

45
namespace Amino.Objects
@@ -7,29 +8,29 @@ public class AdvancedCommunityInfo
78
{
89
// Base JSON key: community
910

10-
public bool IsCurrentUserJoined { get; set; } // MUST BE SET AFTER
11+
public bool? IsCurrentUserJoined { get; set; } // MUST BE SET AFTER
1112
public string Json { get; set; } // MUST BE SET AFTER
12-
[JsonPropertyName("searchable")] public bool Searchable { get; set; }
13-
[JsonPropertyName("isStandaloneAppDepricated")] public bool IsStandaloneAppDeprecated { get; set; }
14-
[JsonPropertyName("listedStatus")] public int ListedStatus { get; set; }
15-
[JsonPropertyName("probationStatus")] public int ProbationStatus { get; set; }
13+
[JsonPropertyName("searchable")] public bool? Searchable { get; set; }
14+
[JsonPropertyName("isStandaloneAppDepricated")] public bool? IsStandaloneAppDeprecated { get; set; }
15+
[JsonPropertyName("listedStatus")] public int? ListedStatus { get; set; }
16+
[JsonPropertyName("probationStatus")] public int? ProbationStatus { get; set; }
1617
[JsonPropertyName("keywords")] public string Keywords { get; set; }
17-
[JsonPropertyName("membersCount")] public int MemberCount { get; set; }
18+
[JsonPropertyName("membersCount")] public int? MemberCount { get; set; }
1819
[JsonPropertyName("primaryLanguage")] public string PrimaryLanguage { get; set; }
19-
[JsonPropertyName("communityHeat")] public float CommunityHeat { get; set; }
20+
[JsonPropertyName("communityHeat")] public float? CommunityHeat { get; set; }
2021
[JsonPropertyName("content")] public string Content { get; set; }
21-
[JsonPropertyName("isStandaloneAppMonetizationEnabled")] public bool IsStandaloneAppMonetizationEnabled { get; set; }
22+
[JsonPropertyName("isStandaloneAppMonetizationEnabled")] public bool? IsStandaloneAppMonetizationEnabled { get; set; }
2223
[JsonPropertyName("tagline")] public string Tagline { get; set; }
23-
[JsonPropertyName("joinType")] public int JoinType { get; set; }
24-
[JsonPropertyName("status")] public int Status { get; set; }
24+
[JsonPropertyName("joinType")] public int? JoinType { get; set; }
25+
[JsonPropertyName("status")] public int? Status { get; set; }
2526
[JsonPropertyName("modifiedTime")] public string ModifiedTime { get; set; }
26-
[JsonPropertyName("ndcId")] public int CommunityId { get; set; }
27+
[JsonPropertyName("ndcId")] public int? CommunityId { get; set; }
2728
[JsonPropertyName("link")] public string Link { get; set; }
2829
[JsonPropertyName("icon")] public string IconUrl { get; set; }
2930
[JsonPropertyName("updatedTime")] public string UpdatedTime { get; set; }
3031
[JsonPropertyName("endpoint")] public string Endpoint { get; set; }
3132
[JsonPropertyName("name")] public string Name { get; set; }
32-
[JsonPropertyName("templateId")] public int TemplateId { get; set; }
33+
[JsonPropertyName("templateId")] public int? TemplateId { get; set; }
3334
[JsonPropertyName("createdTime")] public string CreatedTime { get; set; }
3435

3536
[JsonPropertyName("communityHeadList")] public List<GenericProfile> CommunityHeadList { get; set; }

Amino.NET/Objects/AvatarFrame.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,21 @@ namespace Amino.Objects
44
{
55
public class AvatarFrame
66
{
7-
[JsonPropertyName("isGloballyAvailable")]public bool IsGloballyAvailable { get; set; }
8-
[JsonPropertyName("isNew")]public bool IsNew { get; set; }
9-
[JsonPropertyName("version")]public int Version { get; set; }
7+
[JsonPropertyName("isGloballyAvailable")]public bool? IsGloballyAvailable { get; set; }
8+
[JsonPropertyName("isNew")]public bool? IsNew { get; set; }
9+
[JsonPropertyName("version")]public int? Version { get; set; }
1010
[JsonPropertyName("createdTime")]public string CreatedTime { get; set; }
11-
[JsonPropertyName("frameType")]public int FrameType { get; set; }
11+
[JsonPropertyName("frameType")]public int? FrameType { get; set; }
1212
[JsonPropertyName("modifiedTime")]public string ModifiedTime { get; set; }
1313
[JsonPropertyName("frameUrl")]public string FrameUrl { get; set; }
1414
[JsonPropertyName("md5")]public string MD5 { get; set; }
1515
[JsonPropertyName("icon")]public string IconUrl { get; set; }
1616
[JsonPropertyName("frameId")]public string FrameId { get; set; }
1717
[JsonPropertyName("uid")]public string ObjectId { get; set; }
18-
[JsonPropertyName("ownershipStatus")]public int OwnershipStatus { get; set; }
18+
[JsonPropertyName("ownershipStatus")]public int? OwnershipStatus { get; set; }
1919
[JsonPropertyName("name")]public string Name { get; set; }
2020
[JsonPropertyName("resourceUrl")]public string ResourceUrl { get; set; }
21-
[JsonPropertyName("status")]public int Status { get; set; }
21+
[JsonPropertyName("status")]public int? Status { get; set; }
2222
[JsonPropertyName("additionalBenefits")]public AdditionalItemBenefits AdditionalBenefits { get; set; }
2323
[JsonPropertyName("restrictionInfo")]public ItemRestrictionInfo RestrictionInfo { get; set; }
2424
[JsonPropertyName("ownershipInfo")]public ItemOwnershipInfo OwnershipInfo { get; set; }

Amino.NET/Objects/AvatarFrameConfig.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class AvatarFrameConfig
88
[JsonPropertyName("id")] public string ObjectId { get; set; }
99
[JsonPropertyName("moodColor")] public string MoodColor { get; set; }
1010
[JsonPropertyName("name")] public string Name { get; set; }
11-
[JsonPropertyName("version")] public int Version { get; set; }
11+
[JsonPropertyName("version")] public int? Version { get; set; }
1212
[JsonPropertyName("userIconBorderColor")] public string UserIconBorderColor { get; set; }
1313
}
1414
}

Amino.NET/Objects/Blog.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,30 @@ namespace Amino.Objects
55
public class Blog
66
{
77
public string Json { get; set; } // NEEDS TO BE ADDED AFTER
8-
[JsonPropertyName("globalVotesCount")]public int GlobalVotesCount { get; set; } = 0;
9-
[JsonPropertyName("globalVotedValue")]public int GlobalVotedValue { get; set; } = 0;
10-
[JsonPropertyName("votedValue")]public int VotedValue { get; set; } = 0;
8+
[JsonPropertyName("globalVotesCount")]public int? GlobalVotesCount { get; set; } = 0;
9+
[JsonPropertyName("globalVotedValue")]public int? GlobalVotedValue { get; set; } = 0;
10+
[JsonPropertyName("votedValue")]public int? VotedValue { get; set; } = 0;
1111
[JsonPropertyName("keywords")]public string Keywords { get; set; }
1212
[JsonPropertyName("strategyInfo")]public string StrategyInfo { get; set; }
1313
[JsonPropertyName("style")]public int Style { get; set; } = 0;
1414
[JsonPropertyName("totalQuizPlayCount")]public int TotalQuizPlayCount { get; set; } = 0;
1515
[JsonPropertyName("title")]public string Title { get; set; }
16-
[JsonPropertyName("contentRating")]public int ContentRating { get; set; } = 0;
16+
[JsonPropertyName("contentRating")]public int? ContentRating { get; set; } = 0;
1717
[JsonPropertyName("content")]public string Content { get; set; }
18-
[JsonPropertyName("needHidden")]public bool NeedHidden { get; set; } = false;
19-
[JsonPropertyName("guestVotesCount")]public int GuestVotesCount { get; set; } = 0;
20-
[JsonPropertyName("type")]public int Type { get; set; } = 0;
21-
[JsonPropertyName("status")]public int Status { get; set; } = 0;
22-
[JsonPropertyName("globalCommentsCount")]public int GlobalCommentsCount { get; set; } = 0;
18+
[JsonPropertyName("needHidden")]public bool? NeedHidden { get; set; } = false;
19+
[JsonPropertyName("guestVotesCount")]public int? GuestVotesCount { get; set; } = 0;
20+
[JsonPropertyName("type")]public int? Type { get; set; } = 0;
21+
[JsonPropertyName("status")]public int? Status { get; set; } = 0;
22+
[JsonPropertyName("globalCommentsCount")]public int? GlobalCommentsCount { get; set; } = 0;
2323
[JsonPropertyName("modifiedTime")]public string ModifiedTime { get; set; }
24-
[JsonPropertyName("totalPollVoteCount")]public int TotalPollVoteCount { get; set; } = 0;
24+
[JsonPropertyName("totalPollVoteCount")]public int? TotalPollVoteCount { get; set; } = 0;
2525
[JsonPropertyName("blogId")]public string BlogId { get; set; }
26-
[JsonPropertyName("viewCount")]public int ViewCount { get; set; } = 0;
27-
[JsonPropertyName("votesCount")]public int VotesCount { get; set; } = 0;
26+
[JsonPropertyName("viewCount")]public int? ViewCount { get; set; } = 0;
27+
[JsonPropertyName("votesCount")]public int? VotesCount { get; set; } = 0;
2828
[JsonPropertyName("createdTime")]public string CreatedTime { get; set; }
29-
[JsonPropertyName("ndcId")]public int CommunityId { get; set; } = 0;
29+
[JsonPropertyName("ndcId")]public int? CommunityId { get; set; } = 0;
3030
[JsonPropertyName("endTime")]public string EndTime { get; set; }
31-
[JsonPropertyName("commentsCount")]public int commentsCount { get; set; } = 0;
31+
[JsonPropertyName("commentsCount")]public int? commentsCount { get; set; } = 0;
3232
[JsonPropertyName("author")]public GenericProfile Author { get; set; }
3333
}
3434
}

Amino.NET/Objects/Chat.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,26 @@ public class Chat
77
{
88
public string Json { get; set; } // NEEDS TO BE ADDED LATER
99
[JsonPropertyName("uid")]public string UserId { get; set; }
10-
[JsonPropertyName("membersQuota")]public int MembersQuota { get; set; }
10+
[JsonPropertyName("membersQuota")]public int? MembersQuota { get; set; }
1111
[JsonPropertyName("threadId")]public string ThreadId { get; set; }
1212
[JsonPropertyName("keywords")]public string Keywords { get; set; }
13-
[JsonPropertyName("membersCount")]public int MemberCount { get; set; }
13+
[JsonPropertyName("membersCount")]public int? MemberCount { get; set; }
1414
[JsonPropertyName("strategyInfo")]public string StrategyInfo { get; set; }
15-
[JsonPropertyName("isPinned")]public bool IsPinned { get; set; }
15+
[JsonPropertyName("isPinned")]public bool? IsPinned { get; set; }
1616
[JsonPropertyName("title")]public string Title { get; set; }
17-
[JsonPropertyName("membershipStatus")]public int MembershipStatus { get; set; }
17+
[JsonPropertyName("membershipStatus")]public int? MembershipStatus { get; set; }
1818
[JsonPropertyName("content")]public string Content { get; set; }
19-
[JsonPropertyName("needHidden")]public bool NeedHidden { get; set; }
20-
[JsonPropertyName("alrtOption")]public int alertOption { get; set; }
19+
[JsonPropertyName("needHidden")]public bool? NeedHidden { get; set; }
20+
[JsonPropertyName("alrtOption")]public int? alertOption { get; set; }
2121
[JsonPropertyName("lastReadTime")]public string LastReadTime { get; set; }
22-
[JsonPropertyName("type")]public int Type { get; set; }
23-
[JsonPropertyName("status")]public int Status { get; set; }
24-
[JsonPropertyName("mentionMe")]public bool MentionMe { get; set; }
22+
[JsonPropertyName("type")]public int? Type { get; set; }
23+
[JsonPropertyName("status")]public int? Status { get; set; }
24+
[JsonPropertyName("mentionMe")]public bool? MentionMe { get; set; }
2525
[JsonPropertyName("modifiedTime")]public string ModifiedTime { get; set; }
26-
[JsonPropertyName("condition")]public int Condition { get; set; }
26+
[JsonPropertyName("condition")]public int? Condition { get; set; }
2727
[JsonPropertyName("icon")]public string IconUrl { get; set; }
2828
[JsonPropertyName("latestActivityTime")]public string LatestActivityTime { get; set; }
29-
[JsonPropertyName("ndcId")]public int CommunityId { get; set; }
29+
[JsonPropertyName("ndcId")]public int? CommunityId { get; set; }
3030
[JsonPropertyName("createdTime")]public string CreatedTime { get; set; }
3131
[JsonPropertyName("author")]public GenericProfile Author { get; set; }
3232
[JsonPropertyName("membersSummary")] public List<GenericChatMember> ChatMemberSummary { get; set; }

Amino.NET/Objects/ChatAnnouncement.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ public class ChatAnnouncement
88
public string Json { get; set; } // NEEDS TO BE SET AFTER
99
public SocketBase SocketBase { get; set; } // NEEDS TO BE SET AFTER
1010
[JsonPropertyName("threadId")]public string ChatId { get; set; }
11-
[JsonPropertyName("mediaType")]public int MediaType { get; set; }
11+
[JsonPropertyName("mediaType")]public int? MediaType { get; set; }
1212
[JsonPropertyName("content")]public string Content { get; set; }
13-
[JsonPropertyName("clientRefId")]public int ClientRefId { get; set; }
13+
[JsonPropertyName("clientRefId")]public int? ClientRefId { get; set; }
1414
[JsonPropertyName("messageId")]public string MessageId { get; set; }
1515
[JsonPropertyName("uid")]public string UserId { get; set; }
1616
[JsonPropertyName("createdTime")]public string CreatedTime { get; set; }
17-
[JsonPropertyName("type")]public int Type { get; set; }
17+
[JsonPropertyName("type")]public int? Type { get; set; }
1818
[JsonPropertyName("isHidden")]public bool IsHidden { get; set; }
1919
[JsonPropertyName("includedInSummary")]public bool IncludedInSummary { get; set; }
2020

Amino.NET/Objects/ChatEvent.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ public class ChatEvent
1111

1212
[JsonPropertyName("threadId")]public string ChatId { get; set; }
1313
[JsonPropertyName("mediaType")]public int MediaType { get; set; }
14-
[JsonPropertyName("clienttRefId")]public int ClientRefId { get; set; }
14+
[JsonPropertyName("clienttRefId")]public int? ClientRefId { get; set; }
1515
[JsonPropertyName("messageId")]public string MessageId { get; set; }
1616
[JsonPropertyName("uid")]public string UserId { get; set; }
1717
[JsonPropertyName("createdTime")]public string CreatedTime { get; set; }
18-
[JsonPropertyName("type")]public int Type { get; set; }
19-
[JsonPropertyName("isHidden")]public bool IsHidden { get; set; }
20-
[JsonPropertyName("includedInSummary")]public bool IncludedInSummary { get; set; }
18+
[JsonPropertyName("type")]public int? Type { get; set; }
19+
[JsonPropertyName("isHidden")]public bool? IsHidden { get; set; }
20+
[JsonPropertyName("includedInSummary")]public bool? IncludedInSummary { get; set; }
2121

2222
}
2323
}

Amino.NET/Objects/ChatExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ namespace Amino.Objects
44
{
55
public class ChatExtensions
66
{
7-
[JsonPropertyName("viewOnly")] public bool ViewOnly { get; set; }
7+
[JsonPropertyName("viewOnly")] public bool? ViewOnly { get; set; }
88
[JsonPropertyName("lastMembersSummaryUpdatedTime")] public string LastMemberSummaryUpdatedTime { get; set; }
99
[JsonPropertyName("channelType")] public string ChannelType { get; set; }
1010
}

Amino.NET/Objects/ChatTip.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ public class ChatTip
99
public SocketBase SocketBase { get; set; } // NEEDS TO BE SET AFTER
1010

1111
[JsonPropertyName("threadId")]public string ChatId { get; set; }
12-
[JsonPropertyName("mediaType")]public int MediaType { get; set; }
12+
[JsonPropertyName("mediaType")]public int? MediaType { get; set; }
1313
[JsonPropertyName("clientRefId")]public int ClientRefId { get; set; }
1414
[JsonPropertyName("messageId")]public string MessageId { get; set; }
1515
[JsonPropertyName("uid")]public string UserId { get; set; }
1616
[JsonPropertyName("createdTime")]public string CreatedTime { get; set; }
17-
[JsonPropertyName("type")]public int Type { get; set; }
18-
[JsonPropertyName("isHidden")]public bool IsHidden { get; set; }
19-
[JsonPropertyName("includedInSummary")]public bool IncludedInSummary { get; set; }
17+
[JsonPropertyName("type")]public int? Type { get; set; }
18+
[JsonPropertyName("isHidden")]public bool? IsHidden { get; set; }
19+
[JsonPropertyName("includedInSummary")]public bool? IncludedInSummary { get; set; }
2020

2121
[JsonPropertyName("author")]public GenericProfile Author { get; set; }
2222
[JsonPropertyName("extensions")]public ChatTipExtensions Extensions { get; set; }

0 commit comments

Comments
 (0)