├── .gitignore
├── ExampleAuth1
├── ExampleAuth1.csproj
└── Program.cs
├── ExampleAuth2
├── ExampleAuth2.csproj
└── Program.cs
├── ExampleAuth3
├── ExampleAuth3.csproj
└── Program.cs
├── ExampleChangePassword
├── ExampleChangePassword.csproj
└── Program.cs
├── ExampleMoveSteamGuard
├── ExampleMoveSteamGuard.csproj
└── Program.cs
├── ExampleRefreshJwt
├── ExampleRefreshJwt.csproj
└── Program.cs
├── ExampleSteamGuardAutoSingIn
├── ExampleSteamGuardAutoSingIn.csproj
└── Program.cs
├── ExampleSteamGuardEmail
├── ExampleSteamGuardEmail.csproj
└── Program.cs
├── LICENSE
├── README.md
├── SteamWEB.csproj
├── SteamWEB.sln
└── steam_web
├── API
├── Enums.cs
├── IAuthenticationService.cs
├── ICSGOPlayers_730.cs
├── ICSGOServers_730.cs
├── IEconService.cs
├── IFriendMessagesService.cs
├── IFriendsListService.cs
├── IGameServersService.cs
├── ILoyaltyRewardsService.cs
├── IMobileAppService.cs
├── IMobileNotificationService.cs
├── IPlayerService.cs
├── ISteamApps.cs
├── ISteamAwardsService.cs
├── ISteamEconomy.cs
├── ISteamNotificationService.cs
├── ISteamUser.cs
├── ISteamUserOAuth.cs
├── IStoreSalesService.cs
├── IStoreService.cs
├── ITwoFactorService.cs
├── IUserAccountService.cs
├── Models
│ ├── ApiRequest.cs
│ ├── IAuthenticationService
│ │ ├── BeginAuthSession.cs
│ │ ├── PollAuthSessionStatus.cs
│ │ └── RSAPublicKey.cs
│ ├── ICSGOPlayers_730
│ │ └── MatchSharingCode.cs
│ ├── ICSGOServers_730
│ │ ├── App.cs
│ │ ├── DCPerfectWorld.cs
│ │ ├── DataCenters.cs
│ │ ├── GameServerStatus.cs
│ │ ├── Matchmaking.cs
│ │ └── Services.cs
│ ├── IEconService
│ │ ├── Trade.cs
│ │ ├── TradeAssets.cs
│ │ ├── TradeHistory.cs
│ │ ├── TradeHistoryAssets.cs
│ │ ├── TradeHistoryDescription.cs
│ │ ├── TradeHold.cs
│ │ ├── TradeHoldDuration.cs
│ │ ├── TradeOffer.cs
│ │ ├── TradeOffersSummary.cs
│ │ ├── TradeStatus.cs
│ │ ├── Trades.cs
│ │ └── TradesHistory.cs
│ ├── IFriendMessagesService
│ │ ├── ActiveMessageSessions.cs
│ │ ├── MessageModel.cs
│ │ ├── MessageSession.cs
│ │ ├── RecentMessageRequest.cs
│ │ └── RecentMessages.cs
│ ├── IFriendsListService
│ │ ├── FavoriteFriend.cs
│ │ ├── FavoritesModel.cs
│ │ ├── FriendModel.cs
│ │ └── FriendsList.cs
│ ├── IGameServersService
│ │ ├── AccountList.cs
│ │ └── GameServer.cs
│ ├── IMobileNotificationService
│ │ ├── UserNotificationCounts.cs
│ │ └── UserNotifications.cs
│ ├── IPlayerService
│ │ ├── Badge.cs
│ │ ├── Customization.cs
│ │ ├── CustomizationSlot.cs
│ │ ├── FavoriteBadge.cs
│ │ ├── NicknameModel.cs
│ │ ├── NicknamesModel.cs
│ │ ├── OwnedGame.cs
│ │ ├── PlayerBadges.cs
│ │ ├── PlayerOwnedGames.cs
│ │ ├── PlayerQuests.cs
│ │ ├── PlayerSteamLevel.cs
│ │ ├── ProfileCustomization.cs
│ │ ├── ProfilePreferences.cs
│ │ ├── ProfileTheme.cs
│ │ ├── PurchasedCustomization.cs
│ │ └── Quest.cs
│ ├── ISteamApps
│ │ └── UpToDateModel.cs
│ ├── ISteamEconomy
│ │ ├── AssetClassInfo.cs
│ │ ├── AssetModel.cs
│ │ ├── AssetPrices.cs
│ │ └── ClassModel.cs
│ ├── ISteamUser
│ │ ├── FriendsList.cs
│ │ ├── PlayerBan.cs
│ │ ├── PlayerBans.cs
│ │ ├── PlayerFriend.cs
│ │ ├── PlayerSummary.cs
│ │ ├── PlayersArrayData.cs
│ │ ├── ResponseFriends.cs
│ │ └── VanityUrl.cs
│ ├── ISteamUserOAuth
│ │ ├── PlayerGroup.cs
│ │ ├── ResponseGroups.cs
│ │ └── TokenDetail.cs
│ ├── ITwoFactorService
│ │ └── QueryStatus.cs
│ ├── IUserAccountService
│ │ └── ClientWalletDetails.cs
│ └── ResponseData.cs
└── Protobufs
│ ├── CLoyaltyRewards_AddReaction_Request.cs
│ ├── CLoyaltyRewards_GetReactionConfig_Response.cs
│ ├── CLoyaltyRewards_GetReactionConfig_Response_ReactionConfig.cs
│ ├── CLoyaltyRewards_GetSummary_Request.cs
│ ├── CLoyaltyRewards_GetSummary_Response.cs
│ ├── CLoyaltyRewards_GetSummary_Response_Summary.cs
│ ├── CMobileAppService_GetMobileSummary_Request.cs
│ ├── CMobileAppService_GetMobileSummary_Response.cs
│ ├── CSteamAwards_GetNominationRecommendations_Request.cs
│ ├── CSteamAwards_GetNominationRecommendations_Response.cs
│ ├── CSteamAwards_Nominate_Request.cs
│ ├── CSteamAwards_PlayedApp.cs
│ ├── CSteamAwards_SuggestedApp.cs
│ ├── CSteamNotification_GetSteamNotifications_Request.cs
│ ├── CSteamNotification_GetSteamNotifications_Response.cs
│ ├── CStoreDiscoveryQueueSettings.cs
│ ├── CStore_GetDiscoveryQueue_Request.cs
│ ├── CStore_GetDiscoveryQueue_Response.cs
│ ├── CStore_SkipDiscoveryQueueItem_Request.cs
│ └── SteamNotificationData.cs
├── Auth
├── Interfaces
│ └── ISessionProvider.cs
├── v1
│ ├── APIEndpoints.cs
│ ├── Enums
│ │ ├── ConfirmationType.cs
│ │ ├── FinalizeResult.cs
│ │ ├── LinkResult.cs
│ │ ├── LoginResult.cs
│ │ ├── RESPONSE_STATUS.cs
│ │ └── SignInPlatform.cs
│ ├── Models
│ │ ├── SessionData.cs
│ │ ├── TimeAligner.cs
│ │ └── TimeQuery.cs
│ ├── SteamGuardAccount.cs
│ └── TimeQueryResponse.cs
└── v2
│ ├── AuthenticatorLinker.cs
│ ├── AuthenticatorMover.cs
│ ├── DTO
│ ├── AuthGuardRequest.cs
│ ├── AuthGuardResponse.cs
│ ├── AuthPollRequest.cs
│ ├── AuthPollResponse.cs
│ ├── AuthSessionConfirmation.cs
│ ├── AuthSessionDesktopRequest.cs
│ ├── AuthSessionMobileRequest.cs
│ ├── AuthSessionResponse.cs
│ ├── CAuthentication_DeviceDetails_Desktop.cs
│ ├── CAuthentication_DeviceDetails_Mobile.cs
│ ├── CAuthentication_GetAuthSessionInfo_Request.cs
│ ├── CAuthentication_GetAuthSessionInfo_Response.cs
│ ├── CAuthentication_GetAuthSessionsForAccount_Response.cs
│ ├── CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request.cs
│ ├── CPhone_IsAccountWaitingForEmailConfirmation_Response.cs
│ ├── CPhone_SendPhoneVerificationCode_Request.cs
│ ├── CPhone_SendPhoneVerificationCode_Response.cs
│ ├── CPhone_SetAccountPhoneNumber_Request.cs
│ ├── CPhone_SetAccountPhoneNumber_Response.cs
│ ├── CPhone_VerifyAccountPhoneWithCode_Request.cs
│ ├── CPhone_VerifyAccountPhoneWithCode_Response.cs
│ ├── CRemoveAuthenticatorViaChallengeContinue_Replacement_Token.cs
│ ├── CTwoFactor_AddAuthenticator_Request.cs
│ ├── CTwoFactor_AddAuthenticator_Response.cs
│ ├── CTwoFactor_FinalizeAddAuthenticator_Request.cs
│ ├── CTwoFactor_FinalizeAddAuthenticator_Response.cs
│ ├── CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request.cs
│ ├── CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Response.cs
│ ├── CTwoFactor_RemoveAuthenticatorViaChallengeStart_Response.cs
│ ├── CTwoFactor_RemoveAuthenticator_Request.cs
│ ├── CTwoFactor_RemoveAuthenticator_Response.cs
│ ├── CTwoFactor_Status_Request.cs
│ ├── CTwoFactor_Status_Response.cs
│ ├── CUserAccount_GetClientWalletDetails_Request.cs
│ ├── CUserAccount_GetWalletDetails_Response.cs
│ ├── MigrateSessionRequest.cs
│ ├── MobileSummeryRequest.cs
│ ├── PasswordRSA.cs
│ ├── UpdateTokenRequest.cs
│ └── UpdateTokenResponse.cs
│ ├── Enums
│ ├── ACCEPT_STATUS.cs
│ ├── ADD_THROUGH.cs
│ ├── EAuthSessionGuardType.cs
│ ├── EAuthSessionSecurityHistory.cs
│ ├── EAuthTokenPlatformType.cs
│ ├── EAuthTokenState.cs
│ ├── EBanContentCheckResult.cs
│ ├── EProtoClanEventType.cs
│ ├── EResult.cs
│ ├── ESessionPersistence.cs
│ ├── ETokenRenewalType.cs
│ ├── LoginResult.cs
│ ├── NEXT_STEP.cs
│ └── SENDVERIFCODE.cs
│ ├── Models
│ ├── AuthSessionForAccount.cs
│ ├── Confirmation.cs
│ ├── ConfirmationDetailsResponse.cs
│ ├── ConfirmationsResponse.cs
│ ├── RefreshSessionDataResponse.cs
│ ├── RemoveAuthenticatorResponse.cs
│ ├── SendConfirmationResponse.cs
│ └── SessionData.cs
│ ├── SteamGuardAccount.cs
│ └── UserLogin.cs
├── Enums.cs
├── Extensions.cs
├── Help
├── ChangeEmailProvider.cs
├── ChangePasswordProvider.cs
├── Enums
│ ├── ACCEPT_PROVIDER_STATUS.cs
│ ├── CHANGE_EMAIL_STEP.cs
│ ├── CHANGE_PASSWORD_STEP.cs
│ ├── CHANGE_STEP.cs
│ ├── OWNER_STEP_STATUS.cs
│ ├── POLL_STATUS.cs
│ ├── PROVIDER_LIST.cs
│ ├── STEP_ACCEPT_PROVIDER.cs
│ ├── STEP_STATUS.cs
│ └── VERIFY_STATUS.cs
├── Interfaces
│ └── IOwnershipProofProvider.cs
└── OwnershipProviders
│ ├── EmailProofProvider.cs
│ ├── LoginProofProvider.cs
│ ├── PhoneProofProvider.cs
│ └── SteamMobileAppProofProvider.cs
├── Helpers.cs
├── Inventory
├── V1
│ ├── Models
│ │ ├── Action.cs
│ │ ├── Asset.cs
│ │ ├── Description.cs
│ │ ├── DescriptionItem.cs
│ │ └── Tag.cs
│ └── SteamInventory.cs
└── V2
│ ├── Models
│ ├── Asset.cs
│ ├── Description.cs
│ ├── ItemAction.cs
│ ├── ItemAppData.cs
│ ├── ItemDescription.cs
│ └── ItemTag.cs
│ └── SteamInventory.cs
├── Models
├── AboutProfile.cs
├── AccountMain.cs
├── AppContextData.cs
├── DangerZoneMode.cs
├── DefaultRequest.cs
├── GridIntoGoo.cs
├── ImageItem.cs
├── InformationProfileRequest.cs
├── InvormationProfileResponse.cs
├── JwtData.cs
├── MarketHistoryGraph.cs
├── MarketItem.cs
├── Matchmaking.cs
├── MatchmakingMode.cs
├── ModeLastMatch.cs
├── Operation.cs
├── OperationProgress.cs
├── PurchaseHistory
│ ├── PurchaseHistoryCursorModel.cs
│ ├── PurchaseHistoryData.cs
│ ├── PurchaseHistoryModel.cs
│ ├── PurchasePaymentGameModel.cs
│ └── PurchasePaymentMethodModel.cs
├── SteamOffer.cs
├── SteamOfferItem.cs
├── SteamOfferResponse.cs
├── SteamTradeError.cs
├── SubscriptionServiceActiveUntil.cs
├── Trade
│ ├── ConfTradeOffer.cs
│ ├── NewTradeOffer.cs
│ └── Token.cs
├── TradeOfferData.cs
├── UploadImageResponse.cs
├── UserInfoModel.cs
├── VacGameBanModel.cs
├── VacGameBansData.cs
├── WalletInfo.cs
├── WebApiKey.cs
├── WebTradeEligibility.cs
└── WebTradeEligibilityReason.cs
├── Script
├── Ajax.cs
├── AjaxHelp.cs
├── DTO
│ ├── BuyOrderStatusAsset.cs
│ ├── BuyOrderStatusResponse.cs
│ ├── CStoreSalesService_SetVote.cs
│ ├── CStoreSalesService_SetVote_Request.cs
│ ├── CStoreSalesService_SetVote_Response.cs
│ ├── CancelTrade.cs
│ ├── CommentResponse.cs
│ ├── CookiePreferences
│ │ ├── ContentCustomization.cs
│ │ ├── CookiePreferences.cs
│ │ ├── ThirdPartyAnalytics.cs
│ │ ├── ThirdPartyContent.cs
│ │ └── ValveAnalytics.cs
│ ├── CreateBuyOrder.cs
│ ├── Data.cs
│ ├── DataOrder.cs
│ ├── Historing
│ │ ├── Historing.cs
│ │ └── HistoryItem.cs
│ ├── InventoryHistory.cs
│ ├── InventoryHistoryApp.cs
│ ├── InventoryHistoryCursor.cs
│ ├── InventoryHistoryItem.cs
│ ├── ItemGroup.cs
│ ├── ItemPriceHistory.cs
│ ├── ItemQueryLocations.cs
│ ├── ItemRender
│ │ ├── ItemRenderAppData.cs
│ │ ├── ItemRenderAsset.cs
│ │ ├── ItemRenderListing.cs
│ │ ├── ItemRenderListingAsset.cs
│ │ ├── ItemRenderRequest.cs
│ │ └── ItemRenderResponse.cs
│ ├── Listinging
│ │ ├── Listing.cs
│ │ └── ListingItem.cs
│ ├── MarketSearchAssetDescription.cs
│ ├── MarketSearchItem.cs
│ ├── MarketSearchRequest.cs
│ ├── MarketSearchResponse.cs
│ ├── OrderHistogram.cs
│ ├── OrderHistogramRequest.cs
│ ├── OrderItem.cs
│ ├── PriceHistory.cs
│ ├── PriceOverview.cs
│ ├── QueueApps.cs
│ ├── Response.cs
│ ├── ResponseSuccess.cs
│ ├── RgCounts.cs
│ ├── SellItem.cs
│ ├── SteamLoyaltyStore.cs
│ ├── StoreUserConfig.cs
│ └── SuccessRgCounts.cs
├── Enums.cs
└── Models
│ ├── AjaxDefault.cs
│ ├── AjaxEmailConfirm.cs
│ ├── AjaxInfoRequest.cs
│ ├── AjaxLicense.cs
│ ├── AjaxLicenseInfo.cs
│ ├── AjaxLicenseItem.cs
│ ├── AjaxNext.cs
│ ├── AjaxNextStep.cs
│ ├── AjaxOp.cs
│ ├── AjaxPasswordAvailable.cs
│ ├── AjaxPollRecoveryConf.cs
│ ├── AjaxRefreshResponse.cs
│ ├── AjaxSetTokenResponse.cs
│ ├── AjaxValidPhone.cs
│ ├── AjaxWalletCode.cs
│ ├── AjaxWizardRequest.cs
│ ├── GooValue.cs
│ ├── MoreHistoryModel.cs
│ ├── NextRedirect.cs
│ ├── PhoneAjax.cs
│ ├── RecoveryChangeEmail.cs
│ ├── RecoveryConfirmation.cs
│ ├── RequestKeyResponse.cs
│ └── SteamRSA.cs
├── Steam.cs
├── SteamApiUrls.cs
├── SteamCommunityUrls.cs
├── SteamIDs.cs
├── SteamPoweredUrls.cs
├── SteamWeb.csproj
└── Web
├── DTO
├── ByteResponse.cs
├── GetRequest.cs
├── MemoryResponse.cs
├── PostRequest.cs
├── ProtobufRequest.cs
├── Response.cs
└── StringResponse.cs
├── Downloader.cs
├── Enums
├── ProxyType.cs
└── USER_AGENT.cs
├── Knowns
├── KnownCookies.cs
├── KnownHeaders.cs
├── KnownUri.cs
└── KnownUserAgents.cs
└── Proxy.cs
/ExampleAuth1/ExampleAuth1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ExampleAuth1/Program.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb;
2 |
3 | namespace ExampleAuth1;
4 | internal static class Program
5 | {
6 | static void Main(string[] args)
7 | {
8 | Console.Title = "Выполнение входа в Steam";
9 |
10 | Console.WriteLine("Введите логин:");
11 | var login = Console.ReadLine()!;
12 |
13 | Console.WriteLine("Введите пароль:");
14 | var passwd = Console.ReadLine()!;
15 |
16 | Console.WriteLine("Введите 2fa для SteamGuard или оставьте пустым для NoneGuard:");
17 | var fa2 = Console.ReadLine()!;
18 |
19 | var (result, session) = Steam.Auth(login, passwd, fa2, null, SteamWeb.Auth.v2.Enums.EAuthTokenPlatformType.WebBrowser);
20 | if (result != SteamWeb.Auth.v2.Enums.LoginResult.LoginOkay)
21 | Console.WriteLine("Ошибка при входе: " + result);
22 | else
23 | Console.WriteLine("Вход выполнен; access_token=" + session!.AccessToken);
24 | Console.ReadKey();
25 | }
26 | }
--------------------------------------------------------------------------------
/ExampleAuth2/ExampleAuth2.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ExampleAuth2/Program.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb;
2 | using SteamWeb.Auth.v2;
3 |
4 | namespace ExampleAuth2;
5 | internal static class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.Title = "Выполнение входа в Steam";
10 |
11 | Console.WriteLine("Введите логин:");
12 | var login = Console.ReadLine()!;
13 |
14 | Console.WriteLine("Введите пароль:");
15 | var passwd = Console.ReadLine()!;
16 |
17 | Console.WriteLine("Введите 2fa для SteamGuard или оставьте пустым для NoneGuard:");
18 | var fa2 = Console.ReadLine()!;
19 |
20 | var userLogin = new UserLogin(login, passwd, SteamWeb.Auth.v2.Enums.EAuthTokenPlatformType.WebBrowser);
21 | userLogin.Data = fa2;
22 | var (result, session) = Steam.Auth(userLogin);
23 | if (result != SteamWeb.Auth.v2.Enums.LoginResult.LoginOkay)
24 | Console.WriteLine($"Ошибка при входе {result}; eresult={userLogin.LastEResult}");
25 | else
26 | Console.WriteLine("Вход выполнен; access_token=" + session!.AccessToken);
27 | Console.ReadKey();
28 | }
29 | }
--------------------------------------------------------------------------------
/ExampleAuth3/ExampleAuth3.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/ExampleChangePassword/ExampleChangePassword.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | embedded
16 | $(DefineConstants);FACTORY
17 |
18 |
19 |
20 | embedded
21 | $(DefineConstants);FACTORY
22 | True
23 |
24 |
25 |
26 |
27 | ..\..\restclient_factory\RestClientFactory\bin\Publish\RestClientFactory.dll
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ExampleMoveSteamGuard/ExampleMoveSteamGuard.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 | steam_guard_mover
9 | ExampleMoveSteamGuard.Program
10 | ryx_rw
11 | RAWENSOFT
12 | Move Steam Guard
13 |
14 |
15 |
16 | embedded
17 |
18 |
19 |
20 | embedded
21 | $(DefineConstants);FACTORY
22 |
23 |
24 |
25 | embedded
26 |
27 |
28 |
29 | embedded
30 | $(DefineConstants);FACTORY
31 | True
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\..\restclient_factory\RestClientFactory\bin\Publish\RestClientFactory.dll
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ExampleRefreshJwt/ExampleRefreshJwt.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 | steam_jwt_refresher
9 | ryx_rw
10 | RAWENSOFT
11 | Steam Jwt Refresher
12 |
13 |
14 |
15 | embedded
16 |
17 |
18 |
19 | embedded
20 | $(DefineConstants);FACTORY
21 |
22 |
23 |
24 | embedded
25 |
26 |
27 |
28 | embedded
29 | $(DefineConstants);FACTORY
30 | True
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | ..\..\restclient_factory\RestClientFactory\bin\Publish\RestClientFactory.dll
40 | False
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ExampleSteamGuardAutoSingIn/ExampleSteamGuardAutoSingIn.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 | steam_auto_sign_in
9 | ExampleSteamGuardAutoSingIn.Program
10 | ryx_rw
11 | RAWENSOFT
12 | Steam Sign In Auto Accept
13 |
14 |
15 |
16 | embedded
17 |
18 |
19 |
20 | embedded
21 | $(DefineConstants);FACTORY
22 |
23 |
24 |
25 | embedded
26 |
27 |
28 |
29 | embedded
30 | $(DefineConstants);FACTORY
31 | True
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\..\restclient_factory\RestClientFactory\bin\Publish\RestClientFactory.dll
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/ExampleSteamGuardEmail/ExampleSteamGuardEmail.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | net8.0
6 | enable
7 | enable
8 | steam_guard_email
9 | ExampleSteamGuardEmail.Program
10 | ryx_rw
11 | RAWENSOFT
12 | Steam Guard Email Linker
13 |
14 |
15 |
16 | embedded
17 |
18 |
19 |
20 | embedded
21 | $(DefineConstants);FACTORY
22 |
23 |
24 |
25 | embedded
26 |
27 |
28 |
29 | embedded
30 | $(DefineConstants);FACTORY
31 | True
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\..\restclient_factory\RestClientFactory\bin\Publish\RestClientFactory.dll
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/SteamWEB.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0
5 | false
6 | SteamWeb
7 | SteamWeb
8 | xaray
9 | RAWENSOFT
10 | 1.2.0.1
11 | 1.5.0.1
12 | embedded
13 | False
14 |
15 |
16 |
17 | False
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/steam_web/API/IGameServersService.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json;
2 | using SteamWeb.API.Models;
3 | using SteamWeb.API.Models.IGameServersService;
4 | using SteamWeb.Web;
5 |
6 | namespace SteamWeb.API;
7 | public static class IGameServersService
8 | {
9 | public static async Task> GetAccountList(ApiRequest apiRequest)
10 | {
11 | var request = new GetRequest(SteamApiUrls.IGameServersService_GetAccountList_v1)
12 | {
13 | Proxy = apiRequest.Proxy,
14 | CancellationToken = apiRequest.CancellationToken,
15 | UserAgent = KnownUserAgents.OkHttp,
16 | };
17 | apiRequest.AddAuthToken(request);
18 | var response = await Downloader.GetAsync(request);
19 | if (!response.Success)
20 | return new();
21 | try
22 | {
23 | var obj = JsonSerializer.Deserialize>(response.Data!, Steam.JsonOptions)!;
24 | obj.Success = true;
25 | return obj;
26 | }
27 | catch (Exception)
28 | {
29 | return new();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/steam_web/API/IMobileNotificationService.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.API.Models;
2 | using SteamWeb.Web;
3 | using System.Text.Json;
4 | using SteamWeb.API.Models.IMobileNotificationService;
5 |
6 | namespace SteamWeb.API;
7 | public static class IMobileNotificationService
8 | {
9 | public static async Task> GetUserNotificationCounts(ApiRequest apiRequest)
10 | {
11 | var request = new GetRequest(SteamApiUrls.IMobileNotificationService_GetUserNotificationCounts_v1)
12 | {
13 | Proxy = apiRequest.Proxy,
14 | CancellationToken = apiRequest.CancellationToken,
15 | UserAgent = KnownUserAgents.OkHttp
16 | };
17 | apiRequest.AddAuthToken(request);
18 | var response = await Downloader.GetAsync(request);
19 | if (!response.Success)
20 | return new();
21 | try
22 | {
23 | var obj = JsonSerializer.Deserialize>(response.Data!, Steam.JsonOptions)!;
24 | obj.Success = true;
25 | return obj;
26 | }
27 | catch (Exception)
28 | {
29 | return new();
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/steam_web/API/ITwoFactorService.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.API.Models;
2 | using SteamWeb.API.Models.ITwoFactorService;
3 | using SteamWeb.Web;
4 | using System;
5 | using System.Text.Json;
6 | using System.Threading.Tasks;
7 |
8 | namespace SteamWeb.API;
9 | public static class ITwoFactorService
10 | {
11 | public static async Task> QueryStatus(ApiRequest apiRequest, ulong steamid)
12 | {
13 | var request = new PostRequest(SteamApiUrls.ITwoFactorService_QueryStatus_v1, Downloader.AppFormUrlEncoded)
14 | {
15 | Proxy = apiRequest.Proxy,
16 | CancellationToken = apiRequest.CancellationToken,
17 | UserAgent = KnownUserAgents.OkHttp,
18 | };
19 | apiRequest.AddAuthToken(request).AddPostData("steamid", steamid);
20 | var response = await Downloader.PostAsync(request);
21 | if (!response.Success)
22 | return new();
23 | try
24 | {
25 | var obj = JsonSerializer.Deserialize>(response.Data!, Steam.JsonOptions)!;
26 | obj.Success = true;
27 | return obj;
28 | }
29 | catch (Exception)
30 | {
31 | return new();
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ApiRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using SteamWeb.Extensions;
3 |
4 | namespace SteamWeb.API.Models;
5 | public class ApiRequest
6 | {
7 | ///
8 | /// access_token или api key
9 | ///
10 | public string? AuthToken { get; init; }
11 | public IWebProxy? Proxy { get; init; }
12 | public CancellationToken? CancellationToken { get; init; }
13 |
14 | public ApiRequest() { }
15 | public ApiRequest(string? auth_token) => AuthToken = auth_token;
16 | public ApiRequest(string? auth_token, IWebProxy? proxy) : this(auth_token) => Proxy = proxy;
17 | public ApiRequest(string? auth_token, IWebProxy? proxy, CancellationToken? cancellationToken) : this(auth_token, proxy)
18 | => CancellationToken = cancellationToken;
19 |
20 | internal GetRequest AddAuthToken(GetRequest request)
21 | {
22 | if (!AuthToken.IsEmpty())
23 | {
24 | var length = AuthToken!.Length;
25 | if (length == 33 || length == 32)
26 | request.AddQuery("key", AuthToken!);
27 | else
28 | request.AddQuery("access_token", AuthToken!);
29 | }
30 | return request;
31 | }
32 | internal PostRequest AddAuthToken(PostRequest request)
33 | {
34 | if (!AuthToken.IsEmpty())
35 | {
36 | var length = AuthToken!.Length;
37 | if (length == 33 || length == 32)
38 | request.AddQuery("key", AuthToken!);
39 | else
40 | request.AddQuery("access_token", AuthToken!);
41 | }
42 | return request;
43 | }
44 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IAuthenticationService/BeginAuthSession.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IAuthenticationService
8 | {
9 | public class BeginAuthSession
10 | {
11 | public string client_id { get; set; }
12 | public string request_id { get; set; }
13 | public ushort interval { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IAuthenticationService/PollAuthSessionStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IAuthenticationService
8 | {
9 | public class PollAuthSessionStatus
10 | {
11 | public string new_client_id { get; set; }
12 | //public string new_challenge_url { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IAuthenticationService/RSAPublicKey.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IAuthenticationService
8 | {
9 | public class RSAPublicKey
10 | {
11 | public string publickey_mod { get; set; }
12 | public string publickey_exp { get; set; }
13 | public string timestamp { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOPlayers_730/MatchSharingCode.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Extensions;
3 |
4 | namespace SteamWeb.API.Models.ICSGOPlayers_730;
5 | public class MatchSharingCode
6 | {
7 | public const string NoneNextCode = "n/a";
8 |
9 | [JsonPropertyName("nextcode")] public string? NextCode { get; init; }
10 | [JsonIgnore] public bool IsNext => !NextCode.IsEmpty() && NoneNextCode != NextCode;
11 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOServers_730/App.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ICSGOServers_730
8 | {
9 | public record App
10 | {
11 | public int version { get; set; }
12 | public int timestamp { get; set; }
13 | public string time { get; set; }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOServers_730/DCPerfectWorld.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ICSGOServers_730
8 | {
9 | public record DCPerfectWorld
10 | {
11 | public string availability { get; set; } = "offline";
12 | public string latency { get; set; } = "idle";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOServers_730/DataCenters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ICSGOServers_730
8 | {
9 | public class DataCenter
10 | {
11 | public string capacity { get; set; }
12 | public string load { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOServers_730/GameServerStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ICSGOServers_730
8 | {
9 | public class GameServerStatus
10 | {
11 | public App app { get; set; } = new();
12 | public Services services { get; set; } = new();
13 | public Dictionary datacenters { get; set; } = new();
14 | public Matchmaking matchmaking { get; set; } = new();
15 | public Dictionary perfectworld { get; set; } = new();
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOServers_730/Matchmaking.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ICSGOServers_730
8 | {
9 | public record Matchmaking
10 | {
11 | public string scheduler { get; set; } = "normal";
12 | public int online_servers { get; set; }
13 | public int online_players { get; set; }
14 | public int searching_players { get; set; }
15 | public int search_seconds_avg { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ICSGOServers_730/Services.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ICSGOServers_730
8 | {
9 | public record Services
10 | {
11 | ///
12 | /// Sessions Logon
13 | ///
14 | public string SessionsLogon { get; set; } = "offline";
15 | public string SteamCommunity { get; set; } = "offline";
16 | ///
17 | /// Game Coordinator
18 | ///
19 | public string IEconItems { get; set; } = "offline";
20 | public string Leaderboards { get; set; } = "offline";
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeAssets.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IEconService;
4 | public class TradeAssets
5 | {
6 | [JsonPropertyName("appid")] public uint AppId { get; init; }
7 | [JsonPropertyName("contextid")] public ulong ContextId { get; init; }
8 | ///
9 | /// either assetid or currencyid will be set
10 | ///
11 | [JsonPropertyName("assetid")] public ulong AssetId { get; init; }
12 | ///
13 | /// either assetid or currencyid will be set
14 | ///
15 | [JsonPropertyName("currencyid")] public byte CurrencyId { get; init; }
16 | ///
17 | /// together with instanceid, uniquely identifies the display of the item
18 | ///
19 | [JsonPropertyName("classid")] public ulong ClassId { get; init; }
20 | ///
21 | /// together with classid, uniquely identifies the display of the item
22 | ///
23 | [JsonPropertyName("instanceid")] public ulong InstanceId { get; init; }
24 | ///
25 | /// the amount offered in the trade, for stackable items and currency
26 | ///
27 | [JsonPropertyName("amount")] public uint Amount { get; init; }
28 | ///
29 | /// a boolean that indicates the item is no longer present in the user's inventory
30 | ///
31 | [JsonPropertyName("missing")] public bool Missing { get; init; } = false;
32 | ///
33 | /// a string that represent Steam's determination of the item's value, in whole USD pennies. How this is determined is unknown.
34 | ///
35 | [JsonPropertyName("est_usd")] public uint EstUsd { get; init; }
36 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeHistory.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeHistory
4 | {
5 | ///
6 | /// a unique identifier for the trade/ Пример этого 3749786070834469105.
7 | ///
8 | [JsonPropertyName("tradeid")] public ulong TradeId { get; init; }
9 | ///
10 | /// the SteamID64 of your trade partner
11 | ///
12 | [JsonPropertyName("steamid_other")] public ulong SteamIdOther { get; init; }
13 | ///
14 | /// unix timestamp of the time the trade started to commit
15 | ///
16 | [JsonPropertyName("time_init")] public int TimeInit { get; init; }
17 | ///
18 | /// unix timestamp of the time the trade will leave escrow
19 | ///
20 | [JsonPropertyName("time_escrow_end")] public int TimeEscrowEnd { get; init; }
21 | [JsonPropertyName("status")] public Enums.ETradeStatus Status { get; init; } = Enums.ETradeStatus.k_ETradeStatus_Failed;
22 | [JsonPropertyName("assets_given")] public List AssetsGiven { get; init; } = new(1);
23 | [JsonPropertyName("assets_received")] public List AssetsReceived { get; init; } = new(1);
24 |
25 | ///
26 | /// Трейд содержит предметы только для отправки
27 | ///
28 | [JsonIgnore] public bool OnlyGiven => AssetsGiven.Count != 0 && AssetsReceived.Count == 0;
29 | ///
30 | /// Трейд содержит предметы только для меня
31 | ///
32 | [JsonIgnore] public bool OnlyReceive => AssetsReceived.Count != 0 && AssetsGiven.Count == 0;
33 | ///
34 | /// Это полноценный обмен. С обеих сторон имеются предметы.
35 | ///
36 | [JsonIgnore] public bool IsExchange => AssetsGiven.Count > 0 && AssetsReceived.Count > 0;
37 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeHistoryAssets.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeHistoryAssets
4 | {
5 | [JsonPropertyName("appid")] public uint AppId { get; init; }
6 | [JsonPropertyName("context")] public ulong Context { get; init; }
7 | [JsonPropertyName("assetid")] public ulong AssetId { get; init; }
8 | [JsonPropertyName("amount")] public uint Amount { get; init; }
9 | ///
10 | /// together with instanceid, uniquely identifies the display of the item
11 | ///
12 | [JsonPropertyName("classid")] public ulong ClassId { get; init; }
13 | ///
14 | /// together with classid, uniquely identifies the display of the item
15 | ///
16 | [JsonPropertyName("instanceid")] public ulong InstanceId { get; init; }
17 | ///
18 | /// the asset ID given to the item after the trade completed
19 | ///
20 | [JsonPropertyName("new_assetid")] public ulong NewAssetId { get; init; }
21 | ///
22 | /// the context ID the item was placed in
23 | ///
24 | [JsonPropertyName("new_contextid")] public ulong NewContextId { get; init; }
25 | ///
26 | /// if the trade has been rolled back, the new asset ID given in the rollback
27 | ///
28 | [JsonPropertyName("rollback_new_assetid")] public ulong RollbackNewAssetId { get; init; }
29 | ///
30 | /// if the trade has been rolled back, the context ID the new asset was placed in
31 | ///
32 | [JsonPropertyName("rollback_new_contextid")] public ulong RollbackNewContextId { get; init; }
33 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeHistoryDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeHistoryDescription
4 | {
5 | [JsonPropertyName("type")] public string? Type { get; init; }
6 | [JsonPropertyName("value")] public string? Value { get; init; }
7 | [JsonPropertyName("color")] public string? Color { get; init; }
8 | [JsonPropertyName("appid")] public uint AppId { get; init; }
9 | [JsonPropertyName("classid")] public ulong ClassId { get; init; }
10 | [JsonPropertyName("instanceid")] public ulong InstanceId { get; init; }
11 | [JsonPropertyName("currency")] public bool Currency { get; init; } = false;
12 | [JsonPropertyName("background_color")] public string BackgroundColor { get; init; } = string.Empty;
13 | [JsonPropertyName("icon_url")] public string? IconUrl { get; init; }
14 | [JsonPropertyName("icon_url_large")] public string? IconUrlLarge { get; init; }
15 | [JsonPropertyName("tradable")] public bool Tradable { get; init; } = false;
16 | [JsonPropertyName("name")] public string? Name { get; init; }
17 | [JsonPropertyName("name_color")] public string? NameColor { get; init; }
18 | [JsonPropertyName("market_name")] public string? MarketName { get; init; }
19 | [JsonPropertyName("market_hash_name")] public string? MarketHashName { get; init; }
20 | [JsonPropertyName("commodity")] public bool Commodity { get; init; } = false;
21 | [JsonPropertyName("market_tradable_restriction")] public sbyte MarketTradableRestriction { get; init; }
22 | [JsonPropertyName("marketable")] public bool Marketable { get; init; } = false;
23 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeHold.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeHold
4 | {
5 | [JsonPropertyName("escrow_end_duration_seconds")] public uint EscrowEndDurationSeconds { get; init; }
6 | ///
7 | /// Не null при escrow_end_duration_seconds > 0
8 | ///
9 | [JsonPropertyName("escrow_end_date")] public int? EscrowEndDate { get; init; }
10 | ///
11 | /// Не null при escrow_end_duration_seconds > 0. Пример: 2022-12-27T12:20:00Z
12 | ///
13 | [JsonPropertyName("escrow_end_date_rfc3339")] public DateTime? EscrowEndDateRfc3339 { get; init; }
14 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeHoldDuration.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeHoldDuration
4 | {
5 | [JsonPropertyName("my_escrow")] public TradeHold? MyEscrow { get; init; }
6 | [JsonPropertyName("their_escrow")] public TradeHold? TheirEscrow { get; init; }
7 | [JsonPropertyName("both_escrow")] public TradeHold? BothEscrow { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeOffer.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeOffer
4 | {
5 | [JsonPropertyName("offer")] public Trade? Offer { get; init; }
6 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeOffersSummary.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradeOffersSummary
4 | {
5 | [JsonPropertyName("pending_received_count")] public uint PendingReceivedCount { get; init; }
6 | [JsonPropertyName("new_received_count")] public uint NewReceivedCount { get; init; }
7 | [JsonPropertyName("updated_received_count")] public uint UpdatedReceivedCount { get; init; }
8 | [JsonPropertyName("historical_received_count")] public uint HistoricalReceivedCount { get; init; }
9 | [JsonPropertyName("pending_sent_count")] public uint PendingSentCount { get; init; }
10 | [JsonPropertyName("newly_accepted_sent_count")] public uint NewlyAcceptedSentCount { get; init; }
11 | [JsonPropertyName("updated_sent_count")] public uint UpdatedSentCount { get; init; }
12 | [JsonPropertyName("historical_sent_count")] public uint HistoricalSentCount { get; init; }
13 | [JsonPropertyName("escrow_received_count")] public uint EscrowReceivedCount { get; init; }
14 | [JsonPropertyName("escrow_sent_count")] public uint EscrowSentCount { get; init; }
15 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradeStatus.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Extensions;
3 |
4 | namespace SteamWeb.API.Models.IEconService;
5 | public class TradeStatus
6 | {
7 | [JsonPropertyName("trades")] public TradeHistory[] Trades { get; init; } = Array.Empty();
8 | ///
9 | /// Доступно если get_descriptions == true
10 | ///
11 | [JsonPropertyName("descriptions")] public List Descriptions { get; init; } = new(1);
12 |
13 | ///
14 | /// Доступно если get_descriptions == true
15 | ///
16 | ///
17 | ///
18 | /// Null если описание не найдено
19 | public TradeHistoryDescription? GetDescriptionForItem(string classid, string instanceid)
20 | {
21 | var cid = classid.ParseUInt64();
22 | var iid = instanceid.ParseUInt64();
23 | var item = Descriptions
24 | .Where(x => x.ClassId == cid)
25 | .FirstOrDefault(x => x.InstanceId == iid);
26 | return item;
27 | }
28 | ///
29 | /// Доступно если get_descriptions == true
30 | ///
31 | ///
32 | ///
33 | /// Null если описание не найдено
34 | public TradeHistoryDescription? GetDescriptionForItem(ulong classid, ulong instanceid)
35 | {
36 | var item = Descriptions
37 | .Where(x => x.ClassId == classid)
38 | .FirstOrDefault(x => x.InstanceId == instanceid);
39 | return item;
40 | }
41 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IEconService/TradesHistory.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.API.Models.IEconService;
3 | public class TradesHistory: TradeStatus
4 | {
5 | ///
6 | /// Есть значение если include_total == true
7 | ///
8 | [JsonPropertyName("total_trades")] public uint? TotalTrades { get; set; } = null;
9 | [JsonPropertyName("more")] public bool More { get; set; } = false;
10 |
11 | public List GetTradesForUser(ulong steamid64_other)
12 | {
13 | var list = new List(Trades.Length);
14 | foreach (var item in Trades)
15 | if (item.SteamIdOther == steamid64_other)
16 | list.Add(item);
17 | return list;
18 | }
19 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendMessagesService/ActiveMessageSessions.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendMessagesService;
4 | public class ActiveMessageSessions
5 | {
6 | [JsonPropertyName("message_sessions")] public MessageSession[] MessageSessions { get; init; } = Array.Empty();
7 | [JsonPropertyName("timestamp")] public int Timestamp { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendMessagesService/MessageModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendMessagesService;
4 | public class MessageModel
5 | {
6 | [JsonPropertyName("accountid")] public uint AccountId { get; init; }
7 | [JsonPropertyName("timestamp")] public int Timestamp { get; init; }
8 | [JsonPropertyName("message")] public string Message { get; init; }
9 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendMessagesService/MessageSession.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendMessagesService;
4 | public class MessageSession
5 | {
6 | ///
7 | /// SteamId32 друга
8 | ///
9 | [JsonPropertyName("accountid_friend")] public uint AccountIdFriend { get; init; }
10 | ///
11 | /// Время прихода сообщения
12 | ///
13 | [JsonPropertyName("last_message")] public int LastMessage { get; init; }
14 | ///
15 | /// Последнее время просмотра диалога
16 | ///
17 | [JsonPropertyName("last_view")] public int LastView { get; init; }
18 | ///
19 | /// Количество не прочитанных сообщений
20 | ///
21 | [JsonPropertyName("unread_message_count")] public uint UnreadMessageCount { get; init; }
22 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendMessagesService/RecentMessageRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendMessagesService;
4 | public class RecentMessageRequest
5 | {
6 | public ulong SteamId1 { get; }
7 | public ulong SteamId2 { get; }
8 | ///
9 | /// If non-zero, cap the number of recent messages to return.
10 | ///
11 | public uint? Count { get; set; }
12 | ///
13 | /// Grab the block of chat from the most recent conversation (a ~5 minute period)
14 | ///
15 | public bool MostRecentConversation { get; set; } = false;
16 | ///
17 | /// If non-zero, return only messages with timestamps greater or equal to this. If zero, we only return messages from a recent time cutoff.
18 | ///
19 | public int? RecentTime32StartTime { get; set; }
20 | ///
21 | /// Return the results with bbcode formatting.
22 | ///
23 | public bool BbCodeFormat { get; set; } = false;
24 | ///
25 | /// Combined with start time, only messages after this ordinal are returned (dedupes messages in same second)
26 | ///
27 | public int? StartOrdinal { get; set; }
28 | ///
29 | /// if present/non-zero, return only messages before this.
30 | ///
31 | public int? TimeLast { get; set; }
32 | public int? OrdinalLast { get; set; }
33 |
34 | [JsonConstructor]
35 | public RecentMessageRequest(ulong steamid1, ulong steamid2)
36 | {
37 | SteamId1 = steamid1;
38 | SteamId2 = steamid2;
39 | }
40 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendMessagesService/RecentMessages.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendMessagesService;
4 | public class RecentMessages
5 | {
6 | [JsonPropertyName("messages")] public MessageModel[] Messages { get; init; } = Array.Empty();
7 | [JsonPropertyName("more_available")] public bool MoreAvailable { get; init; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendsListService/FavoriteFriend.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendsListService;
4 | public class FavoriteFriend
5 | {
6 | [JsonPropertyName("accountid")] public uint AccountId { get; init; }
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendsListService/FavoritesModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendsListService;
4 | public class FavoritesModel
5 | {
6 | [JsonPropertyName("favorites")] public FavoriteFriend[] Favorites { get; init; } = Array.Empty();
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendsListService/FriendModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Enums;
3 |
4 | namespace SteamWeb.API.Models.IFriendsListService;
5 | public class FriendModel
6 | {
7 | [JsonPropertyName("ulfriendid")] public uint FriendId { get; init; }
8 | [JsonPropertyName("efriendrelationship")] public EFriendRelationship FriendRelationship { get; init; }
9 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IFriendsListService/FriendsList.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IFriendsListService;
4 | public class FriendsList
5 | {
6 | [JsonPropertyName("bincremental")] public bool bIncremental { get; init; } = false;
7 | [JsonPropertyName("friends")] public FriendModel[] Friends { get; init; } = Array.Empty();
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IGameServersService/AccountList.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IGameServersService
8 | {
9 | public record AccountList
10 | {
11 | public List servers { get; set; } = new();
12 | public bool is_banned { get; set; }
13 | public int expires { get; set; }
14 | ///
15 | /// steamid64 аккаунта, которому принадлежат эти сервера
16 | ///
17 | public string actor { get; set; } = "0";
18 | public int last_action_time { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IGameServersService/GameServer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IGameServersService
8 | {
9 | public record GameServer
10 | {
11 | public string steamid { get; set; }
12 | public int appid { get; set; }
13 | public string login_token { get; set; }
14 | public string memo { get; set; }
15 | public bool is_deleted { get; set; }
16 | public bool is_expired { get; set; }
17 | public int rt_last_logon { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IMobileNotificationService/UserNotificationCounts.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IMobileNotificationService
8 | {
9 | public class UserNotificationCounts
10 | {
11 | public UserNotification[] notifications { get; set; } = new UserNotification[0];
12 | public uint account_alert_count { get; set; } = 0;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IMobileNotificationService/UserNotifications.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.IMobileNotificationService
8 | {
9 | public class UserNotification
10 | {
11 | public ushort user_notification_type { get; set; }
12 | public uint count { get; set; }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/Badge.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class Badge
5 | {
6 | [JsonPropertyName("badgeid")] public ushort BadgeId { get; init; }
7 | [JsonPropertyName("level")] public uint Level { get; init; }
8 | [JsonPropertyName("completion_time")] public int CompletionTime { get; init; }
9 | [JsonPropertyName("xp")] public uint Xp { get; init; }
10 | [JsonPropertyName("scarcity")] public uint Scarcity { get; init; }
11 | [JsonPropertyName("appid")] public uint? AppId { get; init; }
12 | [JsonPropertyName("communityitemid")] public ulong? CommunityItemId { get; init; }
13 | [JsonPropertyName("border_color")] public ushort? BorderColor { get; init; }
14 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/Customization.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class Customization
5 | {
6 | [JsonPropertyName("customization_type")] public ushort CustomizationType { get; init; }
7 | [JsonPropertyName("customization_style")] public ushort CustomizationStyle { get; init; }
8 | [JsonPropertyName("active")] public bool Active { get; init; } = false;
9 | [JsonPropertyName("large")] public bool Large { get; init; } = false;
10 | [JsonPropertyName("level")] public ushort Level { get; init; }
11 | [JsonPropertyName("purchaseid")] public ulong PurchaseId { get; init; }
12 | [JsonPropertyName("slots")] public CustomizationSlot[] Slots { get; init; } = Array.Empty();
13 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/CustomizationSlot.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class CustomizationSlot
5 | {
6 | [JsonPropertyName("slot")] public ushort Slot { get; init; }
7 | [JsonPropertyName("appid")] public uint AppId { get; init; }
8 | [JsonPropertyName("replay_year")] public ushort replay_year { get; init; }
9 | [JsonPropertyName("accountid")] public uint accountid { get; init; }
10 | [JsonPropertyName("publishedfileid")] public ulong publishedfileid { get; init; }
11 | [JsonPropertyName("title")] public string? title { get; init; }
12 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/FavoriteBadge.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class FavoriteBadge
5 | {
6 | [JsonPropertyName("has_favorite_badge")] public bool HasFavoriteBadge { get; init; } = false;
7 | ///
8 | /// Есть значение, если has_favorite_badge == true
9 | ///
10 | [JsonPropertyName("badgeid")] public ushort? BadgeId { get; init; }
11 | ///
12 | /// Есть значение, если has_favorite_badge == true
13 | ///
14 | [JsonPropertyName("level")] public uint? Level { get; init; }
15 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/NicknameModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class NicknameModel
5 | {
6 | [JsonPropertyName("accountid")] public uint AccountId { get; init; }
7 | [JsonPropertyName("nickname")] public string Nickname { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/NicknamesModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class NicknamesModel
5 | {
6 | [JsonPropertyName("nicknames")] public NicknameModel[] Nicknames { get; init; } = Array.Empty();
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/PlayerBadges.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class PlayerBadges
5 | {
6 | [JsonPropertyName("badges")] public Badge[] Badges { get; init; } = Array.Empty();
7 | [JsonPropertyName("player_xp")] public uint PlayerXp { get; init; }
8 | [JsonPropertyName("player_level")] public ushort PlayerLevel { get; init; }
9 | [JsonPropertyName("player_xp_needed_to_level_up")] public uint PlayerXpNeededToLevelUp { get; init; }
10 | [JsonPropertyName("player_xp_needed_current_level")] public uint PlayerXpNeededCurrentLevel { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/PlayerOwnedGames.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class PlayerOwnedGames
5 | {
6 | [JsonPropertyName("game_count")] public ushort GameCount { get; init; }
7 | [JsonPropertyName("games")] public OwnedGame[] Games { get; init; } = Array.Empty();
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/PlayerQuests.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class PlayerQuests
5 | {
6 | [JsonPropertyName("quests")] public Quest[] Quests { get; init; } = Array.Empty();
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/PlayerSteamLevel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class PlayerSteamLevel
5 | {
6 | [JsonPropertyName("player_level")] public ushort PlayerLevel { get; set; }
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/ProfileCustomization.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class ProfileCustomization
5 | {
6 | ///
7 | /// Доступно если (include_inactive_customizations || include_purchased_customizations)
8 | ///
9 | [JsonPropertyName("customizations")] public Customization[] Customizations { get; init; } = Array.Empty();
10 | [JsonPropertyName("slots_available")] public ushort SlotsAvailable { get; init; }
11 | [JsonPropertyName("profile_theme")] public ProfileTheme ProfileTheme { get; init; } = new();
12 | [JsonPropertyName("purchased_customizations")] public PurchasedCustomization[] PurchasedCustomizations { get; init; } = Array.Empty();
13 | [JsonPropertyName("profile_preferences")] public ProfilePreferences ProfilePreferences { get; init; } = new();
14 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/ProfilePreferences.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class ProfilePreferences
5 | {
6 | [JsonPropertyName("hide_profile_awards")] public bool HideProfileAwards { get; init; } = false;
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/ProfileTheme.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class ProfileTheme
5 | {
6 | ///
7 | /// Example: DarkMode
8 | ///
9 | [JsonPropertyName("theme_id")] public string? ThemeId { get; init; }
10 | ///
11 | /// Example: #ProfileTheme_DarkMode
12 | ///
13 | [JsonPropertyName("title")] public string? Title { get; init; }
14 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/PurchasedCustomization.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class PurchasedCustomization
5 | {
6 | [JsonPropertyName("purchaseid")] public ulong PurchaseId { get; init; }
7 | [JsonPropertyName("customization_type")] public ushort CustomizationType { get; init; }
8 | [JsonPropertyName("level")] public ushort Level { get; init; }
9 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/IPlayerService/Quest.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IPlayerService;
4 | public class Quest
5 | {
6 | [JsonPropertyName("questid")] public ushort QuestId { get; init; }
7 | [JsonPropertyName("completed")] public bool Completed { get; init; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamApps/UpToDateModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamApps;
4 | public class UpToDateModel
5 | {
6 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
7 | [JsonPropertyName("up_to_date")] public bool UpToDate { get; init; } = false;
8 | [JsonPropertyName("version_is_listable")] public bool VersionIsListable { get; init; } = false;
9 | [JsonPropertyName("required_version")] public uint RequiredVersion { get; init; }
10 | [JsonPropertyName("message")] public string? Message { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamEconomy/AssetModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamEconomy;
4 | public class AssetModel
5 | {
6 | [JsonPropertyName("prices")]
7 | #if NET8_0_OR_GREATER
8 | [JsonObjectCreationHandling(JsonObjectCreationHandling.Populate)]
9 | public Dictionary Prices { get; } = new(44);
10 | #elif NET5_0_OR_GREATER
11 | public Dictionary Prices { get; init; } = new(1);
12 | #endif
13 |
14 | [JsonPropertyName("name")] public string Name { get; init; } = string.Empty;
15 | [JsonPropertyName("date")] public string Date { get; init; } = string.Empty;
16 | [JsonPropertyName("classid")] public string ClassId { get; init; } = string.Empty;
17 | [JsonPropertyName("class")] public ClassModel[] Class { get; init; } = Array.Empty();
18 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamEconomy/AssetPrices.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamEconomy;
4 | public class AssetPrices
5 | {
6 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
7 | [JsonPropertyName("assets")] public AssetModel[] Assets { get; init; } = Array.Empty();
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamEconomy/ClassModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamEconomy;
4 | public class ClassModel
5 | {
6 | [JsonPropertyName("name")] public string Name { get; init; } = string.Empty;
7 | [JsonPropertyName("value")] public string Value { get; init; } = string.Empty;
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/FriendsList.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class FriendsList
5 | {
6 | [JsonPropertyName("friends")] public T[] Friends { get; init; } = Array.Empty();
7 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/PlayerBan.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.API.Models.ISteamUser;
2 | public class PlayerBan
3 | {
4 | public ulong SteamId { get; init; }
5 | public bool CommunityBanned { get; init; }
6 | public bool VACBanned { get; init; }
7 | public int NumberOfVACBans { get; init; }
8 | public int DaysSinceLastBan { get; init; }
9 | public int NumberOfGameBans { get; init; }
10 | public string EconomyBan { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/PlayerBans.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class PlayerBans
5 | {
6 | [JsonPropertyName("players")] public List Players { get; init; } = new(2);
7 | [JsonPropertyName("success")] public bool Success { get; set; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/PlayerFriend.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class PlayerFriend
5 | {
6 | [JsonPropertyName("steamid")] public ulong SteamId { get; init; }
7 | ///
8 | /// friend
9 | /// requestrecipient
10 | /// ignored
11 | ///
12 | [JsonPropertyName("relationship")] public string Relationship { get; init; }
13 | [JsonPropertyName("friend_since")] public int FriendSince { get; init; }
14 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/PlayerSummary.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class PlayerSummary
5 | {
6 | [JsonPropertyName("steamid")] public ulong SteamId { get; init; }
7 | [JsonPropertyName("communityvisibilitystate")] public int CommunityVisibilityState { get; init; }
8 | [JsonPropertyName("profilestate")] public int ProfileState { get; init; }
9 | [JsonPropertyName("personaname")] public string PersonaName { get; init; } = string.Empty;
10 | [JsonPropertyName("commentpermission")] public int CommentPermission { get; init; }
11 | [JsonPropertyName("profileurl")] public string? ProfileUrl { get; init; }
12 | [JsonPropertyName("avatar")] public string? Avatar { get; init; }
13 | [JsonPropertyName("avatarmedium")] public string? AvatarMedium { get; init; }
14 | [JsonPropertyName("avatarfull")] public string? AvatarFull { get; init; }
15 | [JsonPropertyName("avatarhash")] public string? AvatarHash { get; init; }
16 | [JsonPropertyName("lastlogoff")] public int LastLogoff { get; init; }
17 | [JsonPropertyName("personastate")] public int PersonaState { get; init; }
18 | [JsonPropertyName("realname")] public string? RealName { get; init; }
19 | [JsonPropertyName("primaryclanid")] public string? PrimaryClanId { get; init; }
20 | [JsonPropertyName("timecreated")] public int TimeCreated { get; init; }
21 | [JsonPropertyName("personastateflags")] public int PersonaStateFlags { get; init; }
22 | [JsonPropertyName("loccountrycode")] public string? LocationCountryCode { get; init; }
23 | [JsonPropertyName("locstatecode")] public string? LocationStateCode { get; init; }
24 | [JsonPropertyName("loccityid")] public int LocationCityId { get; init; }
25 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/PlayersArrayData.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class PlayersArrayData
5 | {
6 | [JsonPropertyName("players")] public List Players { get; init; } = new(1);
7 | }
8 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/ResponseFriends.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class ResponseFriends
5 | {
6 | [JsonPropertyName("success")] public bool Success { get; set; } = false;
7 | [JsonPropertyName("friendslist")] public FriendsList FriendsList { get; init; } = new();
8 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUser/VanityUrl.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.ISteamUser;
4 | public class VanityUrl
5 | {
6 | [JsonIgnore] public bool Succesul => Response == 1;
7 | [JsonPropertyName("response")] public ushort Response { get; init; } = 0;
8 |
9 | ///
10 | /// Есть значение если b_response == false
11 | ///
12 | [JsonPropertyName("message")] public string? Message { get; init; }
13 |
14 | ///
15 | /// Есть значение если b_response == true
16 | ///
17 | [JsonPropertyName("steamid")] public ulong SteamId { get; init; }
18 | }
19 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUserOAuth/PlayerGroup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ISteamUserOAuth
8 | {
9 | public class PlayerGroup
10 | {
11 | public string steamid { get; set; }
12 | ///
13 | /// Member
14 | /// Blocked
15 | /// Invited
16 | ///
17 | public string relationship { get; set; }
18 | ///
19 | /// 4 - User
20 | /// 1 - ?Admin
21 | /// 128 - ?
22 | /// 140 - ?
23 | ///
24 | public string permission { get; set; }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUserOAuth/ResponseGroups.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ISteamUserOAuth
8 | {
9 | public class ResponseGroups
10 | {
11 | public bool success { get; set; } = false;
12 | public PlayerGroup[] groups { get; set; } = new PlayerGroup[0];
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ISteamUserOAuth/TokenDetail.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ISteamUserOAuth
8 | {
9 | public record TokenDetail
10 | {
11 | public int success { get; set; } = 0;
12 | public string reason { get; set; } = "error";
13 | public string steamid { get; set; } = "0";
14 | public string client_id { get; set; }
15 | public int expiration { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/API/Models/ITwoFactorService/QueryStatus.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.API.Models.ITwoFactorService
8 | {
9 | public class QueryStatus
10 | {
11 | public uint state { get; set; }
12 | public uint inactivation_reason { get; set; }
13 | public uint authenticator_type { get; set; }
14 | public bool authenticator_allowed { get; set; } = false;
15 | public uint steamguard_scheme { get; set; }
16 | public string token_gid { get; set; }
17 | public bool email_validated { get; set; } = false;
18 | public string device_identifier { get; set; }
19 | public int time_created { get; set; }
20 | public ushort revocation_attempts_remaining { get; set; }
21 | public string classified_agent { get; set; }
22 | public bool allow_external_authenticator { get; set; } = false;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/steam_web/API/Models/IUserAccountService/ClientWalletDetails.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models.IUserAccountService;
4 | public class ClientWalletDetails
5 | {
6 | [JsonPropertyName("has_wallet")] public bool HasWallet { get; init; } = false;
7 | [JsonPropertyName("user_country_code")] public string? UserCountryCode { get; init; }
8 | [JsonPropertyName("wallet_country_code")] public string? WalletCountryCode { get; init; }
9 | [JsonPropertyName("wallet_state")] public string WalletState { get; init; } = string.Empty;
10 | [JsonPropertyName("balance")] public uint Balance { get; init; }
11 | [JsonPropertyName("delayed_balance")] public uint DelayedBalance { get; init; }
12 | [JsonPropertyName("currency_code")] public byte CurrencyCode { get; init; }
13 | [JsonPropertyName("time_most_recent_txn")] public int TimeMostRecentTxn { get; init; }
14 | [JsonPropertyName("most_recent_txnid")] public string? MostRecentTxnId { get; init; }
15 | [JsonPropertyName("balance_in_usd")] public uint BalanceInUsd { get; init; }
16 | [JsonPropertyName("delayed_balance_in_usd")] public uint DelayedBalanceInUsd { get; init; }
17 | [JsonPropertyName("has_wallet_in_other_regions")] public bool HasWalletInOtherRegions { get; init; } = false;
18 | [JsonPropertyName("formatted_balance")] public string? FormattedBalance { get; init; }
19 | [JsonPropertyName("formatted_delayed_balance")] public string? FormattedDelayedBalance { get; init; }
20 | [JsonPropertyName("other_regions")] public byte[] OtherRegions { get; init; } = Array.Empty();
21 | }
--------------------------------------------------------------------------------
/steam_web/API/Models/ResponseData.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.API.Models;
4 | public class ResponseData
5 | {
6 | [JsonPropertyName("success")] public bool Success { get; internal set; } = false;
7 | ///
8 | /// default(T)
9 | ///
10 | [JsonPropertyName("response")] public T? Response { get; init; } = default;
11 | }
12 | public class ResultData
13 | {
14 | [JsonPropertyName("success")] public bool Success { get; internal set; } = false;
15 | ///
16 | /// default(T)
17 | ///
18 | [JsonPropertyName("result")] public T? Result { get; init; } = default;
19 | }
20 | public class ResponseData
21 | {
22 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
23 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CLoyaltyRewards_AddReaction_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using SteamWeb.API.Enums;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 | [ProtoContract]
6 | public class CLoyaltyRewards_AddReaction_Request
7 | {
8 | [ProtoMember(1)]
9 | public ELoyaltyReactionTargetType target_type { get; init; }
10 | [ProtoMember(2)]
11 | public ulong targetid { get; init; }
12 | [ProtoMember(3)]
13 | public int reactionid { get; init; }
14 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CLoyaltyRewards_GetReactionConfig_Response.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 | [ProtoContract]
6 | public class CLoyaltyRewards_GetReactionConfig_Response
7 | {
8 | [ProtoMember(3)]
9 | [JsonPropertyName("reactions")]
10 | public CLoyaltyRewards_GetReactionConfig_Response_ReactionConfig[]? Reactions { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CLoyaltyRewards_GetReactionConfig_Response_ReactionConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 | using SteamWeb.API.Enums;
4 |
5 | namespace SteamWeb.API.Protobufs;
6 | [ProtoContract]
7 | public class CLoyaltyRewards_GetReactionConfig_Response_ReactionConfig
8 | {
9 | ///
10 | /// Id реакции
11 | ///
12 | [ProtoMember(1)]
13 | [JsonPropertyName("reactionid")]
14 | public int ReactionId { get; init; }
15 |
16 | ///
17 | /// Стоимость, сколько нужно заплатить
18 | ///
19 | [ProtoMember(2)]
20 | [JsonPropertyName("points_cost")]
21 | public uint PointsCost { get; init; }
22 |
23 | ///
24 | /// Передадутся поинтов, кому ставят реакцию
25 | ///
26 | [ProtoMember(3)]
27 | [JsonPropertyName("points_transferred")]
28 | public uint PointsTransferred { get; init; }
29 |
30 | ///
31 | /// Где применима эта реакция
32 | ///
33 | [ProtoMember(4)]
34 | [JsonPropertyName("valid_target_types")]
35 | public ELoyaltyReactionTargetType[] ValidTargetTypes { get; init; } = Array.Empty();
36 |
37 | ///
38 | /// При каких случаях можно ставить реакцию если ==
39 | ///
40 | [ProtoMember(5)]
41 | [JsonPropertyName("valid_ugc_types")]
42 | public uint[] ValidUgcTypes { get; init; } = Array.Empty();
43 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CLoyaltyRewards_GetSummary_Request.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 | [ProtoContract]
6 | public class CLoyaltyRewards_GetSummary_Request
7 | {
8 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)]
9 | [JsonPropertyName("steamid")]
10 | public ulong SteamId { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CLoyaltyRewards_GetSummary_Response.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 | [ProtoContract]
6 | public class CLoyaltyRewards_GetSummary_Response
7 | {
8 | [ProtoMember(1)]
9 | [JsonPropertyName("summary")]
10 | public CLoyaltyRewards_GetSummary_Response_Summary Summary { get; init; } = new();
11 |
12 | [ProtoMember(2)]
13 | [JsonPropertyName("timestamp_updated")]
14 | public int TimestampUpdated { get; init; }
15 |
16 | [ProtoMember(3)]
17 | [JsonPropertyName("auditid_highwater")]
18 | public ulong AuditIdHighWater { get; init; }
19 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CLoyaltyRewards_GetSummary_Response_Summary.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 | [ProtoContract]
6 | public class CLoyaltyRewards_GetSummary_Response_Summary
7 | {
8 | ///
9 | /// Текущее кол поинтов
10 | ///
11 | [ProtoMember(1)]
12 | [JsonPropertyName("points")]
13 | public long Points { get; init; }
14 |
15 | ///
16 | /// Поинтов получено
17 | ///
18 | [ProtoMember(2)]
19 | [JsonPropertyName("points_earned")]
20 | public long PointsEarned { get; init; }
21 |
22 | ///
23 | /// Поинтов потрачено
24 | ///
25 | [ProtoMember(3)]
26 | [JsonPropertyName("points_spent")]
27 | public long PointsSpent { get; init; }
28 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CMobileAppService_GetMobileSummary_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 | [ProtoContract]
6 | public class CMobileAppService_GetMobileSummary_Request
7 | {
8 | ///
9 | /// GID of the mobile app's authenticator for this user
10 | ///
11 | /// Convert from HEX to ulong:
12 | ///
13 | /// var bytes = Convert.FromHexString(TokenGID);
14 | /// var token_gid = BitConverter.ToUInt64(bytes);
15 | ///
16 | ///
17 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)]
18 | [JsonPropertyName("authenticator_gid")]
19 | public ulong AuthenticatorGID { get; init; }
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CMobileAppService_GetMobileSummary_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CMobileAppService_GetMobileSummary_Response
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("stale_time_seconds")]
11 | public uint StaleTimeSeconds { get; init; }
12 |
13 | [ProtoMember(2)]
14 | [JsonPropertyName("is_authenticator_valid")]
15 | public bool IsAuthenticatorValid { get; init; } = false;
16 |
17 | [ProtoMember(3)]
18 | [JsonPropertyName("owned_games")]
19 | public uint OwnedGames { get; init; }
20 |
21 | [ProtoMember(4)]
22 | [JsonPropertyName("friend_count")]
23 | public uint FriendCount { get; init; }
24 |
25 | [ProtoMember(5)]
26 | [JsonPropertyName("wallet_balance")]
27 | public string? WalletBalance { get; init; }
28 |
29 | [ProtoMember(6)]
30 | [JsonPropertyName("language")]
31 | public string? Language { get; init; }
32 | }
33 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamAwards_GetNominationRecommendations_Request.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CSteamAwards_GetNominationRecommendations_Request
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("category_id")]
11 | public uint CategoryId { get; init; }
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamAwards_GetNominationRecommendations_Response.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CSteamAwards_GetNominationRecommendations_Response
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("played_app")]
11 | public CSteamAwards_PlayedApp[] PlayedApp { get; init; } = Array.Empty();
12 |
13 | [ProtoMember(3)]
14 | [JsonPropertyName("suggested_apps")]
15 | public CSteamAwards_SuggestedApp[] SuggestedApps { get; init; } = Array.Empty();
16 | }
17 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamAwards_Nominate_Request.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CSteamAwards_Nominate_Request
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("category_id")]
11 | public uint CategoryId { get; init; }
12 |
13 | [ProtoMember(2, IsRequired = false)]
14 | [JsonPropertyName("nominated_id")]
15 | public uint NominatedId { get; init; }
16 |
17 | [ProtoMember(4, IsRequired = false)]
18 | [JsonPropertyName("store_appid")]
19 | public uint StoreAppId { get; init; }
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamAwards_PlayedApp.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CSteamAwards_PlayedApp
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("appid")]
11 | public uint AppId { get; init; }
12 |
13 | [ProtoMember(2)]
14 | [JsonPropertyName("playtime")]
15 | public uint Playtime { get; init; }
16 | }
17 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamAwards_SuggestedApp.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CSteamAwards_SuggestedApp
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("appid")]
11 | public uint AppId { get; init; }
12 | }
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamNotification_GetSteamNotifications_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.API.Protobufs;
4 |
5 | [ProtoContract]
6 | public class CSteamNotification_GetSteamNotifications_Request
7 | {
8 | [ProtoMember(1)]
9 | public bool include_hidden { get; set; } = false;
10 | [ProtoMember(2)]
11 | public int language { get; set; } = 0;
12 | [ProtoMember(3)]
13 | public bool include_confirmation_count { get; set; } = true;
14 | [ProtoMember(4)]
15 | public bool include_pinned_counts { get; set; } = false;
16 | [ProtoMember(5)]
17 | public bool include_read { get; set; } = true;
18 | [ProtoMember(6)]
19 | public bool count_only { get; set; } = false;
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CSteamNotification_GetSteamNotifications_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.API.Protobufs;
4 |
5 | [ProtoContract]
6 | public class CSteamNotification_GetSteamNotifications_Response
7 | {
8 | [ProtoMember(1)]
9 | public SteamNotificationData? notifications { get; set; } = null;
10 | [ProtoMember(2)]
11 | public int confirmation_count { get; set; } = 0;
12 | [ProtoMember(3)]
13 | public uint pending_gift_count { get; set; }
14 | [ProtoMember(4)]
15 | public uint unnamed_field { get; set; }
16 | [ProtoMember(5)]
17 | public uint pending_friend_count { get; set; }
18 | [ProtoMember(6)]
19 | public uint unread_count { get; set; }
20 | [ProtoMember(7)]
21 | public uint pending_family_invite_count { get; set; }
22 | }
23 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CStore_GetDiscoveryQueue_Request.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 | using SteamWeb.API.Enums;
4 |
5 | namespace SteamWeb.API.Protobufs;
6 |
7 | [ProtoContract]
8 | public class CStore_GetDiscoveryQueue_Request
9 | {
10 | [ProtoMember(1, IsRequired = false)]
11 | [JsonPropertyName("queue_type")]
12 | public EStoreDiscoveryQueueType QueueType { get; init; } = EStoreDiscoveryQueueType.k_EStoreDiscoveryQueueTypeNew;
13 |
14 | [ProtoMember(2, IsRequired = false)]
15 | [JsonPropertyName("country_code")]
16 | public string CountryCode { get; init; } = string.Empty;
17 |
18 | [ProtoMember(3, IsRequired = false)]
19 | [JsonPropertyName("rebuild_queue")]
20 | public bool RebuildQueue { get; init; } = false;
21 |
22 | [ProtoMember(4, IsRequired = false)]
23 | [JsonPropertyName("settings_changed")]
24 | public bool SettingsChanged { get; init; } = false;
25 |
26 | [ProtoMember(5, IsRequired = false)]
27 | [JsonPropertyName("settings")]
28 | public CStoreDiscoveryQueueSettings? Settings { get; init; }
29 |
30 | [ProtoMember(6, IsRequired = false)]
31 | [JsonPropertyName("rebuild_queue_if_stale")]
32 | public bool RebuildQueueIfStale { get; init; } = false;
33 |
34 | [ProtoMember(8, IsRequired = false)]
35 | [JsonPropertyName("ignore_user_preferences")]
36 | public bool IgnoreUserPreferences { get; init; } = false;
37 |
38 | [ProtoMember(9, IsRequired = false)]
39 | [JsonPropertyName("no_experimental_results")]
40 | public bool NoExperimentalResults { get; init; } = false;
41 |
42 | [ProtoMember(10, IsRequired = false)]
43 | [JsonPropertyName("experimental_cohort")]
44 | public uint? ExperimentalCohort { get; init; }
45 |
46 | [ProtoMember(11, IsRequired = false)]
47 | [JsonPropertyName("debug_get_solr_query")]
48 | public bool DebugGetSolrQuery { get; init; } = false;
49 | }
50 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CStore_GetDiscoveryQueue_Response.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.API.Protobufs;
5 |
6 | [ProtoContract]
7 | public class CStore_GetDiscoveryQueue_Response
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("appids")]
11 | public uint[]? AppIds { get; init; }
12 |
13 | [ProtoMember(2)]
14 | [JsonPropertyName("country_code")]
15 | public string CountryCode { get; init; } = string.Empty;
16 |
17 | [ProtoMember(3)]
18 | [JsonPropertyName("settings")]
19 | public CStoreDiscoveryQueueSettings? Settings { get; init; }
20 |
21 | [ProtoMember(4)]
22 | [JsonPropertyName("skipped")]
23 | public uint Skipped { get; init; }
24 |
25 | [ProtoMember(5)]
26 | [JsonPropertyName("exhausted")]
27 | public bool Exhausted { get; init; } = false;
28 |
29 | [ProtoMember(6)]
30 | [JsonPropertyName("experimental_cohort")]
31 | public uint ExperimentalCohort { get; init; } = 0;
32 |
33 | [ProtoMember(7)]
34 | [JsonPropertyName("debug_solr_query")]
35 | public string? DebugSolrQuery { get; init; }
36 | }
37 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/CStore_SkipDiscoveryQueueItem_Request.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 | using SteamWeb.API.Enums;
4 |
5 | namespace SteamWeb.API.Protobufs;
6 |
7 | [ProtoContract]
8 | public class CStore_SkipDiscoveryQueueItem_Request
9 | {
10 | [ProtoMember(1)]
11 | [JsonPropertyName("queue_type")]
12 | public EStoreDiscoveryQueueType QueueType { get; init; } = EStoreDiscoveryQueueType.k_EStoreDiscoveryQueueTypeNew;
13 |
14 | [ProtoMember(2)]
15 | [JsonPropertyName("appid")]
16 | public uint AppId { get; init; }
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/API/Protobufs/SteamNotificationData.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.API.Protobufs;
4 |
5 | [ProtoContract]
6 | public class SteamNotificationData
7 | {
8 | [ProtoMember(1)]
9 | public ulong notification_id { get; set; }
10 | [ProtoMember(2)]
11 | public uint notification_targets { get; set; }
12 | ///
13 | /// enum
14 | ///
15 | [ProtoMember(3)]
16 | public int notification_type { get; set; }
17 | [ProtoMember(4)]
18 | public string body_data { get; set; } = string.Empty;
19 | [ProtoMember(7)]
20 | public bool read { get; set; } = false;
21 | [ProtoMember(8)]
22 | public int timestamp { get; set; }
23 | [ProtoMember(9)]
24 | public bool hidden { get; set; } = false;
25 | [ProtoMember(10)]
26 | public int expiry { get; set; }
27 | [ProtoMember(11)]
28 | public int viewed { get; set; }
29 | }
--------------------------------------------------------------------------------
/steam_web/Auth/Interfaces/ISessionProvider.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.Interfaces;
2 | public interface ISessionProvider
3 | {
4 | public string SessionID { get; set; }
5 | public ulong SteamID { get; set; }
6 | public string SteamLanguage { get; set; }
7 |
8 | public void AddCookieToContainer(System.Net.CookieContainer container, Uri url);
9 | public void RewriteCookie(System.Net.CookieContainer container);
10 | public void RewriteCookie(System.Net.CookieCollection collection);
11 |
12 | public string ToStringCookie();
13 | }
14 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/APIEndpoints.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1;
2 | public static class APIEndpoints
3 | {
4 | public const string STEAMAPI_BASE = "https://api.steampowered.com";
5 | public const string COMMUNITY_BASE = "https://steamcommunity.com";
6 | public const string MOBILEAUTH_BASE = STEAMAPI_BASE + "/IMobileAuthService/%s/v0001";
7 | public static string MOBILEAUTH_GETWGTOKEN = MOBILEAUTH_BASE.Replace("%s", "GetWGToken");
8 | public const string TWO_FACTOR_BASE = STEAMAPI_BASE + "/ITwoFactorService/%s/v0001";
9 | public static string TWO_FACTOR_TIME_QUERY = TWO_FACTOR_BASE.Replace("%s", "QueryTime");
10 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Enums/ConfirmationType.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1.Enums;
2 |
3 | public enum ConfirmationType : byte
4 | {
5 | Unknown,
6 | TradeOffer = 2,
7 | MarketSellTransaction = 3,
8 | ChangeNumber = 5,
9 | AccountRecovery = 6,
10 | RegisterApiKey = 9,
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Enums/FinalizeResult.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1.Enums;
2 |
3 | public enum FinalizeResult : byte
4 | {
5 | AuthenticatorNotAllowed,
6 | BadSMSCode,
7 | UnableToGenerateCorrectCodes,
8 | Success,
9 | GeneralFailure
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Enums/LinkResult.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1.Enums;
2 |
3 | public enum LinkResult : byte
4 | {
5 | MustProvidePhoneNumber, //No phone number on the account
6 | MustRemovePhoneNumber, //A phone number is already on the account
7 | MustConfirmEmail, //User need to click link from confirmation email
8 | AwaitingFinalization, //Must provide an SMS code
9 | GeneralFailure, //General failure (really now!)
10 | AuthenticatorPresent,
11 | AuthenticatorNotAllowed, // Not allowed to have authentificator
12 | TooManyRequests // Too many times sms code sended
13 | }
14 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Enums/LoginResult.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1.Enums;
2 |
3 | public enum LoginResult : byte
4 | {
5 | LoginOkay,
6 | GeneralFailure,
7 | BadRSA,
8 | BadCredentials,
9 | NeedCaptcha,
10 | Need2FA,
11 | NeedEmail,
12 | TooManyFailedLogins,
13 | SessionIDNotFound,
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Enums/RESPONSE_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1.Enums;
2 |
3 | public enum RESPONSE_STATUS : byte
4 | {
5 | Success,
6 | Error,
7 | WGTokenInvalid,
8 | WGTokenExpired,
9 | WrongPlatform
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Enums/SignInPlatform.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1.Enums;
2 | public enum SignInPlatform : byte
3 | {
4 | Desktop,
5 | Mobile
6 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v1/Models/TimeQuery.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1;
2 | internal class TimeQuery
3 | {
4 | public TimeQueryResponse response { get; init; } = new();
5 | }
6 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/SteamGuardAccount.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Auth.v1.Models;
3 |
4 | namespace SteamWeb.Auth.v1;
5 | public class SteamGuardAccount
6 | {
7 | [JsonPropertyName("shared_secret")] public string SharedSecret { get; init; }
8 | [JsonPropertyName("serial_number")] public string SerialNumber { get; init; }
9 | [JsonPropertyName("revocation_code")] public string RevocationCode { get; init; }
10 | [JsonPropertyName("uri")] public string URI { get; init; }
11 | [JsonPropertyName("server_time")] public int ServerTime { get; init; }
12 | [JsonPropertyName("account_name")] public string AccountName { get; init; }
13 | [JsonPropertyName("token_gid")] public string TokenGID { get; init; }
14 | [JsonPropertyName("identity_secret")] public string IdentitySecret { get; init; }
15 | [JsonPropertyName("secret_1")] public string Secret1 { get; init; }
16 | [JsonPropertyName("status")] public int Status { get; init; }
17 | [JsonPropertyName("device_id")] public string DeviceID { get; set; }
18 | ///
19 | /// Set to true if the authenticator has actually been applied to the account.
20 | ///
21 | [JsonPropertyName("fully_enrolled")] public bool FullyEnrolled { get; set; } = false;
22 | public SessionData? Session { get; set; }
23 | }
24 |
--------------------------------------------------------------------------------
/steam_web/Auth/v1/TimeQueryResponse.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v1;
2 | internal class TimeQueryResponse
3 | {
4 | public string server_time { get; init; } = "0";
5 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthGuardRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class AuthGuardRequest
7 | {
8 | [ProtoMember(1)] public ulong client_id { get; set; }
9 | [ProtoMember(2, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
10 | [ProtoMember(3)] public string code { get; set; }
11 | [ProtoMember(4)] public EAuthSessionGuardType code_type { get; set; } = EAuthSessionGuardType.DeviceCode;
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthGuardResponse.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 | [ProtoContract]
5 | class AuthGuardResponse { }
6 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthPollRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class AuthPollRequest
7 | {
8 | [ProtoMember(1)] public ulong client_id { get; set; }
9 | [ProtoMember(2)] public byte[] request_id { get; set; }
10 | //[ProtoMember(3)] public string token_to_revoke { get; set; } = null;
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthPollResponse.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class AuthPollResponse
7 | {
8 | [ProtoMember(1)] public string new_client_id { get; set; }
9 | [ProtoMember(2)] public string new_challenge_url { get; set; }
10 | [ProtoMember(3)] public string refresh_token { get; set; }
11 | ///
12 | /// steamLoginSecure={steamid64}%7C%7C{access_token}
13 | ///
14 | [ProtoMember(4)] public string access_token { get; set; }
15 | ///
16 | /// whether or not the auth session appears to have had remote interaction from a potential confirmer
17 | ///
18 | [ProtoMember(5)] public bool had_remote_interaction { get; set; } = false;
19 | [ProtoMember(6)] public string account_name { get; set; }
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthSessionConfirmation.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class AuthSessionConfirmation
7 | {
8 | [ProtoMember(1)] public EAuthSessionGuardType message { get; set; }
9 | [ProtoMember(2)] public string associated_message { get; set; }
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthSessionDesktopRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using SteamWeb.Auth.v2.Enums;
3 |
4 | namespace SteamWeb.Auth.v2.Models;
5 |
6 | [ProtoContract]
7 | class AuthSessionDesktopRequest
8 | {
9 | private string wesiteid = null!;
10 | [ProtoMember(2)] public string account_name { get; init; }
11 | [ProtoMember(3)] public string encrypted_password { get; init; }
12 | [ProtoMember(4)] public ulong encryption_timestamp { get; init; }
13 | [ProtoMember(5)] public bool remember_login { get; init; } = true;
14 | [ProtoMember(7)] public ESessionPersistence persistence { get; init; } = ESessionPersistence.Persistent;
15 | ///
16 | /// Доступные для использования id:
17 | ///
18 | /// Client = Steam Desktop Client
19 | ///
20 | /// Mobile = Steam Mobile App
21 | ///
22 | /// Community = steamcommunity.com
23 | ///
24 | /// Store = store.steampowered.com
25 | ///
26 | /// Help = help.steampowered.com
27 | ///
28 | [ProtoMember(8)]
29 | public string website_id
30 | {
31 | get
32 | {
33 | if (wesiteid != null)
34 | return wesiteid;
35 | switch (device_details.platform_type)
36 | {
37 | case EAuthTokenPlatformType.SteamClient:
38 | return wesiteid = "Client";
39 | case EAuthTokenPlatformType.MobileApp:
40 | return wesiteid = "Mobile";
41 | default:
42 | return wesiteid = "Community";
43 | }
44 | }
45 | set => wesiteid = value;
46 | }
47 | [ProtoMember(9)] public CAuthentication_DeviceDetails_Desktop device_details { get; init; } = new();
48 | }
49 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthSessionMobileRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using SteamWeb.Auth.v2.Enums;
3 |
4 | namespace SteamWeb.Auth.v2.Models;
5 |
6 | [ProtoContract]
7 | class AuthSessionMobileRequest
8 | {
9 | private string? wesiteid = null;
10 |
11 | [ProtoMember(2)] public string account_name { get; init; }
12 | [ProtoMember(3)] public string encrypted_password { get; init; }
13 | [ProtoMember(4)] public ulong encryption_timestamp { get; init; }
14 | [ProtoMember(5)] public bool remember_login { get; init; } = true;
15 | [ProtoMember(7)] public ESessionPersistence persistence { get; init; } = ESessionPersistence.Persistent;
16 | ///
17 | /// Доступные для использования id:
18 | ///
19 | /// Client = Steam Desktop Client
20 | ///
21 | /// Mobile = Steam Mobile App
22 | ///
23 | /// Community = steamcommunity.com
24 | ///
25 | /// Store = store.steampowered.com
26 | ///
27 | /// Help = help.steampowered.com
28 | ///
29 | [ProtoMember(8)] public string website_id
30 | {
31 | get
32 | {
33 | if (wesiteid != null)
34 | return wesiteid;
35 | switch (device_details.platform_type)
36 | {
37 | case EAuthTokenPlatformType.SteamClient:
38 | return wesiteid = "Client";
39 | case EAuthTokenPlatformType.MobileApp:
40 | return wesiteid = "Mobile";
41 | default:
42 | return wesiteid = "Community";
43 | }
44 | }
45 | set => wesiteid = value;
46 | }
47 | [ProtoMember(9)] public CAuthentication_DeviceDetails_Mobile device_details { get; init; } = new();
48 | [ProtoMember(11)] public int language { get; init; } = 0;
49 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/AuthSessionResponse.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class AuthSessionResponse
7 | {
8 | [ProtoMember(1)] public ulong client_id { get; set; }
9 | [ProtoMember(2)] public byte[] request_id { get; set; }
10 | [ProtoMember(3, DataFormat = DataFormat.FixedSize)] public uint interval { get; set; }
11 | [ProtoMember(4)] public AuthSessionConfirmation[] allowed_confirmations { get; set; } = new AuthSessionConfirmation[0];
12 | [ProtoMember(5, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
13 | [ProtoMember(6)] public string? weak_token { get; set; }
14 | ///
15 | /// if login has been confirmed, may contain remembered machine ID for future login
16 | ///
17 | [ProtoMember(7)] public string new_guard_data { get; set; }
18 | }
19 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CAuthentication_DeviceDetails_Desktop.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using SteamWeb.Auth.v2.Enums;
3 |
4 | namespace SteamWeb.Auth.v2.Models;
5 |
6 | [ProtoContract]
7 | class CAuthentication_DeviceDetails_Desktop
8 | {
9 | ///
10 | /// device_friendly_name
11 | ///
12 | [ProtoMember(1)] public string device_friendly_name { get; init; } = "device_friendly_name";
13 | [ProtoMember(2)] public EAuthTokenPlatformType platform_type { get; init; } = EAuthTokenPlatformType.WebBrowser;
14 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CAuthentication_DeviceDetails_Mobile.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using SteamWeb.Auth.v2.Enums;
3 |
4 | namespace SteamWeb.Auth.v2.Models;
5 |
6 | [ProtoContract]
7 | class CAuthentication_DeviceDetails_Mobile
8 | {
9 | ///
10 | /// device_friendly_name
11 | ///
12 | [ProtoMember(1)] public string device_friendly_name { get; init; } = "F8331";
13 | [ProtoMember(2)] public EAuthTokenPlatformType platform_type { get; init; } = EAuthTokenPlatformType.MobileApp;
14 | [ProtoMember(3)] public ulong os_type { get; init; } = 18446744073709551116;
15 | [ProtoMember(4)] public uint gaming_device_type { get; init; } = 528;
16 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CAuthentication_GetAuthSessionInfo_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CAuthentication_GetAuthSessionInfo_Request
7 | {
8 | [ProtoMember(1)] public ulong client_id { get; set; }
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CAuthentication_GetAuthSessionInfo_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CAuthentication_GetAuthSessionInfo_Response
7 | {
8 | [ProtoMember(1)] public string ip { get; set; }
9 | [ProtoMember(2)] public string geoloc { get; set; }
10 | [ProtoMember(3)] public string city { get; set; }
11 | [ProtoMember(4)] public string state { get; set; }
12 | [ProtoMember(5)] public string country { get; set; }
13 | ///
14 | /// platform type of requestor
15 | ///
16 | [ProtoMember(6)] public Enums.EAuthTokenPlatformType platform_type { get; set; }
17 | ///
18 | /// name of requestor device
19 | ///
20 | [ProtoMember(7)] public string device_friendly_name { get; set; }
21 | [ProtoMember(8)] public int version { get; set; }
22 | ///
23 | /// whether the ip has previuously been used on the account successfully
24 | ///
25 | [ProtoMember(9)] public EAuthSessionSecurityHistory login_history { get; set; }
26 | ///
27 | /// whether the requestor location matches this requests location
28 | ///
29 | [ProtoMember(10)] public bool requestor_location_mismatch { get; set; }
30 | ///
31 | /// whether this login has seen high usage recently
32 | ///
33 | [ProtoMember(11)] public bool high_usage_login { get; set; }
34 | [ProtoMember(12)] public ESessionPersistence requested_persistence { get; set; }
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CAuthentication_GetAuthSessionsForAccount_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CAuthentication_GetAuthSessionsForAccount_Response
7 | {
8 | [ProtoMember(1)] public ulong[] client_ids { get; set; } = new ulong[0];
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CAuthentication_UpdateAuthSessionWithMobileConfirmation_Request
7 | {
8 | [ProtoMember(1)]
9 | public short version { get; set; }
10 | [ProtoMember(2)]
11 | public ulong client_id { get; set; }
12 | [ProtoMember(3, DataFormat = DataFormat.FixedSize)]
13 | public ulong steamid { get; set; }
14 | [ProtoMember(4)]
15 | public byte[] signature { get; set; }
16 | [ProtoMember(5)]
17 | public bool confirm { get; set; }
18 | [ProtoMember(6)]
19 | public ESessionPersistence persistence { get; set; }
20 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_IsAccountWaitingForEmailConfirmation_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_IsAccountWaitingForEmailConfirmation_Response
7 | {
8 | ///
9 | /// Ожидать ли подтверждения почты?
10 | ///
11 | [ProtoMember(1)] public bool awaiting_email_confirmation { get; set; }
12 | ///
13 | /// Через сколько делать следующий запрос в сек
14 | ///
15 | [ProtoMember(2)] public int seconds_to_wait { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_SendPhoneVerificationCode_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_SendPhoneVerificationCode_Request
7 | {
8 | [ProtoMember(1)] public int language { get; set; } = 0;
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_SendPhoneVerificationCode_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_SendPhoneVerificationCode_Response { }
7 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_SetAccountPhoneNumber_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_SetAccountPhoneNumber_Request
7 | {
8 | ///
9 | /// example: +7 9773130028
10 | ///
11 | [ProtoMember(1)] public string phone_number { get; set; }
12 | ///
13 | /// example: RU
14 | ///
15 | [ProtoMember(2)] public string phone_country_code { get; set; }
16 | }
17 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_SetAccountPhoneNumber_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_SetAccountPhoneNumber_Response
7 | {
8 | [ProtoMember(1)] public string confirmation_email_address { get; set; }
9 | [ProtoMember(2)] public string phone_number_formatted { get; set; }
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_VerifyAccountPhoneWithCode_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_VerifyAccountPhoneWithCode_Request
7 | {
8 | [ProtoMember(1)] public string code { get; set; }
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CPhone_VerifyAccountPhoneWithCode_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CPhone_VerifyAccountPhoneWithCode_Response { }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CRemoveAuthenticatorViaChallengeContinue_Replacement_Token.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CRemoveAuthenticatorViaChallengeContinue_Replacement_Token
7 | {
8 | [ProtoMember(1)]
9 | public byte[] shared_secret { get; set; }
10 |
11 | [ProtoMember(2, DataFormat = DataFormat.FixedSize)]
12 | public ulong serial_number { get; set; }
13 |
14 | [ProtoMember(3)]
15 | public string revocation_code { get; set; }
16 |
17 | [ProtoMember(4)]
18 | public string uri { get; set; }
19 |
20 | [ProtoMember(5)]
21 | public int server_time { get; set; }
22 |
23 | [ProtoMember(6)]
24 | public string account_name { get; set; }
25 |
26 | [ProtoMember(7)]
27 | public string token_gid { get; set; }
28 |
29 | [ProtoMember(8)]
30 | public byte[] identity_secret { get; set; }
31 |
32 | [ProtoMember(9)]
33 | public byte[] secret_1 { get; set; }
34 |
35 | [ProtoMember(10)]
36 | public int status { get; set; }
37 |
38 | [ProtoMember(11)]
39 | public uint steamguard_scheme { get; set; }
40 |
41 | [ProtoMember(12, DataFormat = DataFormat.FixedSize)]
42 | public ulong steamid { get; set; }
43 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_AddAuthenticator_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CTwoFactor_AddAuthenticator_Request_Mobile
7 | {
8 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
9 | [ProtoMember(4)] public uint authenticator_type { get; set; } = 1;
10 | ///
11 | /// DeviceID, example: android:c4397b5c-d49a-4987-80dc-70e8129c61d0
12 | ///
13 | [ProtoMember(5)] public string device_identifier { get; set; }
14 | [ProtoMember(6)] public string sms_phone_id { get; set; } = "1";
15 | ///
16 | /// What the version of our token should be
17 | ///
18 | [ProtoMember(8)] public uint version { get; set; } = 2;
19 | }
20 |
21 | [ProtoContract]
22 | class CTwoFactor_AddAuthenticator_Request_Email
23 | {
24 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
25 | [ProtoMember(4)] public uint authenticator_type { get; set; } = 1;
26 | ///
27 | /// DeviceID, example: android:c4397b5c-d49a-4987-80dc-70e8129c61d0
28 | ///
29 | [ProtoMember(5)] public string device_identifier { get; set; }
30 | ///
31 | /// What the version of our token should be
32 | ///
33 | [ProtoMember(8)] public uint version { get; set; } = 2;
34 | }
35 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_FinalizeAddAuthenticator_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CTwoFactor_FinalizeAddAuthenticator_Request
7 | {
8 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
9 | ///
10 | /// 2FA code
11 | ///
12 | [ProtoMember(2)] public string? authenticator_code { get; set; }
13 | ///
14 | /// Текущее время клиента
15 | ///
16 | [ProtoMember(3)] public int authenticator_time { get; set; }
17 | ///
18 | /// Activation code from out-of-band message
19 | ///
20 | [ProtoMember(4)] public string? activation_code { get; set; }
21 | ///
22 | /// When finalizing with an SMS code, pass the request on to the PhoneService to update its state too.
23 | ///
24 | [ProtoMember(6)] public bool validate_sms_code { get; set; } = true;
25 | }
26 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_FinalizeAddAuthenticator_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CTwoFactor_FinalizeAddAuthenticator_Response
7 | {
8 | ///
9 | /// True if succeeded, or want more tries
10 | ///
11 | [ProtoMember(1)] public bool success { get; set; } = false;
12 | ///
13 | /// Current server time
14 | ///
15 | [ProtoMember(3)] public int server_time { get; set; }
16 | ///
17 | /// Result code. 2 - это success=true
18 | ///
19 | [ProtoMember(4)] public int status { get; set; }
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Request
7 | {
8 | ///
9 | /// Code from SMS
10 | ///
11 | [ProtoMember(1)]
12 | public string SmsCode { get; set; }
13 | ///
14 | /// Generate new token (instead of removing old one)
15 | ///
16 | [ProtoMember(2)]
17 | public bool generate_new_token { get; set; }
18 | ///
19 | /// What the version of our token should be
20 | ///
21 | [ProtoMember(3)]
22 | public uint version { get; set; }
23 | }
24 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CTwoFactor_RemoveAuthenticatorViaChallengeContinue_Response
7 | {
8 | [ProtoMember(1)]
9 | public bool Success { get; set; } = false;
10 | [ProtoMember(2)]
11 | public CRemoveAuthenticatorViaChallengeContinue_Replacement_Token? replacement_token { get; set; }
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_RemoveAuthenticatorViaChallengeStart_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CTwoFactor_RemoveAuthenticatorViaChallengeStart_Response
7 | {
8 | [ProtoMember(1)]
9 | public bool Success { get; set; } = false;
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_RemoveAuthenticator_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | class CTwoFactor_RemoveAuthenticator_Request
7 | {
8 | [ProtoMember(2)]
9 | public string revocation_code { get; set; }
10 | ///
11 | /// Reason the authenticator is being removed
12 | ///
13 | [ProtoMember(5)]
14 | public int revocation_reason { get; set; }
15 | ///
16 | /// Type of Steam Guard to use once token is removed
17 | ///
18 | [ProtoMember(6)]
19 | public int steamguard_scheme { get; set; }
20 | ///
21 | /// Remove all steamguard cookies
22 | ///
23 | [ProtoMember(7)]
24 | public bool remove_all_steamguard_cookies { get; set; } = true;
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_RemoveAuthenticator_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class CTwoFactor_RemoveAuthenticator_Response
7 | {
8 | [ProtoMember(1)] public bool success { get; set; } = false;
9 | ///
10 | /// Reason the authenticator is being removed
11 | ///
12 | //[ProtoMember(3)] public long server_time { get; set; }
13 | ///
14 | /// Type of Steam Guard to use once token is removed
15 | ///
16 | [ProtoMember(5)] public int revocation_attempts_remaining { get; set; } = -1;
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CTwoFactor_Status_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class CTwoFactor_Status_Request
7 | {
8 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CUserAccount_GetClientWalletDetails_Request.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | public class CUserAccount_GetClientWalletDetails_Request
7 | {
8 | [ProtoMember(1)] public bool include_balance_in_usd { get; set; } = true;
9 | ///
10 | /// 2?
11 | ///
12 | [ProtoMember(2)] public int wallet_region { get; set; } = 1;
13 | [ProtoMember(3)] public bool include_formatted_balance { get; set; } = true;
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/CUserAccount_GetWalletDetails_Response.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | public class CUserAccount_GetWalletDetails_Response
7 | {
8 | [ProtoMember(1)] public bool has_wallet { get; set; } = false;
9 | [ProtoMember(2)] public string user_country_code { get; set; }
10 | [ProtoMember(3)] public string wallet_country_code { get; set; }
11 | [ProtoMember(4)] public string wallet_state { get; set; }
12 | [ProtoMember(5)] public long balance { get; set; }
13 | [ProtoMember(6)] public long delayed_balance { get; set; }
14 | ///
15 | /// Текущий index валюты аккаунта
16 | ///
17 | [ProtoMember(7)] public int currency_code { get; set; }
18 | [ProtoMember(8)] public uint time_most_recent_txn { get; set; }
19 | [ProtoMember(9)] public ulong most_recent_txnid { get; set; }
20 | [ProtoMember(10)] public long balance_in_usd { get; set; }
21 | [ProtoMember(11)] public long delayed_balance_in_usd { get; set; }
22 | [ProtoMember(12)] public bool has_wallet_in_other_regions { get; set; } = false;
23 | [ProtoMember(13)] public int other_regions { get; set; }
24 | [ProtoMember(14)] public string formatted_balance { get; set; }
25 | }
26 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/MigrateSessionRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class MigrateSessionRequest
7 | {
8 | ///
9 | /// WebToken
10 | ///
11 | [ProtoMember(1)] public string token { get; set; }
12 | [ProtoMember(2, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
13 | [ProtoMember(3)] public string signature { get; set; }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/MobileSummeryRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class MobileSummeryRequest
7 | {
8 | [ProtoMember(1, DataFormat = DataFormat.FixedSize)] public ulong data { get; set; }
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/PasswordRSA.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | [ProtoContract]
6 | class PasswordRSARequest
7 | {
8 | [ProtoMember(1)] public string account_name { get; set; }
9 | }
10 |
11 | [ProtoContract]
12 | class PasswordRSAResponse
13 | {
14 | [ProtoMember(1)] public string publickey_mod { get; set; }
15 | [ProtoMember(2)] public string publickey_exp { get; set; }
16 | [ProtoMember(3)] public ulong timestamp { get; set; }
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/UpdateTokenRequest.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 | using SteamWeb.Auth.v2.Enums;
3 |
4 | namespace SteamWeb.Auth.v2.DTO;
5 |
6 | [ProtoContract]
7 | class UpdateTokenRequest
8 | {
9 | [ProtoMember(1)] public string refresh_token { get; set; }
10 | [ProtoMember(2, DataFormat = DataFormat.FixedSize)] public ulong steamid { get; set; }
11 | [ProtoMember(3)] public ETokenRenewalType renewal_type { get; set; } = ETokenRenewalType.k_ETokenRenewalType_Allow;
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/DTO/UpdateTokenResponse.cs:
--------------------------------------------------------------------------------
1 | using ProtoBuf;
2 |
3 | namespace SteamWeb.Auth.v2.DTO;
4 |
5 | [ProtoContract]
6 | public class UpdateTokenResponse
7 | {
8 | [ProtoMember(1)] public string access_token { get; set; }
9 | [ProtoMember(2)] public string refresh_token { get; set; }
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/ACCEPT_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Enums;
2 |
3 | public enum ACCEPT_STATUS : byte
4 | {
5 | Error,
6 | BadSession,
7 | NeedAuth,
8 | Success,
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/ADD_THROUGH.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Enums;
2 |
3 | public enum ADD_THROUGH : byte
4 | {
5 | PhoneNumber,
6 | EmailCode
7 | }
8 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/EAuthSessionGuardType.cs:
--------------------------------------------------------------------------------
1 | public enum EAuthSessionGuardType
2 | {
3 | Unknown = 0,
4 | ///
5 | /// Код не требуется
6 | ///
7 | None = 1,
8 | ///
9 | /// Guard с письма на почту
10 | ///
11 | EmailCode = 2,
12 | ///
13 | /// 2FA с мобильного приложения
14 | ///
15 | DeviceCode = 3,
16 | DeviceConfirmation = 4,
17 | EmailConfirmation = 5,
18 | MachineToken = 6,
19 | LegacyMachineAuth = 7
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/EAuthSessionSecurityHistory.cs:
--------------------------------------------------------------------------------
1 | public enum EAuthSessionSecurityHistory
2 | {
3 | Invalid = 0,
4 | UsedPreviously = 1,
5 | NoPriorHistory = 2
6 | }
7 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/EAuthTokenPlatformType.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Enums;
2 | public enum EAuthTokenPlatformType
3 | {
4 | Unknown = 0,
5 | SteamClient = 1,
6 | WebBrowser = 2,
7 | MobileApp = 3
8 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/EAuthTokenState.cs:
--------------------------------------------------------------------------------
1 | enum EAuthTokenState
2 | {
3 | Invalid = 0,
4 | New = 1,
5 | Confirmed = 2,
6 | Issued = 3,
7 | Denied = 4,
8 | LoggedOut = 5,
9 | Consumed = 6,
10 | Revoked = 99
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/EBanContentCheckResult.cs:
--------------------------------------------------------------------------------
1 | enum EBanContentCheckResult
2 | {
3 | NotScanned = 0,
4 | Reset = 1,
5 | NeedsChecking = 2,
6 | VeryUnlikely = 5,
7 | Unlikely = 30,
8 | Possible = 50,
9 | Likely = 75,
10 | VeryLikely = 100
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/EProtoClanEventType.cs:
--------------------------------------------------------------------------------
1 | enum EProtoClanEventType
2 | {
3 | k_EClanOtherEvent = 1,
4 | k_EClanGameEvent = 2,
5 | k_EClanPartyEvent = 3,
6 | k_EClanMeetingEvent = 4,
7 | k_EClanSpecialCauseEvent = 5,
8 | k_EClanMusicAndArtsEvent = 6,
9 | k_EClanSportsEvent = 7,
10 | k_EClanTripEvent = 8,
11 | k_EClanChatEvent = 9,
12 | k_EClanGameReleaseEvent = 10,
13 | k_EClanBroadcastEvent = 11,
14 | k_EClanSmallUpdateEvent = 12,
15 | k_EClanPreAnnounceMajorUpdateEvent = 13,
16 | k_EClanMajorUpdateEvent = 14,
17 | k_EClanDLCReleaseEvent = 15,
18 | k_EClanFutureReleaseEvent = 16,
19 | k_EClanESportTournamentStreamEvent = 17,
20 | k_EClanDevStreamEvent = 18,
21 | k_EClanFamousStreamEvent = 19,
22 | k_EClanGameSalesEvent = 20,
23 | k_EClanGameItemSalesEvent = 21,
24 | k_EClanInGameBonusXPEvent = 22,
25 | k_EClanInGameLootEvent = 23,
26 | k_EClanInGamePerksEvent = 24,
27 | k_EClanInGameChallengeEvent = 25,
28 | k_EClanInGameContestEvent = 26,
29 | k_EClanIRLEvent = 27,
30 | k_EClanNewsEvent = 28,
31 | k_EClanBetaReleaseEvent = 29,
32 | k_EClanInGameContentReleaseEvent = 30,
33 | k_EClanFreeTrial = 31,
34 | k_EClanSeasonRelease = 32,
35 | k_EClanSeasonUpdate = 33,
36 | k_EClanCrosspostEvent = 34,
37 | k_EClanInGameEventGeneral = 35
38 | }
39 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/ESessionPersistence.cs:
--------------------------------------------------------------------------------
1 | public enum ESessionPersistence
2 | {
3 | Invalid = -1,
4 | Ephemeral = 0,
5 | Persistent = 1
6 | }
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/ETokenRenewalType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.Auth.v2.Enums;
8 | public enum ETokenRenewalType
9 | {
10 | k_ETokenRenewalType_None = 0,
11 | k_ETokenRenewalType_Allow = 1
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/LoginResult.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Enums;
2 | public enum LoginResult : byte
3 | {
4 | LoginOkay,
5 | GeneralFailure,
6 | BadRSA,
7 | BadCredentials,
8 | BadCookie,
9 | NeedAprove,
10 | RateExceeded,
11 | //NeedCaptcha,
12 | ProxyError,
13 | Timeout,
14 | ConnectionError
15 | }
16 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/NEXT_STEP.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Enums;
2 |
3 | public enum NEXT_STEP : byte { Begin, Update, Poll }
4 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Enums/SENDVERIFCODE.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Enums;
2 |
3 | enum SENDVERIFCODE
4 | {
5 | Yes,
6 | No,
7 | BadSession,
8 | Error,
9 | TooManyRequests,
10 | InvalidState
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/AuthSessionForAccount.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Models;
2 |
3 | public class AuthSessionForAccount
4 | {
5 | public string[] client_ids { get; init; } = new string[0];
6 | }
7 |
8 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/Confirmation.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Auth.v1.Enums;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | public class Confirmation
6 | {
7 | public int creation_time { get; init; }
8 | public ConfirmationType type { get; init; }
9 | public string type_name { get; init; }
10 | public string id { get; init; }
11 | public ulong creator_id { get; init; }
12 | public string nonce { get; init; }
13 | public bool multi { get; init; } = false;
14 | public string headline { get; init; }
15 | public string[] summary { get; init; } = new string[0];
16 | public string[] warn { get; init; } = new string[0];
17 | }
18 |
19 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/ConfirmationDetailsResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | internal class ConfirmationDetailsResponse
6 | {
7 | [JsonPropertyName("success")]
8 | public bool Success { get; init; } = false;
9 |
10 | [JsonPropertyName("html")]
11 | public string HTML { get; init; }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/ConfirmationsResponse.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Auth.v2.Models;
2 |
3 | public class ConfirmationsResponse
4 | {
5 | public bool success { get; init; } = false;
6 | public bool needauth { get; init; } = false;
7 | public string message { get; init; }
8 | public string detail { get; init; }
9 | public Confirmation[] conf { get; init; } = new Confirmation[0];
10 |
11 | public Confirmation this[int index]
12 | {
13 | get => conf[index];
14 | set => conf[index] = value;
15 | }
16 | }
17 |
18 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/RefreshSessionDataResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | internal class RefreshSessionDataResponse
6 | {
7 | [JsonPropertyName("response")] public RefreshSessionDataInternalResponse Response { get; init; } = new();
8 |
9 | internal class RefreshSessionDataInternalResponse
10 | {
11 | [JsonPropertyName("token")] public string Token { get; init; }
12 | [JsonPropertyName("token_secure")] public string TokenSecure { get; init; }
13 | }
14 | }
15 |
16 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/RemoveAuthenticatorResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | internal class RemoveAuthenticatorResponse
6 | {
7 | [JsonPropertyName("response")] public RemoveAuthenticatorInternalResponse Response { get; init; } = new();
8 |
9 | internal class RemoveAuthenticatorInternalResponse
10 | {
11 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/steam_web/Auth/v2/Models/SendConfirmationResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Auth.v2.Models;
4 |
5 | internal class SendConfirmationResponse
6 | {
7 | [JsonPropertyName("success")]
8 | public bool Success { get; init; } = false;
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/ACCEPT_PROVIDER_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum ACCEPT_PROVIDER_STATUS : byte
4 | {
5 | ///
6 | /// Ожидание принятия решения
7 | ///
8 | NoAction,
9 | ///
10 | /// Ожидание подверждения через этот провайдер
11 | ///
12 | Waiting,
13 | ///
14 | /// Выполнено подтверждение через этот провайдер
15 | ///
16 | Accepted,
17 | ///
18 | /// Отклонено подтверждение через этот провайдер
19 | ///
20 | Declined,
21 | }
22 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/CHANGE_EMAIL_STEP.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum CHANGE_EMAIL_STEP : byte
4 | {
5 | ///
6 | /// Запрос на изменение пароля выполнен, но не был выполнен переход по хешу
7 | ///
8 | Ok,
9 | ///
10 | /// Пароль изменён на аккаунте
11 | ///
12 | Done,
13 | ///
14 | /// Код на новую почту не отправлен
15 | ///
16 | EmailCodeNotSend,
17 | ///
18 | /// Запрос на получение RSA не выполнен
19 | ///
20 | ErrorRequest,
21 | ///
22 | /// Не верная последовательность шагов
23 | ///
24 | WrongStep,
25 | }
--------------------------------------------------------------------------------
/steam_web/Help/Enums/CHANGE_PASSWORD_STEP.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum CHANGE_PASSWORD_STEP : byte
4 | {
5 | ///
6 | /// Запрос на изменение пароля выполнен, но не был выполнен переход по хешу
7 | ///
8 | Ok,
9 | ///
10 | /// Пароль изменён на аккаунте
11 | ///
12 | Done,
13 | ///
14 | /// Не правильный пароль, возможно, его длина менее 7-и символов, либо он помечен как скомпрометированный
15 | ///
16 | BadPassword,
17 | ///
18 | /// Запрос на изменение пароля не выполнен
19 | ///
20 | PasswordNotChanged,
21 | ///
22 | /// Запрос на получение RSA не выполнен
23 | ///
24 | ErrorRSA,
25 | ///
26 | /// Не верная последовательность шагов
27 | ///
28 | WrongStep,
29 | }
30 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/CHANGE_STEP.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum CHANGE_STEP : byte
4 | {
5 | ///
6 | /// Ожидание выполнения шагов
7 | ///
8 | Waiting = 0,
9 | ///
10 | /// Шаг загрузки необходимых данные для выполнения последующих действий
11 | ///
12 | Step1 = 1,
13 | ///
14 | /// Шаг подтверждения владения аккаунтом
15 | ///
16 | Step2 = 2,
17 | ///
18 | /// Смена данных
19 | ///
20 | Step3 = 3,
21 | ///
22 | ///
23 | ///
24 | Step4 = 4,
25 | ///
26 | /// Этот провайдер смены данных выполнил свою работу
27 | ///
28 | Done,
29 | }
30 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/OWNER_STEP_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum OWNER_STEP_STATUS : byte
4 | {
5 | ///
6 | /// Шаг выполнен
7 | ///
8 | Done,
9 | ///
10 | /// Нужно подтвердить владение аккаунтов
11 | ///
12 | NeedTakeAction,
13 | ///
14 | /// Неожиданная структура html
15 | ///
16 | ErrorHtml,
17 | ///
18 | /// Не выполнен запрос
19 | ///
20 | ErrorRequest,
21 | ///
22 | /// Загружена неизвестная страница
23 | ///
24 | ErrorUnknownPage,
25 | ///
26 | /// Дошли до страницы снятия гуарда/Нужно подтвердить владение аккаунтом другим способом
27 | ///
28 | PageRemoveSteamGuard,
29 | ///
30 | /// Этот шаг сейчас не может быть выполнен
31 | ///
32 | WrongStep,
33 | ///
34 | /// Нужно подтвердить владение аккаунтов через Last4CardNumber или через отправку запроса на восстановление аккаунта. Для обхода можно попробовать привязать MobileGuard.
35 | ///
36 | FixIssue,
37 | }
38 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/POLL_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum POLL_STATUS : byte
4 | {
5 | ///
6 | /// Ошибка при выполнении запроса
7 | ///
8 | Error,
9 | ///
10 | /// Нужно дальше посылать запрос Poll
11 | ///
12 | Continue,
13 | ///
14 | /// Подтверждение выполнено
15 | ///
16 | Success,
17 | ///
18 | /// Нужно начать процедуру смены данных заново
19 | ///
20 | Expired,
21 | ///
22 | /// Недоступно для этого провайдера
23 | ///
24 | NotAvailable,
25 | }
26 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/PROVIDER_LIST.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum PROVIDER_LIST : byte
4 | {
5 | SteamMobileApp,
6 | Phone,
7 | Email,
8 | Login,
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/STEP_ACCEPT_PROVIDER.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum STEP_ACCEPT_PROVIDER : byte
4 | {
5 | ///
6 | /// Ожидается или
7 | ///
8 | WaitingAcceptOrDecline,
9 | ///
10 | /// Можно выполнить , либо вызвать
11 | ///
12 | Poll,
13 | ///
14 | /// Ожидается вызов
15 | ///
16 | Verify,
17 | ///
18 | /// Этот провайдер закончил работу
19 | ///
20 | Finished,
21 | }
22 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/STEP_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum STEP_STATUS : byte
4 | {
5 | ///
6 | /// Можно переходить к следующему шагу
7 | ///
8 | Ok,
9 | ///
10 | /// Не верный шаг в текущий момент
11 | ///
12 | WrongStep,
13 | ///
14 | /// Ошибка запроса
15 | ///
16 | ResponseError,
17 | ///
18 | /// Нет данных в query
19 | ///
20 | EmptyQuery,
21 | ///
22 | /// Не найдены все необходимые параметры в query
23 | ///
24 | BadQueryData,
25 | ///
26 | /// Сессия истекла, необходимо обновить её, либо войти заново
27 | ///
28 | SignIn,
29 | }
30 |
--------------------------------------------------------------------------------
/steam_web/Help/Enums/VERIFY_STATUS.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Help.Enums;
2 |
3 | public enum VERIFY_STATUS : byte
4 | {
5 | ///
6 | /// Ошибка при выполнении запроса
7 | ///
8 | Error,
9 | ///
10 | /// Подтверждение выполнено
11 | ///
12 | Success,
13 | ///
14 | /// Нужно начать процедуру смены данных заново
15 | ///
16 | Expired,
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/Inventory/V1/Models/Action.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Inventory.V1.Models;
2 | public sealed class Action
3 | {
4 | public string link { get; init; }
5 | public string name { get; init; }
6 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V1/Models/Asset.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Inventory.V1.Models;
2 | public sealed class Asset
3 | {
4 | public string amount { get; init; }
5 | public ulong appid { get; init; }
6 | public string assetid { get; init; }
7 | public string classid { get; init; }
8 | public string contextid { get; init; }
9 | public string instanceid { get; init; }
10 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V1/Models/DescriptionItem.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Inventory.V1.Models;
2 | public sealed class DescriptionItem
3 | {
4 | public string color { get; init; }
5 | public string type { get; init; }
6 | public string value { get; init; }
7 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V1/Models/Tag.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Inventory.V1.Models;
2 | public sealed class Tag
3 | {
4 | public string category { get; init; }
5 | public string internal_name { get; init; }
6 | public string localized_category_name { get; init; }
7 | public string localized_tag_name { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V2/Models/Asset.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Inventory.V2.Models;
4 | public class Asset
5 | {
6 | [JsonPropertyName("id")] public ulong Id { get; init; }
7 | [JsonPropertyName("classid")] public ulong ClassId { get; init; }
8 | [JsonPropertyName("instanceid")] public ulong InstanceId { get; init; }
9 | [JsonPropertyName("amount")] public uint Amount { get; init; }
10 | ///
11 | /// 1 - Не отображяется для китая
12 | ///
13 | [JsonPropertyName("hide_in_china")] public byte HideInChina { get; init; }
14 | ///
15 | /// Позиция в инвентаре
16 | ///
17 | [JsonPropertyName("pos")] public ushort Position { get; init; }
18 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V2/Models/ItemAction.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using System.Text.RegularExpressions;
3 | using SteamWeb.Extensions;
4 |
5 | namespace SteamWeb.Inventory.V2.Models;
6 | public class ItemAction
7 | {
8 | private const string _javascript = "javascript:";
9 | private const string _https = "https://";
10 | private readonly static Regex _rgx = new(@"^javascript:GetGooValue\( '%contextid%', '%assetid%', (\d{1,11}), (\d{1,11}), (\d{1,11}) \)$", RegexOptions.Compiled | RegexOptions.Singleline, TimeSpan.FromMilliseconds(100));
11 |
12 | [JsonPropertyName("name")]
13 | public string Name { get; init; }
14 |
15 | [JsonPropertyName("link")]
16 | public string Link { get; init; }
17 |
18 | public bool IsJavascript() => Link.StartsWith(_javascript);
19 | public bool IsUrl() => Link.StartsWith(_https);
20 | ///
21 | /// Получает из appid, amount и border для вызова
22 | ///
23 | /// AppId; Gem Amount; Border. 0 если не получилось узнать
24 | public (uint, uint, uint) GetGooValue()
25 | {
26 | const uint def_value = 0;
27 | try
28 | {
29 | var match = _rgx.Match(Link);
30 | if (match.Success)
31 | return (def_value, def_value, def_value);
32 |
33 | var appid = match.Groups[1].Value.ParseUInt32();
34 | var amount = match.Groups[2].Value.ParseUInt32();
35 | var border = match.Groups[3].Value.ParseUInt32();
36 | return (appid, amount, border);
37 | }
38 | catch (RegexMatchTimeoutException)
39 | {
40 | return (def_value, def_value, def_value);
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V2/Models/ItemAppData.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.Inventory.V2.Models;
3 | public sealed class ItemAppData
4 | {
5 | [JsonPropertyName("quantity")] public byte? Quantity { get; init; }
6 | [JsonPropertyName("quality")] public byte? Quality { get; init; }
7 | [JsonPropertyName("def_index")] public ushort? DefIndex { get; init; }
8 | [JsonPropertyName("is_itemset_name")] public int? IsItemsetName { get; init; }
9 | [JsonPropertyName("limited")] public byte? limited { get; init; }
10 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V2/Models/ItemDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Inventory.V2.Models;
4 | public sealed class ItemDescription
5 | {
6 | [JsonPropertyName("type")]public string? Type { get; init; }
7 | [JsonPropertyName("value")]public string Value { get; init; }
8 | [JsonPropertyName("color")]public string? Color { get; init; }
9 | [JsonPropertyName("app_data")] public ItemAppData? AppData { get; init; }
10 | }
--------------------------------------------------------------------------------
/steam_web/Inventory/V2/Models/ItemTag.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Inventory.V2.Models;
4 | public class ItemTag
5 | {
6 | [JsonPropertyName("internal_name")] public string InternalName { get; init; }
7 | [JsonPropertyName("name")] public string Name { get; init; }
8 | [JsonPropertyName("color")] public string? Color { get; init; }
9 | [JsonPropertyName("category")] public string Category { get; init; }
10 | [JsonPropertyName("category_name")] public string CategoryName { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/Models/AccountMain.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class AccountMain
3 | {
4 | public const string DefaultPlate = "None";
5 | public bool Success { get; init; } = false;
6 | public string? Error { get; init; } = null;
7 | public SubscriptionServiceActiveUntil SubscriptionService { get; init; } = new();
8 |
9 | public string PrimeAccountStatusActiveSince { get; internal set; } = DefaultPlate;
10 | public string LoggedOutOfCSGO { get; internal set; } = DefaultPlate;
11 | public string LaunchedCSGOUsingSteamClient { get; internal set; } = DefaultPlate;
12 | public string StartedPlayingCSGO { get; internal set; } = DefaultPlate;
13 | public string FirstCounterStrikeFranchiseGame { get; internal set; } = DefaultPlate;
14 | public string LaunchedCSGOUsingPerfectWorldCSGOLauncher { get; internal set; } = DefaultPlate;
15 |
16 | public string LastKnownIPAddress { get; internal set; } = DefaultPlate;
17 | public string EarnedAServiceMedal { get; internal set; } = DefaultPlate;
18 | public ushort CSGOProfileRank { get; internal set; } = 0;
19 | public ushort ExperiencePointsEarnedTowardsNextRank { get; internal set; } = 0;
20 | public string AntiAddictionOnlineTime { get; internal set; } = DefaultPlate;
21 |
22 | public AccountMain() { }
23 | public AccountMain(string Error) => this.Error = Error;
24 | }
25 |
--------------------------------------------------------------------------------
/steam_web/Models/AppContextData.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json;
2 | using SteamWeb.Extensions;
3 | using System.Text.Json.Serialization;
4 | using System.Collections.Generic;
5 |
6 | namespace SteamWeb.Models;
7 | public class AppContextData
8 | {
9 | private const string emptyString = "[]";
10 |
11 | [JsonPropertyName("appid")] public uint AppId { get; init; }
12 | [JsonPropertyName("name")] public string Name { get; init; }
13 | [JsonPropertyName("asset_count")] public ushort AssetsCount { get; init; }
14 | ///
15 | /// FULL
16 | ///
17 | [JsonPropertyName("trade_permissions")] public string TradePermissions { get; init; }
18 | [JsonPropertyName("load_failed")] public byte LoadFailed { get; init; } = 0;
19 | [JsonPropertyName("owner_only")] public bool OwnerOnly { get; init; } = false;
20 | [JsonPropertyName("rgContexts")] public Dictionary rgContexts { get; init; } = new(3);
21 |
22 | public static Dictionary Deserialize(string data)
23 | {
24 | string? json = data.GetBetween("var g_rgAppContextData = ", ";")?.Replace("rgContexts\":[]", "rgContexts\":{}");
25 | if (json == null || json == emptyString)
26 | return new(1);
27 | var obj = JsonSerializer.Deserialize>(json, Steam.JsonOptions)!;
28 | return obj;
29 | }
30 | }
31 | public class ContextItem
32 | {
33 | [JsonPropertyName("asset_count")] public ushort AssetsCount { get; init; }
34 | [JsonPropertyName("id")] public ulong ContextId { get; init; }
35 | [JsonPropertyName("name")] public string Name { get; init; }
36 | }
--------------------------------------------------------------------------------
/steam_web/Models/DangerZoneMode.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class DangerZoneMode
3 | {
4 | public ushort SoloWins { get; internal set; }
5 | public ushort SquadWins { get; internal set; }
6 | public ushort MatchesPlayed { get; internal set; }
7 | public string LastMatch { get; internal set; }
8 | }
9 |
--------------------------------------------------------------------------------
/steam_web/Models/DefaultRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using SteamWeb.Auth.Interfaces;
3 |
4 | namespace SteamWeb.Models;
5 | public class DefaultRequest
6 | {
7 | public ISessionProvider? Session { get; init; }
8 | public IWebProxy? Proxy { get; init; }
9 | public CancellationToken? CancellationToken { get; init; }
10 |
11 | public DefaultRequest() { }
12 | public DefaultRequest(IWebProxy? proxy) => Proxy = proxy;
13 | public DefaultRequest(ISessionProvider? session) => Session = session;
14 | public DefaultRequest(ISessionProvider? session, IWebProxy? proxy) : this(session) => Proxy = proxy;
15 | public DefaultRequest(ISessionProvider? session, IWebProxy? proxy, CancellationToken? cancellationToken) : this(session, proxy)
16 | => CancellationToken = cancellationToken;
17 | }
--------------------------------------------------------------------------------
/steam_web/Models/GridIntoGoo.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Script.DTO;
3 |
4 | namespace SteamWeb.Models;
5 |
6 | public class GridIntoGoo : Data
7 | {
8 | [JsonPropertyName("goo_value_received ")]
9 | public uint GooValueReceived { get; init; }
10 |
11 | [JsonPropertyName("goo_value_total")]
12 | public uint GooValueTotal { get; init; }
13 |
14 | [JsonPropertyName("strHTML")]
15 | public string? StrHTML { get; init; }
16 | }
--------------------------------------------------------------------------------
/steam_web/Models/ImageItem.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class ImageItem
3 | {
4 | public string _0 { get; init; }
5 | public string full { get; init; }
6 | public string medium { get; init; }
7 | }
8 |
--------------------------------------------------------------------------------
/steam_web/Models/InvormationProfileResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.Models;
3 | public record InvormationProfileResponse
4 | {
5 | [JsonIgnore] public bool IsSuccess => success == 1;
6 | public int success { get; init; } = 0;
7 | public string errmsg { get; init; } = "None";
8 | }
9 |
--------------------------------------------------------------------------------
/steam_web/Models/MarketHistoryGraph.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class MarketHistoryGraph
3 | {
4 | public DateTime Time { get; init; }
5 | public decimal Price { get; init; }
6 | public int Count { get; init; }
7 | }
--------------------------------------------------------------------------------
/steam_web/Models/Matchmaking.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class Matchmaking
3 | {
4 | public const string DefaultPlate = " ";
5 | public bool Success { get; init; } = false;
6 | public string? Error { get; init; } = null;
7 | public MatchmakingMode Competitive { get; init; } = new();
8 | public MatchmakingMode Wingman { get; init; } = new();
9 | public DangerZoneMode DangerZone { get; init; } = new();
10 | public ModeLastMatch[] LastMatches { get; internal set; } = new ModeLastMatch[0];
11 |
12 | public Matchmaking() { }
13 | public Matchmaking(string Error) => this.Error = Error;
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Models/ModeLastMatch.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.Models;
3 | public class ModeLastMatch
4 | {
5 | public string Mode { get; init; }
6 | public string LastMatch { get; init; }
7 |
8 | [JsonConstructor]
9 | public ModeLastMatch(string Mode, string LastMatch)
10 | {
11 | this.Mode = Mode;
12 | this.LastMatch = LastMatch;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Models/Operation.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class Operation
3 | {
4 | public string Name { get; internal set; }
5 | public int Missions_Completed { get; internal set; } = 0;
6 | public int Stars_Progress { get; internal set; } = 0;
7 | public int Stars_Purchased { get; internal set; } = 0;
8 | public int Redeemable_Balance { get; internal set; } = 0;
9 | public int Active_Mission_Card { get; internal set; } = 0;
10 | public string Activation_Time { get; internal set; } = "None";
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Models/OperationProgress.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class OperationProgress
3 | {
4 | public bool Success { get; internal set; } = false;
5 | public string? Error { get; internal set; } = null;
6 | public Operation[] Operations { get; internal set; } = Array.Empty();
7 |
8 | public OperationProgress() { }
9 | public OperationProgress(string error) => Error = error;
10 | public Operation? GetOperationByName(string Name)
11 | {
12 | Name = Name.ToLower();
13 | foreach (var item in Operations)
14 | if (item.Name.ToLower() == Name)
15 | return item;
16 | return null;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/steam_web/Models/PurchaseHistory/PurchaseHistoryCursorModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models.PurchaseHistory;
4 | ///
5 | /// Класс используется для загрузки следующих данных в истории покупок аккаунта.
6 | ///
7 | /// Не рекомендуется заполнять абы как!
8 | ///
9 | public class PurchaseHistoryCursorModel
10 | {
11 | [JsonPropertyName("wallet_txnid")] public ulong WalletTxnId { get; init; }
12 | [JsonPropertyName("timestamp_newest")] public int TimestampNewest { get; init; }
13 | [JsonPropertyName("balance")] public uint Balance { get; init; }
14 | [JsonPropertyName("currency")] public byte Currency { get; init; }
15 | }
--------------------------------------------------------------------------------
/steam_web/Models/PurchaseHistory/PurchasePaymentGameModel.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models.PurchaseHistory;
2 | public class PurchasePaymentGameModel
3 | {
4 | ///
5 | /// Название игры, программы или чего-либо ещё
6 | ///
7 | public string Name { get; init; }
8 | ///
9 | /// Username аккаунта, на который отправлен подарок.
10 | ///
11 | /// Указывается, если == или , если был возврат за такую покупку.
12 | ///
13 | public string? AccountName { get; set; }
14 | ///
15 | /// SteamId32 аккаунта, на который отправлен подарок.
16 | ///
17 | /// Указывается, если == или , если был возврат за такую покупку.
18 | ///
19 | public uint? AccountId { get; set; }
20 |
21 | public PurchasePaymentGameModel() { }
22 | public PurchasePaymentGameModel(string name) => Name = name;
23 | }
--------------------------------------------------------------------------------
/steam_web/Models/PurchaseHistory/PurchasePaymentMethodModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models.PurchaseHistory;
4 | public class PurchasePaymentMethodModel
5 | {
6 | private const char _tabCh = '\t';
7 | private const string _newLineStr = "\n";
8 | private const string _wallet = "Wallet";
9 | private const string _walletCredit = "Wallet Credit";
10 | private const string _retail = "Retail";
11 | private const string _kiosk = "Kiosk";
12 |
13 | ///
14 | /// Отображает какой метод оплаты был использован при использовании этой покупки
15 | ///
16 | public string Method { get; init; }
17 | ///
18 | /// Указывается сумма, если было несколько методов оплаты, иначе null
19 | ///
20 | public string? Amount { get; init; }
21 | [JsonIgnore] public bool IsWalletMethod => Method == _wallet || Method == _walletCredit;
22 | [JsonIgnore] public bool IsRetailMethod => Method == _retail;
23 | [JsonIgnore] public bool IsKioskMethod => Method == _kiosk;
24 |
25 | internal static PurchasePaymentMethodModel Parse(string textContent)
26 | {
27 | string? amount = null;
28 | string? method = null;
29 | string[] splitted = textContent.Split(_tabCh);
30 | foreach (var item in splitted)
31 | {
32 | if (!string.IsNullOrEmpty(item) && item != _newLineStr)
33 | {
34 | if (string.IsNullOrEmpty(amount))
35 | amount = item;
36 | else
37 | {
38 | method = item;
39 | break;
40 | }
41 | }
42 | }
43 |
44 | if (method != null)
45 | return new() { Method = method!, Amount = amount };
46 | return new() { Method = amount! };
47 | }
48 | }
--------------------------------------------------------------------------------
/steam_web/Models/SteamOfferResponse.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Extensions;
2 | namespace SteamWeb.Models;
3 | public class SteamOfferResponse
4 | {
5 | public bool Success { get; init; } = false;
6 | public string? Error { get; init; }
7 | public bool IsError => Error.IsEmpty() || !Success;
8 | public SteamOffer[] Trades { get; init; } = Array.Empty();
9 | }
--------------------------------------------------------------------------------
/steam_web/Models/SteamTradeError.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json;
2 | using System.Text.Json.Serialization;
3 | using SteamWeb.Extensions;
4 |
5 | namespace SteamWeb.Models;
6 | public class SteamTradeError
7 | {
8 | [JsonPropertyName("strError")] public string? StrError { get; init; }
9 | [JsonPropertyName("codeError")] public int CodeError { get; private set; }
10 |
11 | internal static int GetCode(string strError)
12 | {
13 | var between = strError.GetBetween("(", ")");
14 | return int.TryParse(between, out int result) ? result : 0;
15 | }
16 | public static SteamTradeError Deserialize(string json)
17 | {
18 | if (json.IsEmpty() || json == "null")
19 | return new() { StrError = "Пустые данные json." };
20 | try
21 | {
22 | var steamerror = JsonSerializer.Deserialize(json);
23 | steamerror!.CodeError = GetCode(steamerror.StrError!);
24 | return steamerror;
25 | }
26 | catch (Exception)
27 | {
28 | return new() { StrError = json };
29 | }
30 | }
31 | }
--------------------------------------------------------------------------------
/steam_web/Models/SubscriptionServiceActiveUntil.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class SubscriptionServiceActiveUntil
3 | {
4 | public string? SubscriptionInitiationTime { get; internal set; } = null;
5 | }
--------------------------------------------------------------------------------
/steam_web/Models/Trade/ConfTradeOffer.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models.Trade;
4 | public class ConfTradeOffer
5 | {
6 | ///
7 | /// Домен почты, где находиться письмо для подтверждения трейда
8 | ///
9 | [JsonPropertyName("email_domain")] public string? EmailDomain { get; init; }
10 | ///
11 | /// Нужно ли подтвердить по почте
12 | ///
13 | [JsonPropertyName("needs_email_confirmation")] public bool NeedsEmailConfirmation { get; init; } = false;
14 | ///
15 | /// Нужно ли подтвердить на телефоне
16 | ///
17 | [JsonPropertyName("needs_mobile_confirmation")] public bool NeedsMobileConfirmation { get; init; } = false;
18 | ///
19 | /// tradeofferid созданного трейда
20 | ///
21 | [JsonPropertyName("tradeofferid")] public ulong? TradeOfferId { get; init; }
22 | }
--------------------------------------------------------------------------------
/steam_web/Models/Trade/Token.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models.Trade;
4 | public class Token
5 | {
6 | [JsonPropertyName("trade_offer_access_token")] public string? TradeOfferAccessToken { get; init; }
7 |
8 | [JsonConstructor]
9 | public Token() { }
10 | public Token(string trade_offer_access_token) => TradeOfferAccessToken = trade_offer_access_token;
11 | }
--------------------------------------------------------------------------------
/steam_web/Models/UploadImageResponse.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 | public class UploadImageResponse
3 | {
4 | public bool success { get; init; } = false;
5 | public ImageItem images { get; init; }
6 | public string hash { get; init; }
7 | public string message { get; init; } = "Неизвестная ошибка";
8 | }
--------------------------------------------------------------------------------
/steam_web/Models/UserInfoModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models;
4 | public class UserInfoModel
5 | {
6 | [JsonPropertyName("logged_in")] public bool LoggedIn { get; init; } = false;
7 | [JsonPropertyName("steamid")] public ulong SteamId { get; init; }
8 | [JsonPropertyName("accountid")] public uint AccountId { get; init; }
9 | [JsonPropertyName("account_name")] public string? AccountName { get; init; }
10 | [JsonPropertyName("is_support")] public bool IsSupport { get; init; } = false;
11 | [JsonPropertyName("is_limited")] public bool IsLimited { get; init; } = false;
12 | [JsonPropertyName("is_partner_member")] public bool IsPartnerMember { get; init; } = false;
13 | [JsonPropertyName("country_code")] public string? CountryCode { get; init; }
14 | }
--------------------------------------------------------------------------------
/steam_web/Models/VacGameBanModel.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Models;
2 |
3 | public class VacGameBanModel
4 | {
5 | public required uint AppId { get; init; }
6 | public required string Name { get; init; }
7 | public bool GameBan { get; internal set; } = false;
8 | public bool VACBan { get; internal set; } = false;
9 | ///
10 | /// При значении true узнать невозможно, поэтому он указывается рандомно
11 | ///
12 | public bool BattleEye { get; internal set; } = false;
13 | }
--------------------------------------------------------------------------------
/steam_web/Models/WalletInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models;
4 | public class WalletInfo
5 | {
6 | [JsonPropertyName("wallet_country")] public string? WalletCountry { get; init; }
7 | [JsonPropertyName("wallet_currency")] public uint WalletCurrency { get; init; }
8 | [JsonPropertyName("wallet_state")] public string? WalletState { get; init; }
9 | [JsonPropertyName("wallet_fee")] public uint WalletFee { get; init; }
10 | [JsonPropertyName("wallet_fee_minimum")] public uint WalletFeeMinimum { get; init; }
11 | [JsonPropertyName("wallet_fee_percent")] public decimal WalletFeePercent { get; init; }
12 | [JsonPropertyName("wallet_publisher_fee_percent_default")] public decimal WalletPublisherFeePercentDefault { get; init; }
13 | [JsonPropertyName("wallet_fee_base")] public decimal WalletFeeBase { get; init; }
14 | [JsonPropertyName("wallet_balance")] public uint WalletBalance { get; init; }
15 | [JsonPropertyName("wallet_delayed_balance")] public uint WalletDelayedBalance { get; init; }
16 | [JsonPropertyName("wallet_max_balance")] public uint WalletMaxBalance { get; init; }
17 | [JsonPropertyName("wallet_trade_max_balance")] public uint WalletTradeMaxBalance { get; init; }
18 | [JsonPropertyName("success")] public byte Success { get; init; }
19 | [JsonPropertyName("rwgrsn")] public sbyte Rwgrsn { get; init; }
20 | }
--------------------------------------------------------------------------------
/steam_web/Models/WebApiKey.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Models;
4 | public class WebApiKey
5 | {
6 | ///
7 | /// Api ключа или заглушка в виде большого количества нулей
8 | ///
9 | public string? Key { get; init; } = null;
10 | ///
11 | /// Domain или ErrorText
12 | ///
13 | public string? Domain { get; init; } = null;
14 | ///
15 | /// Не null если
16 | ///
17 | public string? RawHtml { get; internal set; }
18 | public bool IsError => Key == null && Domain != null;
19 |
20 | [JsonConstructor]
21 | public WebApiKey() { }
22 | public WebApiKey(string Domain) => this.Domain = Domain;
23 | public WebApiKey(string Domain, string Key) : this(Domain) => this.Key = Key;
24 | }
25 |
--------------------------------------------------------------------------------
/steam_web/Models/WebTradeEligibility.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.Models;
3 | public class WebTradeEligibility
4 | {
5 | ///
6 | /// 1 - разрешён
7 | ///
8 | [JsonPropertyName("allowed")] public byte Allowed { get; init; }
9 | ///
10 | /// 8 - limit
11 | /// 16 - trade ban
12 | /// 16416 - необходимо совершить покупку в стим
13 | /// 16424 - лимит и необходимо совершить покупку в стим
14 | /// 16800 - необходимо совершить покупку в стим, пароль был изменён, гуард был выключе
15 | /// 18720 - долго не входил в аккаунт и нужно совершить покупку в стим и пароль недавно изменён
16 | ///
17 | [JsonPropertyName("reason")] public uint Reason { get; init; }
18 | [JsonPropertyName("allowed_at_time")] public int AllowedAtTime { get; init; }
19 | [JsonPropertyName("steamguard_required_days")] public int SteamguardRequiredDays { get; init; }
20 | [JsonPropertyName("new_device_cooldown_days")] public int NewDeviceCooldownDays { get; init; }
21 | [JsonPropertyName("time_checked")] public long TimeChecked { get; init; }
22 | [JsonPropertyName("expiration")] public long Expiration { get; init; }
23 |
24 | [JsonIgnore] public WebTradeEligibilityReason ReasonAdvanced => new(this);
25 | [JsonIgnore] public bool IsLimited => new WebTradeEligibilityReason(this).IsLimited;
26 | [JsonIgnore] public bool IsCanMarket => !new WebTradeEligibilityReason(this).CanMarket;
27 | [JsonIgnore] public bool IsCanTrade => new WebTradeEligibilityReason(this).CanTrade;
28 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/BuyOrderStatusAsset.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class BuyOrderStatusAsset
5 | {
6 | [JsonPropertyName("accountid_seller")] public uint AccountidSeller { get; init; }
7 | [JsonPropertyName("appid")] public uint AppId { get; init; }
8 | [JsonPropertyName("assetid")] public ulong AssetId { get; init; }
9 | [JsonPropertyName("contextid")] public ulong ContextId { get; init; }
10 | [JsonPropertyName("currency")] public byte Currency { get; init; }
11 | [JsonPropertyName("listingid")] public long ListingId { get; init; }
12 | [JsonPropertyName("price_fee")] public uint PriceFee { get; init; }
13 | [JsonPropertyName("price_subtotal")] public uint PriceSubTotal { get; init; }
14 | [JsonPropertyName("price_total")] public uint PriceTotal { get; init; }
15 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/BuyOrderStatusResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class BuyOrderStatusResponse : ResponseSuccess
5 | {
6 | [JsonPropertyName("active")] public byte Active { get; init; }
7 | [JsonPropertyName("purchase_amount_text")] public string? PurchaseAmountText { get; init; }
8 | [JsonPropertyName("purchased")] public ushort Purchased { get; init; }
9 | [JsonPropertyName("purchases")] public List Purchases { get; init; } = new(2);
10 | [JsonPropertyName("quantity")] public ushort Quantity { get; init; }
11 | [JsonPropertyName("quantity_remaining")] public ushort QuantityRemaining { get; init; }
12 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CStoreSalesService_SetVote.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.Script.DTO;
5 |
6 | [ProtoContract]
7 | public class CStoreSalesService_SetVote
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("voteid")]
11 | public uint VoteId { get; init; }
12 |
13 | [ProtoMember(2)]
14 | [JsonPropertyName("appid")]
15 | public uint AppId { get; init; }
16 |
17 | [ProtoMember(3)]
18 | [JsonPropertyName("data")]
19 | public long Data { get; init; }
20 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CStoreSalesService_SetVote_Request.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.Script.DTO;
5 |
6 | [ProtoContract]
7 | public class CStoreSalesService_SetVote_Request
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("voteid")]
11 | public uint VoteId { get; init; }
12 |
13 | [ProtoMember(2)]
14 | [JsonPropertyName("appid")]
15 | public uint AppId { get; init; }
16 |
17 | [ProtoMember(3)]
18 | [JsonPropertyName("sale_appid")]
19 | public uint SaleAppId { get; init; }
20 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CStoreSalesService_SetVote_Response.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using ProtoBuf;
3 |
4 | namespace SteamWeb.Script.DTO;
5 |
6 | [ProtoContract]
7 | public class CStoreSalesService_SetVote_Response
8 | {
9 | [ProtoMember(1)]
10 | [JsonPropertyName("votes")]
11 | public CStoreSalesService_SetVote[] Votes { get; init; } = Array.Empty();
12 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CancelTrade.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class CancelTrade
5 | {
6 | [JsonPropertyName("success")] public byte Success { get; set; }
7 | ///
8 | /// a unique identifier for the trade offer
9 | ///
10 | [JsonPropertyName("tradeofferid")] public ulong TradeOfferId { get; init; }
11 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CommentResponse.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public record CommentResponse
4 | {
5 | public bool success { get; init; } = false;
6 | public string name { get; init; }
7 | public int start { get; init; }
8 | public string pagesize { get; init; }
9 | public int total_count { get; init; }
10 | public int upvotes { get; init; }
11 | public int has_upvoted { get; init; }
12 | public string comments_html { get; init; }
13 | public int timelastpost { get; init; }
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CookiePreferences/ContentCustomization.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO.CookiePreferences;
2 |
3 | public class ContentCustomization
4 | {
5 | public bool recentapps { get; init; } = false;
6 | }
7 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CookiePreferences/CookiePreferences.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO.CookiePreferences;
2 |
3 | public class CookiePreferences
4 | {
5 | public int version { get; init; } = 1;
6 | public int preference_state { get; init; } = 3;
7 | public ContentCustomization content_customization { get; init; } = new();
8 | public ValveAnalytics valve_analytics { get; init; } = new();
9 | public ThirdPartyAnalytics third_party_analytics { get; init; } = new();
10 | public ThirdPartyContent third_party_content { get; init; } = new();
11 | public bool utm_enabled { get; init; } = false;
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CookiePreferences/ThirdPartyAnalytics.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO.CookiePreferences;
2 |
3 | public class ThirdPartyAnalytics
4 | {
5 | public bool google_analytics { get; init; } = false;
6 | }
7 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CookiePreferences/ThirdPartyContent.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO.CookiePreferences;
2 |
3 | public class ThirdPartyContent
4 | {
5 | public bool sketchfab { get; init; } = false;
6 | public bool twitter { get; init; } = false;
7 | public bool vimeo { get; init; } = false;
8 | public bool youtube { get; init; } = false;
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CookiePreferences/ValveAnalytics.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO.CookiePreferences;
2 |
3 | public class ValveAnalytics
4 | {
5 | public bool product_impressions_tracking { get; init; } = false;
6 | }
7 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/CreateBuyOrder.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public record CreateBuyOrder
4 | {
5 | ///
6 | /// 16 - проблемы с серверами
7 | ///
8 | public int success { get; init; } = 0;
9 | public string message { get; init; }
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/Data.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 |
5 | public class Data : Data
6 | {
7 | [JsonPropertyName("data")]
8 | public T? data { get; set; } = default;
9 | }
10 | public class Data
11 | {
12 | [JsonIgnore]
13 | public bool IsSuccess => Success == EResult.OK;
14 |
15 | [JsonPropertyName("success")]
16 | public EResult Success { get; set; } = EResult.Invalid;
17 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/DataOrder.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class DataOrder: ResponseSuccess
5 | {
6 | [JsonPropertyName("buy_orderid")] public ulong BuyOrderId { get; init; }
7 | [JsonPropertyName("message")] public string? Message { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/Historing/HistoryItem.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Script.Enums;
2 |
3 | namespace SteamWeb.Script.DTO.Historing;
4 | public sealed class HistoryItem: IEquatable
5 | {
6 | public TYPE_HISTORY_ITEM Type { get; internal set; }
7 | public string Name { get; internal set; }
8 | public string? Your_Price { get; internal set; }
9 | public string Buyer_Username { get; internal set; }
10 | public string? Buyer_URL { get; internal set; }
11 | public string? ListedOn { get; internal set; }
12 | public string? ActedOn { get; internal set; }
13 | public string Game { get; internal set; }
14 | public string? RemoveID0 { get; internal set; }
15 | public string? RemoveID1 { get; internal set; }
16 | public decimal GetYour_Price
17 | {
18 | get
19 | {
20 | if (string.IsNullOrEmpty(Your_Price))
21 | return 0;
22 | string splitted = Your_Price.Split(' ')[0].Replace(".", ",");
23 | if (decimal.TryParse(splitted, out var result))
24 | return result;
25 | return 0;
26 | }
27 | }
28 |
29 | public bool Equals(HistoryItem? other) => RemoveID0 == other?.RemoveID0 || RemoveID1 == other?.RemoveID1;
30 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/InventoryHistory.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace SteamWeb.Script.DTO;
4 |
5 | public class InventoryHistory
6 | {
7 | public bool success { get; internal set; } = false;
8 | public InventoryHistoryCursor cursor { get; init; } = new();
9 | ///
10 | /// Key1 - AppID, Key2 - classid_instanceid
11 | ///
12 | public Dictionary> descriptions { get; init; } = new(0);
13 | public InventoryHistoryApp[] apps { get; init; } = new InventoryHistoryApp[0];
14 | public int num { get; init; }
15 | public string html { get; init; }
16 |
17 | public InventoryHistoryItem[] GetDescriptionsArray()
18 | {
19 | var list = new List(num);
20 | foreach (var app in descriptions)
21 | {
22 | foreach (var item in app.Value) list.Add(item.Value);
23 | }
24 | list.Sort();
25 | return list.ToArray();
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/InventoryHistoryApp.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public class InventoryHistoryApp
4 | {
5 | public int appid { get; init; }
6 | public string icon { get; init; }
7 | public string link { get; init; }
8 | public string name { get; init; }
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/InventoryHistoryCursor.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Extensions;
2 | using System;
3 |
4 | namespace SteamWeb.Script.DTO;
5 |
6 | public class InventoryHistoryCursor
7 | {
8 | [System.Text.Json.Serialization.JsonPropertyName("time")] public int CursorTime { get; init; } = DateTime.UtcNow.ToTimeStamp();
9 | [System.Text.Json.Serialization.JsonPropertyName("time_frac")] public int CursorTimeFrac { get; init; } = 0;
10 | [System.Text.Json.Serialization.JsonPropertyName("s")] public string CursorS { get; init; } = "";
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/InventoryHistoryItem.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Inventory.V2.Models;
2 |
3 | namespace SteamWeb.Script.DTO;
4 |
5 | public class InventoryHistoryItem
6 | {
7 | public sbyte commodity { get; init; }
8 | public string background_color { get; init; }
9 | public string classid { get; init; }
10 | public string icon_drag_url { get; init; }
11 | public string icon_url { get; init; }
12 | public string icon_url_large { get; init; }
13 | public string instanceid { get; init; }
14 | public string market_fee_app { get; init; }
15 | public string market_hash_name { get; init; }
16 | public string market_marketable_restriction { get; init; }
17 | public string market_name { get; init; }
18 | public string market_tradable_restriction { get; init; }
19 | public sbyte marketable { get; init; }
20 | public string name { get; init; }
21 | public string name_color { get; init; }
22 | public sbyte tradable { get; init; }
23 | public string type { get; init; }
24 | public ItemTag[] tags { get; init; } = new ItemTag[0];
25 | }
26 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemGroup.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public record ItemGroup
4 | {
5 | public string avatarHash { get; init; }
6 | public string name { get; init; }
7 | public string steamid { get; init; }
8 | }
9 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemPriceHistory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace SteamWeb.Script.DTO;
4 |
5 | public readonly struct ItemPriceHistory
6 | {
7 | public DateTime Time { get; init; }
8 | public int Count { get; init; }
9 | public float Price { get; init; }
10 | }
11 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemQueryLocations.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 |
5 | public record ItemQueryLocations
6 | {
7 | public string countrycode { get; init; }
8 | public string countryname { get; internal set; }
9 | public string statecode { get; init; }
10 | public string statename { get; internal set; }
11 | public int cityid { get; init; } = 0;
12 | public string cityname { get; init; }
13 | public int hasstates { get; internal set; } = 0;
14 | public bool state_loaded { get; internal set; } = false;
15 | public bool city_loaded { get; internal set; } = false;
16 | [JsonIgnore] public bool has_states => hasstates == 1;
17 | }
18 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemRender/ItemRenderAppData.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO.ItemRender;
4 |
5 | public class ItemRenderAppData
6 | {
7 | [JsonPropertyName("appid")] public uint AppId { get; init; }
8 | [JsonPropertyName("name")] public string? Name { get; init; }
9 | [JsonPropertyName("icon")] public string? Icon { get; init; }
10 | [JsonPropertyName("link")] public string? Link { get; init; }
11 | }
12 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemRender/ItemRenderListingAsset.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Inventory.V2.Models;
3 |
4 | namespace SteamWeb.Script.DTO.ItemRender;
5 |
6 | public class ItemRenderListingAsset
7 | {
8 | [JsonPropertyName("currency")] public byte Currency { get; init; }
9 | [JsonPropertyName("appid")] public uint AppId { get; init; }
10 | [JsonPropertyName("contextid")] public ulong ContextId { get; init; }
11 | [JsonPropertyName("id")] public ulong Id { get; init; }
12 | [JsonPropertyName("amount")] public ushort Amount { get; init; }
13 | [JsonPropertyName("market_actions")] public ItemAction[] MarketActions { get; init; } = Array.Empty();
14 | }
15 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemRender/ItemRenderRequest.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Models;
2 |
3 | namespace SteamWeb.Script.DTO.ItemRender;
4 |
5 | public class ItemRenderRequest
6 | {
7 | public DefaultRequest DefaultRequest { get; }
8 | public string MarketHashName { get; }
9 | public uint AppId { get; }
10 | public byte Currency { get; } = 5;
11 | public string Country { get; } = "RU";
12 | public string Language { get; } = "english";
13 | public uint Count { get; init; } = 100;
14 | public uint Start { get; set; } = 0;
15 | public string? Query { get; init; }
16 |
17 | public ItemRenderRequest(DefaultRequest defaultRequest, string market_hash_name, uint appId)
18 | {
19 | DefaultRequest = defaultRequest;
20 | MarketHashName = market_hash_name;
21 | AppId = appId;
22 | }
23 | public ItemRenderRequest(DefaultRequest defaultRequest, string market_hash_name, uint appId, string language, string country)
24 | : this(defaultRequest, market_hash_name, appId)
25 | {
26 | Country = country;
27 | Language = language;
28 | }
29 | public ItemRenderRequest(DefaultRequest defaultRequest, string market_hash_name, uint appId, byte currency)
30 | : this(defaultRequest, market_hash_name, appId) => Currency = currency;
31 | public ItemRenderRequest(DefaultRequest defaultRequest, string market_hash_name, uint appId, byte currency, string language, string country)
32 | : this(defaultRequest, market_hash_name, appId, language, country) => Currency = currency;
33 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ItemRender/ItemRenderResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO.ItemRender;
4 | public class ItemRenderResponse
5 | {
6 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
7 | [JsonPropertyName("start")] public uint Start { get; init; }
8 | [JsonPropertyName("pagesize")] public ushort PageSize { get; init; }
9 | [JsonPropertyName("total_count")] public uint TotalCount { get; init; }
10 | [JsonPropertyName("listinginfo")] public Dictionary ListingInfo { get; init; } = new(2);
11 | [JsonPropertyName("assets")] public Dictionary>> Assets { get; init; } = new(2);
12 | [JsonPropertyName("app_data")] public Dictionary AppData { get; init; } = new(2);
13 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/MarketSearchAssetDescription.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class MarketSearchAssetDescription
5 | {
6 | [JsonPropertyName("appid")] public uint AppId { get; init; } = 0;
7 | [JsonPropertyName("classid")] public string ClassId { get; init; } = string.Empty;
8 | [JsonPropertyName("instanceid")] public string InstanceId { get; init; } = string.Empty;
9 | [JsonPropertyName("name")] public string Name { get; init; } = string.Empty;
10 | [JsonPropertyName("market_name")] public string MarketName { get; init; } = string.Empty;
11 | [JsonPropertyName("market_hash_name")] public string MarketHashName { get; init; } = string.Empty;
12 | [JsonPropertyName("market_tradable_restriction")] public sbyte MarketTradableRestriction { get; init; } = 0;
13 | [JsonPropertyName("marketable")] public ushort Marketable { get; init; } = 0;
14 | [JsonPropertyName("tradable")] public ushort Tradable { get; init; } = 0;
15 | [JsonPropertyName("type")] public string Type { get; init; } = string.Empty;
16 | [JsonPropertyName("icon_url")] public string IconUrl { get; init; } = string.Empty;
17 | [JsonPropertyName("icon_url_large")] public string IconUrlLarge { get; init; } = string.Empty;
18 | [JsonPropertyName("commodity")] public uint Commodity { get; init; } = 0;
19 | [JsonPropertyName("currency")] public ushort Currency { get; init; } = 0;
20 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/MarketSearchItem.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class MarketSearchItem
5 | {
6 | [JsonPropertyName("app_icon")] public string AppIcon { get; init; } = string.Empty;
7 | [JsonPropertyName("app_name")] public string AppName { get; init; } = string.Empty;
8 | [JsonPropertyName("name")] public string Name { get; init; } = string.Empty;
9 | [JsonPropertyName("hash_name")] public string HashName { get; init; } = string.Empty;
10 | [JsonPropertyName("sell_listings")] public uint SellListings { get; init; } = 0;
11 | [JsonPropertyName("sell_price")] public uint SellPrice { get; init; } = 0;
12 | [JsonPropertyName("sell_price_text")] public string SellPriceText { get; init; } = string.Empty;
13 | [JsonPropertyName("sale_price_text")] public string SalePriceText { get; init; } = string.Empty;
14 | [JsonPropertyName("asset_description")] public MarketSearchAssetDescription AssetDescription { get; init; } = new();
15 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/MarketSearchRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Script.Enums;
3 |
4 | namespace SteamWeb.Script;
5 | public class MarketSearchRequest
6 | {
7 | ///
8 | /// Название предмета
9 | ///
10 | [JsonPropertyName("query")] public string Query { get; set; } = string.Empty;
11 | ///
12 | /// Смещение
13 | ///
14 | [JsonPropertyName("start")] public uint Offset { get; set; } = 0;
15 | ///
16 | /// Макс предметов (1 - 100)
17 | ///
18 | [JsonPropertyName("count")] public uint Limit { get; set; } = 100;
19 | [JsonPropertyName("search_descriptions")] public uint SearchDescriptions { get; private set; } = 0;
20 | [JsonIgnore] public SORT_COLUMN SortColumn { get; set; } = SORT_COLUMN.Price;
21 | [JsonIgnore] public SORT_DIRECTION SortDir { get; set; } = SORT_DIRECTION.Asc;
22 | [JsonIgnore] public List Category730Types { get; set; } = new (20);
23 | [JsonIgnore] public List Category730Weapons { get; set; } = new(50);
24 | [JsonPropertyName("appid")] public uint AppId { get; set; } = 0;
25 | ///
26 | /// Всегда 1
27 | ///
28 | [JsonPropertyName("norender")] public uint NoRender { get; private set; } = 1;
29 | [JsonIgnore] public CancellationToken? CancellationToken { get; init; }
30 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/MarketSearchResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class MarketSearchResponse
5 | {
6 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
7 | [JsonPropertyName("is_429")] public bool IsTooManyRequests { get; init; } = false;
8 | [JsonPropertyName("start")] public uint Start { get; init; } = 0;
9 | [JsonPropertyName("pagesize")] public uint PageSize { get; init; } = 0;
10 | [JsonPropertyName("total_count")] public uint TotalCount { get; init; } = 0;
11 | [JsonPropertyName("results")] public MarketSearchItem[] Results { get; init; } = Array.Empty();
12 | [JsonPropertyName("searchdata")] public MarketSearchRequest SearchData { get; init; } = new();
13 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/OrderHistogramRequest.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Auth.Interfaces;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class OrderHistogramRequest
5 | {
6 | public ISessionProvider? Session { get; set; }
7 | public System.Net.IWebProxy? Proxy { get; set; }
8 | public uint AppId { get; set; }
9 | public string MarketHashName { get; set; }
10 | public ulong Item_NameId { get; set; }
11 | public string Country { get; set; } = "RU";
12 | public string Language { get; set; } = "english";
13 | public int Currency { get; set; } = 5;
14 | public string TwoFactor { get; set; } = "0";
15 | public int Timeout { get; set; } = 0;
16 | public CancellationToken? CancellationToken { get; private set; } = null;
17 |
18 | public OrderHistogramRequest(ISessionProvider? session, System.Net.IWebProxy? proxy, uint appid, string market_hash_name, ulong item_nameid)
19 | {
20 | Session = session;
21 | Proxy = proxy;
22 | AppId = appid;
23 | MarketHashName = market_hash_name;
24 | Item_NameId = item_nameid;
25 | }
26 | public OrderHistogramRequest(ISessionProvider? session, System.Net.IWebProxy? proxy, uint appid, string market_hash_name, ulong item_nameid, CancellationToken? cts)
27 | : this(session, proxy, appid, market_hash_name, item_nameid) => CancellationToken = cts;
28 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/OrderItem.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Extensions;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class OrderItem
5 | {
6 | public string Name { get; init; }
7 | public string Game { get; init; }
8 | public ushort Count { get; init; }
9 | public ulong Id { get; init; }
10 | public string Price { get; init; }
11 | public uint AppId { get; init; }
12 | public string MarketHashName { get; init; }
13 |
14 | ///
15 | /// Парсит строку цены, превращая её, в decimal число
16 | ///
17 | /// -1 в случае, если неудалось спарсить, либо цена в decimal формате
18 | public decimal GetDecimalPrice() => Price.ToDecimalPrice();
19 | ///
20 | /// Парсит строку цены, превращая её, в uint32 число
21 | ///
22 | /// 0 в случае, если неудалось спарсить, либо цена в decimal формате
23 | public uint GetUInt32Price() => Price.ToUInt32Price();
24 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/PriceOverview.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Extensions;
3 |
4 | namespace SteamWeb.Script.DTO;
5 | public class PriceOverview
6 | {
7 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
8 | [JsonPropertyName("lowest_price")] public string? LowestPrice { get; init; } = null;
9 | [JsonPropertyName("median_price")] public string? MedianPrice { get; init; } = null;
10 | [JsonPropertyName("volume")] public ulong? Volume { get; init; } = null;
11 |
12 | private static float GetPrice(string? price)
13 | {
14 | if (price.IsEmpty())
15 | return 0f;
16 | var splitted = price!.Split(' ');
17 | if (splitted.Length != 2)
18 | return 0;
19 | if (!float.TryParse(splitted[0], out var result))
20 | return 0;
21 | return result;
22 | }
23 | public float GetLowestPrice() => GetPrice(LowestPrice);
24 | public float GetMedianPrice() => GetPrice(MedianPrice);
25 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/Response.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 | public class Response
3 | {
4 | public bool Success { get; init; } = false;
5 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/ResponseSuccess.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class ResponseSuccess
5 | {
6 | [JsonPropertyName("success")] public byte Success { get; init; } = 0;
7 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/RgCounts.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public class RgCounts
4 | {
5 | public int cFollowing { get; init; } = 0;
6 | public int cFriends { get; init; } = 0;
7 | public int cFriendsBlocked { get; init; } = 0;
8 | public int cFriendsPending { get; init; } = 0;
9 | public int cGroups { get; init; } = 0;
10 | public int cGroupsPending { get; init; } = 0;
11 | public int success { get; init; } = 0;
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Script/DTO/SellItem.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.Script.DTO;
3 | public class SellItem
4 | {
5 | [JsonPropertyName("success")] public bool Success { get; init; } = false;
6 | ///
7 | /// Нужно подтверждение
8 | ///
9 | [JsonPropertyName("requires_confirmation")] public int RequiresConfirmation { get; init; } = 0;
10 | ///
11 | /// Подтверждение по почте
12 | ///
13 | [JsonPropertyName("needs_email_confirmation")] public bool NeedsEmailConfirmation { get; init; } = false;
14 | ///
15 | /// Подтверждение в SDA
16 | ///
17 | [JsonPropertyName("needs_mobile_confirmation")] public bool NeedsMobileConfirmation { get; init; } = false;
18 | [JsonPropertyName("email_domain")] public string? EmailDomain { get; init; }
19 | public string? message { get; init; } = null;
20 | ///
21 | /// Нужно подтверждение
22 | ///
23 | [JsonIgnore] public bool IsRequiresConfirmation => RequiresConfirmation > 0;
24 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/SteamLoyaltyStore.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public class SteamLoyaltyStore
4 | {
5 | public bool success { get; internal set; } = false;
6 | public string webapi_token { get; init; }
7 | public Conversion points_conversion { get; init; } = new();
8 |
9 | public class Conversion
10 | {
11 | public long? unit_spend { get; init; }
12 | public string points { get; init; }
13 | }
14 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/StoreUserConfig.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.DTO;
4 | public class StoreUserConfig
5 | {
6 | [JsonPropertyName("webapi_token")] public string? WebApiToken { get; init; }
7 | }
--------------------------------------------------------------------------------
/steam_web/Script/DTO/SuccessRgCounts.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.DTO;
2 |
3 | public class SuccessRgCounts
4 | {
5 | public int success { get; init; } = 0;
6 | public RgCounts rgCounts { get; init; } = new();
7 | }
8 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxDefault.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Extensions;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace SteamWeb.Script.Models;
5 | public class AjaxDefault
6 | {
7 | ///
8 | /// This account recovery session has expired. Please select 'Find Account' and start again.
9 | ///
10 | public const string Error_SessionExpired = "This account recovery session has expired. Please select 'Find Account' and start again.";
11 |
12 | [JsonPropertyName("success")]
13 | public bool Success { get; init; } = false;
14 |
15 | [JsonPropertyName("hash")]
16 | public string? Hash { get; init; } = null;
17 |
18 | [JsonPropertyName("errorMsg")]
19 | public string? ErrorMsg { get; init; } = null;
20 |
21 | [JsonIgnore]
22 | public bool IsErrorMsg => !ErrorMsg.IsEmpty();
23 |
24 | [JsonIgnore]
25 | public bool IsHash => !Hash.IsEmpty();
26 | }
27 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxEmailConfirm.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxEmailConfirm : AjaxDefault
5 | {
6 | [JsonPropertyName("show_confirmation")]
7 | public bool ShowConfirmation { get; init; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxInfoRequest.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Script.Enums;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxInfoRequest : AjaxWizardRequest
5 | {
6 | public TypeMethod Method { get; init; }
7 | public TypeReset Reset { get; init; }
8 | public TypeLost Lost { get; init; }
9 | public uint Account { get; init; }
10 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxLicense.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.Models;
2 | public class AjaxLicense
3 | {
4 | ///
5 | /// 1 - активировался
6 | /// 2 - уже был активирован
7 | /// 16 - возможно активировался
8 | ///
9 | public int success { get; init; } = 0;
10 | public int rwgrsn { get; init; } = 0;
11 | public int purchase_result_details { get; init; } = 0;
12 | public AjaxLicenseInfo purchase_receipt_info { get; init; } = new();
13 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxLicenseInfo.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.Models;
2 | public class AjaxLicenseInfo
3 | {
4 | public string? transactionid { get; init; } = null;
5 | public long packageid { get; init; } = 0;
6 | public int result_detail { get; init; } = 0;
7 | public ulong transaction_time { get; init; } = 0;
8 | public int payment_method { get; init; } = 0;
9 | public string? base_price { get; init; } = null;
10 | public string? total_discount { get; init; } = null;
11 | public string? tax { get; init; } = null;
12 | public string? shipping { get; init; } = null;
13 | public int currency_code { get; init; } = 0;
14 | public string? country_code { get; init; } = null;
15 | public string? error_headline { get; init; } = null;
16 | public string? error_string { get; init; } = null;
17 | public string? error_link_text { get; init; } = null;
18 | public string? error_link_url { get; init; } = null;
19 | public int error_appid { get; init; } = 0;
20 | public AjaxLicenseItem[] line_items { get; init; } = Array.Empty();
21 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxLicenseItem.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace SteamWeb.Script.Models
8 | {
9 | public class AjaxLicenseItem
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxNext.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Extensions;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace SteamWeb.Script.Models;
5 | public class AjaxNext
6 | {
7 | [JsonPropertyName("hash")]
8 | public string? Hash { get; init; } = null;
9 |
10 | [JsonPropertyName("errorMsg")]
11 | public string? ErrorMsg { get; init; } = null;
12 |
13 | [JsonPropertyName("title")]
14 | public string? Title { get; init; } = null;
15 |
16 | [JsonPropertyName("steamid")]
17 | public ulong SteamId { get; init; }
18 |
19 | [JsonPropertyName("html")]
20 | public string? Html { get; init; } = null;
21 |
22 | [JsonIgnore] public bool IsHash => !Hash.IsEmpty();
23 | ///
24 | /// Показывает является ли этот ответ ошибкой или нет
25 | ///
26 | /// Ошибка может быть в или в , и
27 | ///
28 | [JsonIgnore] public bool IsError => !ErrorMsg.IsEmpty() || !Html.IsEmpty();
29 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxNextStep.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxNextStep
5 | {
6 | [JsonPropertyName("redirect")]
7 | public string? Redirect { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxOp.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.Models;
2 | public class AjaxOp
3 | {
4 | ///
5 | /// True для продолжения
6 | ///
7 | public bool success { get; init; } = false;
8 | public bool showResend { get; init; } = false;
9 | ///
10 | /// Следующее состояние
11 | ///
12 | public string? state { get; init; } = null;
13 | public string? errorText { get; init; } = null;
14 | public string? token { get; init; } = null;
15 | ///
16 | /// Не null при (state == get_phone_number)
17 | ///
18 | public string? phoneNumber { get; init; } = null;
19 | ///
20 | /// Не 0 при (state == get_sms_code)
21 | ///
22 | public int vac_policy { get; init; } = 0;
23 | ///
24 | /// Не 0 при (state == get_sms_code)
25 | ///
26 | public int tos_policy { get; init; } = 0;
27 | ///
28 | /// Не null при (state == get_sms_code)
29 | ///
30 | public bool? active_locks { get; init; } = null;
31 | ///
32 | /// Не null при (state == get_sms_code)
33 | ///
34 | public bool? phone_tos_violation { get; init; } = null;
35 | ///
36 | /// Не null при (state == email_verification)
37 | ///
38 | public string? inputSize { get; init; } = null;
39 | ///
40 | /// Не null при (state == email_verification)
41 | ///
42 | public string? maxLength { get; init; } = null;
43 | }
44 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxPasswordAvailable.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxPasswordAvailable
5 | {
6 | [JsonPropertyName("available")]
7 | public bool Available { get; init; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxPollRecoveryConf.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxPollRecoveryConf: AjaxDefault
5 | {
6 | [JsonPropertyName("continue")]
7 | public bool Continue { get; init; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxRefreshResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Diagnostics.CodeAnalysis;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace SteamWeb.Script.Models;
5 | public class AjaxRefreshResponse
6 | {
7 | [JsonPropertyName("success")]
8 | [MemberNotNullWhen(true, [nameof(LoginUrl), nameof(Nonce), nameof(Redir), nameof(Auth)])]
9 | public bool Success { get; init; } = false;
10 |
11 | [JsonPropertyName("error")]
12 | public EResult Error { get; init; } = EResult.Invalid;
13 |
14 | [JsonPropertyName("login_url")]
15 | public string? LoginUrl { get; init; }
16 |
17 | [JsonPropertyName("steamID")]
18 | public ulong SteamId { get; init; }
19 |
20 | [JsonPropertyName("nonce")]
21 | public string? Nonce { get; init; }
22 |
23 | [JsonPropertyName("redir")]
24 | public string? Redir { get; init; }
25 |
26 | [JsonPropertyName("auth")]
27 | public string? Auth { get; init; }
28 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxSetTokenResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxSetTokenResponse
5 | {
6 | [JsonPropertyName("result")] public EResult Result { get; init; } = EResult.Invalid;
7 | [JsonPropertyName("rtExpiry")] public int RtExpiry { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxValidPhone.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.Models;
2 | public class AjaxValidPhone
3 | {
4 | public bool success { get; set; } = false;
5 | public string? number { get; set; } = null;
6 | public bool is_valid { get; set; } = false;
7 | public bool is_voip { get; set; } = false;
8 | public bool is_fixed { get; set; } = false;
9 | }
10 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxWalletCode.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | namespace SteamWeb.Script.Models;
3 | public class AjaxWalletCode
4 | {
5 | [JsonPropertyName("success")] public EResult Success { get; init; } = EResult.Invalid;
6 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/AjaxWizardRequest.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Models;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class AjaxWizardRequest : DefaultRequest
5 | {
6 | public ulong S { get; init; }
7 | public string? Referer { get; init; }
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/GooValue.cs:
--------------------------------------------------------------------------------
1 | using SteamWeb.Script.DTO;
2 | using System.Text.Json.Serialization;
3 |
4 | namespace SteamWeb.Script.Models;
5 |
6 | public class GooValue : Data
7 | {
8 | [JsonPropertyName("goo_value")]
9 | public uint goo_value { get; init; }
10 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/MoreHistoryModel.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Models.PurchaseHistory;
3 |
4 | namespace SteamWeb.Script.Models;
5 | public class MoreHistoryModel
6 | {
7 | [JsonPropertyName("success")] public int Success { get; init; } = 1;
8 | [JsonPropertyName("html")] public string? Html { get; init; }
9 | [JsonPropertyName("cursor")] public PurchaseHistoryCursorModel? Cursor { get; init; }
10 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/NextRedirect.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Extensions;
3 |
4 | namespace SteamWeb.Script.Models;
5 |
6 | public record NextRedirect
7 | {
8 | public string hash { get; init; }
9 | public string errorMsg { get; init; }
10 | [JsonIgnore] public bool success => !hash.IsEmpty();
11 | [JsonIgnore] public bool is_error => errorMsg.IsEmpty();
12 | }
13 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/PhoneAjax.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Script.Models;
2 | public class PhoneAjax
3 | {
4 | public bool? has_phone { get; init; } = null;
5 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/RecoveryChangeEmail.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using SteamWeb.Extensions;
3 |
4 | namespace SteamWeb.Script.Models;
5 | public record RecoveryChangeEmail
6 | {
7 | public string hash { get; init; }
8 | public string errorMsg { get; init; }
9 | ///
10 | /// true если нужно подтвердить код с почты
11 | ///
12 | public bool show_confirmation { get; init; } = false;
13 |
14 | [JsonIgnore] public bool is_hash => !hash.IsEmpty();
15 | [JsonIgnore] public bool is_error => errorMsg.IsEmpty();
16 | }
17 |
--------------------------------------------------------------------------------
/steam_web/Script/Models/RecoveryConfirmation.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 | using Response = SteamWeb.Script.DTO.Response;
3 |
4 | namespace SteamWeb.Script.Models;
5 | public class RecoveryConfirmation : Response
6 | {
7 | [JsonPropertyName("continue")] public bool Continue { get; init; } = false;
8 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/RequestKeyResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 |
5 | public class RequestKeyResponse
6 | {
7 | ///
8 | /// 22 - ожидание подтверждения
9 | ///
10 | /// 15 - запрос уже был выполнен\истёк
11 | ///
12 | [JsonPropertyName("success")] public EResult Success { get; init; }
13 | [JsonPropertyName("api_key")] public string? ApiKey { get; init; }
14 | ///
15 | /// Null если передаётся request_id
16 | ///
17 | [JsonPropertyName("request_id")] public ulong? RequestId { get; init; }
18 | ///
19 | /// 1 - подтверждение через мобильное приложение
20 | ///
21 | [JsonPropertyName("requires_confirmation")] public int RequiresConfirmation { get; init; }
22 | }
--------------------------------------------------------------------------------
/steam_web/Script/Models/SteamRSA.cs:
--------------------------------------------------------------------------------
1 | using System.Text.Json.Serialization;
2 |
3 | namespace SteamWeb.Script.Models;
4 | public class SteamRSA
5 | {
6 | [JsonPropertyName("success")]
7 | public bool Success { get; init; } = false;
8 |
9 | [JsonPropertyName("publickey_mod")]
10 | public string? PublicKeyMod { get; init; } = null;
11 |
12 | [JsonPropertyName("publickey_exp")]
13 | public string? PublicKeyExp { get; init; } = null;
14 |
15 | [JsonPropertyName("timestamp")]
16 | public string? Timestamp { get; init; } = null;
17 |
18 | [JsonPropertyName("token_gid")]
19 | public string? TokenGid { get; init; } = null;
20 | }
21 |
--------------------------------------------------------------------------------
/steam_web/SteamWeb.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net8.0
5 | enable
6 | enable
7 | Debug;Release;DebugFactory;ReleaseFactory
8 | RAWENSOFT
9 | ryx_rw
10 |
11 |
12 |
13 | portable
14 |
15 |
16 |
17 | portable
18 | $(DefineConstants);FACTORY
19 |
20 |
21 |
22 | portable
23 | True
24 |
25 |
26 |
27 | portable
28 | $(DefineConstants);FACTORY
29 | True
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | ..\..\restclient_factory\RestClientFactory\bin\Publish\RestClientFactory.dll
41 | False
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/steam_web/Web/DTO/ByteResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using System.Text;
3 | using RestSharp;
4 |
5 | namespace SteamWeb.Web.DTO;
6 |
7 | public class ByteResponse : Response
8 | {
9 | public byte[]? Data { get; init; } = null;
10 | public ByteResponse(RestResponse res) : base(res) => Data = res.RawBytes;
11 | public ByteResponse(RestResponse res, CookieContainer? cookies) : base(res, cookies) => Data = res.RawBytes;
12 | public ByteResponse(RestResponse res, CookieCollection? cookies) : base(res, cookies) => Data = res.RawBytes;
13 | public ByteResponse(HttpWebResponse res) : base(res)
14 | {
15 | if (res != null && res.ContentLength > 0)
16 | {
17 | using var sr = new StreamReader(res.GetResponseStream());
18 | Data = Encoding.UTF8.GetBytes(sr.ReadToEnd());
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/steam_web/Web/DTO/ProtobufRequest.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using SteamWeb.Auth.Interfaces;
3 |
4 | namespace SteamWeb.Web.DTO;
5 | public class ProtobufRequest
6 | {
7 | public string Url { get; init; }
8 | public string? AccessToken { get; init; }
9 | public string ProtoData { get; init; }
10 | public IWebProxy? Proxy { get; init; }
11 | public ISessionProvider? Session { get; init; }
12 | public string? UserAgent { get; init; }
13 | public string? Cookie { get; init; }
14 | public bool IsMobile { get; init; } = true;
15 | public ulong? SpoofSteamId { get; init; } = null;
16 | public int Timeout { get; set; } = 30000;
17 | public CancellationToken? CancellationToken { get; init; } = null;
18 | public string? Referer { get; init; }
19 |
20 | public ProtobufRequest(string url, string protoData)
21 | {
22 | Url = url;
23 | ProtoData = protoData;
24 | }
25 | }
--------------------------------------------------------------------------------
/steam_web/Web/DTO/StringResponse.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using RestSharp;
3 |
4 | namespace SteamWeb.Web.DTO;
5 | public class StringResponse : Response
6 | {
7 | public string? Data { get; init; } = null;
8 | public StringResponse(RestResponse res) : base(res) => Data = res.Content;
9 | public StringResponse(RestResponse res, CookieContainer? cookies) : base(res, cookies) => Data = res.Content;
10 | public StringResponse(RestResponse res, CookieCollection? cookies) : base(res, cookies) => Data = res.Content;
11 | public StringResponse(HttpWebResponse res) : base(res)
12 | {
13 | if (res != null && res.ContentLength > 0)
14 | {
15 | using var sr = new StreamReader(res.GetResponseStream());
16 | Data = sr.ReadToEnd();
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/steam_web/Web/Enums/ProxyType.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Web.Enums;
2 | public enum ProxyType : byte
3 | {
4 | HTTP,
5 | Socks4,
6 | Socks5
7 | };
--------------------------------------------------------------------------------
/steam_web/Web/Enums/USER_AGENT.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Web.Enums;
2 | public enum USER_AGENT : byte
3 | {
4 | Steam,
5 | Chrome
6 | }
--------------------------------------------------------------------------------
/steam_web/Web/Knowns/KnownCookies.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Web;
2 | public static class KnownCookies
3 | {
4 | internal const string COOKIE_NAME_SESSIONID = "sessionid";
5 | internal const string COOKIE_NAME_STEAMCOUNTRY = "steamCountry";
6 | internal const string COOKIE_NAME_BROWSERID = "browserid";
7 | internal const string COOKIE_NAME_STEAMLANGUAGE = "Steam_Language";
8 | internal const string COOKIE_NAME_STEAMLOGINSECURE = "steamLoginSecure";
9 | internal const string COOKIE_NAME_СOOKIESETTINGS = "cookieSettings";
10 | internal const string COOKIE_NAME_СOOKIESETTINGS_VALUE = "%7B%22version%22%3A1%2C%22preference_state%22%3A1%2C%22content_customization%22%3Anull%2C%22valve_analytics%22%3Anull%2C%22third_party_analytics%22%3Anull%2C%22third_party_content%22%3Anull%2C%22utm_enabled%22%3Atrue%7D";
11 |
12 |
13 | public const string DefaultMobileCookie = "mobileClient=android; mobileClientVersion=777777 3.7.2; ";
14 |
15 | internal static System.Net.Cookie MobileClient { get; } = new System.Net.Cookie("mobileClient", "android") { Secure = true };
16 | internal static System.Net.Cookie MobileClientVersion { get; } = new System.Net.Cookie("mobileClientVersion", "777777 3.7.2") { Secure = true };
17 | }
--------------------------------------------------------------------------------
/steam_web/Web/Knowns/KnownHeaders.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Web;
2 | public static class KnownHeaders
3 | {
4 | public const string AcceptLanguage = "Accept-Language";
5 | public const string CacheControl = "Cache-Control";
6 | public const string Dnt = "DNT";
7 | public const string Pragma = "Pragma";
8 | public const string UpgradeInsecureRequests = "Upgrade-Insecure-Requests";
9 | public const string Location = "Location";
10 | public const string Referer = "Referer";
11 | public const string SecFetchDest = "Sec-Fetch-Dest";
12 | public const string SecFetchMode = "Sec-Fetch-Mode";
13 | public const string SecFetchSite = "Sec-Fetch-Site";
14 | public const string XRequestedWith = "X-Requested-With";
15 | public const string XPrototypeVersion = "X-Prototype-Version";
16 | }
--------------------------------------------------------------------------------
/steam_web/Web/Knowns/KnownUri.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Web;
2 |
3 | public static class KnownUri
4 | {
5 | public const string HOST_COMMUNITY = "steamcommunity.com";
6 | public const string HOST_STORE = "store.steampowered.com";
7 | public const string HOST_HELP = "help.steampowered.com";
8 | public const string HOST_API = "api.steampowered.com";
9 | public const string HOST_POWERED = "steampowered.com";
10 |
11 | internal const string BuffLoginUrl = "https://buff.163.com/account/login/steam?back_url=/account/steam_bind/finish";
12 | public const string BASE_COMMUNITY = "https://steamcommunity.com";
13 | public const string BASE_POWERED = "https://store.steampowered.com";
14 | public const string BASE_LOGIN_POWERED = "https://login.steampowered.com/";
15 | }
16 |
--------------------------------------------------------------------------------
/steam_web/Web/Knowns/KnownUserAgents.cs:
--------------------------------------------------------------------------------
1 | namespace SteamWeb.Web;
2 |
3 | public static class KnownUserAgents
4 | {
5 | public const string OkHttp = "okhttp/4.9.2";
6 | public const string SteamMobileBrowser = "Dalvik/2.1.0 (Linux; U; Android 5.1.1; ASUS_Z01QD Build/QKQ1.190825.002; Valve Steam App Version/3)";
7 | public const string WindowsBrowser = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36";
8 | public const string SteamWindowsClient = "Mozilla/5.0 (Windows; U; Windows NT 10.0; en-US; Valve Steam Client/default/1607131459; ) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.117 Safari/537.36";
9 | public const string SteamWindowsClientOverlay = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; Valve Steam GameOverlay/default/0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.183 Safari/537.36";
10 | }
--------------------------------------------------------------------------------