mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Close V5.1.0 release with one more breaking change
Technically I don't agree with R# about EResultResponse, neither the roslyn analyzers, but I also don't see a reason why it couldn't be just ResultResponse as suggested.
This commit is contained in:
@@ -24,7 +24,7 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace ArchiSteamFarm.Steam.Data {
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
internal sealed class AccessTokenResponse : EResultResponse {
|
||||
internal sealed class AccessTokenResponse : ResultResponse {
|
||||
[JsonProperty(PropertyName = "data", Required = Required.Always)]
|
||||
internal readonly AccessTokenData Data = new();
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace ArchiSteamFarm.Steam.Data {
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
internal sealed class InventoryResponse : EResultResponse {
|
||||
internal sealed class InventoryResponse : ResultResponse {
|
||||
[JsonProperty(PropertyName = "assets", Required = Required.DisallowNull)]
|
||||
internal readonly ImmutableHashSet<Asset> Assets = ImmutableHashSet<Asset>.Empty;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ using SteamKit2;
|
||||
|
||||
namespace ArchiSteamFarm.Steam.Data {
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
internal sealed class RedeemWalletResponse : EResultResponse {
|
||||
internal sealed class RedeemWalletResponse : ResultResponse {
|
||||
[JsonProperty(PropertyName = "detail", Required = Required.DisallowNull)]
|
||||
internal readonly EPurchaseResultDetail PurchaseResultDetail;
|
||||
|
||||
|
||||
@@ -27,12 +27,11 @@ using SteamKit2;
|
||||
namespace ArchiSteamFarm.Steam.Data {
|
||||
[PublicAPI]
|
||||
[SuppressMessage("ReSharper", "ClassCannotBeInstantiated")]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public class EResultResponse {
|
||||
public class ResultResponse {
|
||||
[JsonProperty(PropertyName = "success", Required = Required.Always)]
|
||||
public EResult Result { get; private set; }
|
||||
|
||||
[JsonConstructor]
|
||||
protected EResultResponse() { }
|
||||
protected ResultResponse() { }
|
||||
}
|
||||
}
|
||||
@@ -1359,7 +1359,7 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||
{ "giftcardid", giftCardID.ToString(CultureInfo.InvariantCulture) }
|
||||
};
|
||||
|
||||
ObjectResponse<EResultResponse>? response = await UrlPostToJsonObjectWithSession<EResultResponse>(request, data: data).ConfigureAwait(false);
|
||||
ObjectResponse<ResultResponse>? response = await UrlPostToJsonObjectWithSession<ResultResponse>(request, data: data).ConfigureAwait(false);
|
||||
|
||||
if (response == null) {
|
||||
return false;
|
||||
@@ -1454,7 +1454,7 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||
{ "Privacy", JsonConvert.SerializeObject(userPrivacy.Settings) }
|
||||
};
|
||||
|
||||
ObjectResponse<EResultResponse>? response = await UrlPostToJsonObjectWithSession<EResultResponse>(request, data: data).ConfigureAwait(false);
|
||||
ObjectResponse<ResultResponse>? response = await UrlPostToJsonObjectWithSession<ResultResponse>(request, data: data).ConfigureAwait(false);
|
||||
|
||||
if (response == null) {
|
||||
return false;
|
||||
@@ -2418,7 +2418,7 @@ namespace ArchiSteamFarm.Steam.Integration {
|
||||
{ "communityitemid", itemID.ToString(CultureInfo.InvariantCulture) }
|
||||
};
|
||||
|
||||
ObjectResponse<EResultResponse>? response = await UrlPostToJsonObjectWithSession<EResultResponse>(request, data: data).ConfigureAwait(false);
|
||||
ObjectResponse<ResultResponse>? response = await UrlPostToJsonObjectWithSession<ResultResponse>(request, data: data).ConfigureAwait(false);
|
||||
|
||||
return response?.Content.Result == EResult.OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user