Skip to content
This repository was archived by the owner on Oct 31, 2024. It is now read-only.

Commit 5110275

Browse files
author
Not Officer
committed
refactoring
1 parent aca13fd commit 5110275

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

src/Fortnite-API/FortniteApi.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ namespace Fortnite_API
99
public class FortniteApi
1010
{
1111
//private readonly IRestClient _client;
12-
public readonly CosmeticsEndpoints Cosmetics;
13-
public readonly ShopEndpoints Shop;
14-
public readonly NewsEndpoints News;
12+
public CosmeticsEndpoints Cosmetics { get; }
13+
public ShopEndpoints Shop { get; }
14+
public NewsEndpoints News { get; }
1515

1616
public FortniteApi(string apiKey = null)
1717
{

src/Fortnite-API/Objects/ApiResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class ApiResponse<T>
1010
[J("data", NullValueHandling = N.Ignore)] public T Data { get; private set; }
1111
[J("error", NullValueHandling = N.Ignore)] public string Error { get; private set; }
1212

13-
[I]public bool IsSuccess => Status == 200;
14-
[I]public bool HasError => Error != null;
13+
[I] public bool IsSuccess => Status == 200;
14+
[I] public bool HasError => Error != null;
1515
}
1616
}

src/Fortnite-API/Objects/BrCosmetic.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ public class BrCosmetic : IEquatable<BrCosmetic>
3232
[J("lastUpdate")] public DateTime LastUpdate { get; private set; }
3333
[J("added")] public DateTime Added { get; private set; }
3434

35-
[I]public bool HasSet => Set != null;
36-
[I]public bool HasSetText => SetText != null;
37-
[I]public bool HasSeries => Series != null;
38-
[I]public bool HasDisplayAssetPath => DisplayAssetPath != null;
39-
[I]public bool HasDefinition => Definition != null;
40-
[I]public bool HasRequiredItemId => RequiredItemId != null;
41-
[I]public bool HasBuiltInEmoteId => BuiltInEmoteId != null;
42-
[I]public bool HasVariants => Variants != null && Variants.Count != 0;
43-
[I]public bool HasGameplayTags => GameplayTags != null && GameplayTags.Count != 0;
35+
[I] public bool HasSet => Set != null;
36+
[I] public bool HasSetText => SetText != null;
37+
[I] public bool HasSeries => Series != null;
38+
[I] public bool HasDisplayAssetPath => DisplayAssetPath != null;
39+
[I] public bool HasDefinition => Definition != null;
40+
[I] public bool HasRequiredItemId => RequiredItemId != null;
41+
[I] public bool HasBuiltInEmoteId => BuiltInEmoteId != null;
42+
[I] public bool HasVariants => Variants != null && Variants.Count != 0;
43+
[I] public bool HasGameplayTags => GameplayTags != null && GameplayTags.Count != 0;
4444

4545
public bool HasGameplayTag(string gameplayTag)
4646
{

src/Fortnite-API/Objects/BrCosmeticImages.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public class BrCosmeticImages : IEquatable<BrCosmeticImages>
1414
[J("coverArt")] public ApiImage CoverArt { get; private set; }
1515
[J("decal")] public ApiImage Decal { get; private set; }
1616

17-
[I]public bool HasSmallIcon => SmallIcon != null;
18-
[I]public bool HasIcon => Icon != null;
19-
[I]public bool HasFeatured => Featured != null;
20-
[I]public bool HasBackground => Background != null;
21-
[I]public bool HasCoverArt => CoverArt != null;
22-
[I]public bool HasDecal => Decal != null;
17+
[I] public bool HasSmallIcon => SmallIcon != null;
18+
[I] public bool HasIcon => Icon != null;
19+
[I] public bool HasFeatured => Featured != null;
20+
[I] public bool HasBackground => Background != null;
21+
[I] public bool HasCoverArt => CoverArt != null;
22+
[I] public bool HasDecal => Decal != null;
2323

2424
public bool Equals(BrCosmeticImages other)
2525
{

src/Fortnite-API/Objects/BrShop.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ public class BrShop : IEquatable<BrShop>
1515
[J("votes")] public List<BrShopEntry> Votes;
1616
[J("voteWinners")] public List<BrShopEntry> VoteWinners;
1717

18-
[I]public bool HasFeaturedEntries => Featured != null && Featured.Count > 0;
19-
[I]public bool HasDailyEntries => Daily != null && Daily.Count > 0;
20-
[I]public bool HasVoteEntries => Votes != null && Votes.Count > 0;
21-
[I]public bool HasVoteWinnerEntries => VoteWinners != null && VoteWinners.Count > 0;
18+
[I] public bool HasFeaturedEntries => Featured != null && Featured.Count > 0;
19+
[I] public bool HasDailyEntries => Daily != null && Daily.Count > 0;
20+
[I] public bool HasVoteEntries => Votes != null && Votes.Count > 0;
21+
[I] public bool HasVoteWinnerEntries => VoteWinners != null && VoteWinners.Count > 0;
2222

2323
public bool Equals(BrShop other)
2424
{

0 commit comments

Comments
 (0)