Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateConfirmationCode(identitySecret, tag string, current int64) (string, error)
- func GenerateTwoFactorCode(sharedSecret string, current int64) (string, error)
- type APIResponse
- type Action
- type Asset
- type AssetDescription
- type ChatFriendResponse
- type ChatLogMessage
- type ChatMessage
- type ChatResponse
- type Confirmation
- type ConfirmationAcceptResponse
- type ConfirmationResponse
- type Context
- type Description
- type EconAction
- type EconDesc
- type EconItem
- type EconItemDesc
- type EconTag
- type EscrowSteamGuardInfo
- type Filter
- type FinalizeTwoFactorInfo
- type Friend
- type Game
- type GameContext
- type InventoryAppStats
- type InventoryContext
- type InventoryItem
- type ItemTag
- type Listing
- type ListingItem
- type LoginFinalized
- type MarketBuyOrderResponse
- type MarketItem
- type MarketItemPrice
- type MarketItemPriceOverview
- type MarketItemResponse
- type MarketSellResponse
- type OAuth
- type OwnedGamesResponse
- type PhoneAPIResponse
- type PlayerBan
- type PlayerSummary
- type SearchData
- type ServerTimeTip
- type Session
- func (s *Session) AcceptConfirmation(identitySecret string) (*ConfirmationResponse, error)
- func (session *Session) AcceptTradeOffer(id uint64) error
- func (session *Session) AddPhoneNumber(number string) error
- func (session *Session) AnswerConfirmation(confirmation *Confirmation, identitySecret, answer string, current int64) error
- func (session *Session) Auth(realm, return_to string) (*http.Response, error)
- func (session *Session) CancelBuyOrder(orderid uint64) error
- func (session *Session) CancelTradeOffer(id uint64) error
- func (session *Session) ChatFriendState(sid SteamID) (*ChatFriendResponse, error)
- func (session *Session) ChatLog(partner uint32) ([]*ChatLogMessage, error)
- func (session *Session) ChatLogin(uiMode string) error
- func (session *Session) ChatLogoff() error
- func (session *Session) ChatPoll(timeoutSeconds string) (*ChatResponse, error)
- func (session *Session) ChatSendMessage(sid SteamID, message, messageType string) error
- func (session *Session) CleanPrice(price string) (string, string, string)
- func (session *Session) ConfirmRemovePhoneNumber(mobileCode string) error
- func (session *Session) DeclineTradeOffer(id uint64) error
- func (session *Session) DisableTwoFactor(revocationCode string) error
- func (session *Session) EnableTwoFactor() (*TwoFactorInfo, error)
- func (s *Session) FetchConfirmations(identitySecret string) (*ConfirmationResponse, error)
- func (session *Session) FinalizeTwoFactor(authCode, mobileCode string) (*FinalizeTwoFactorInfo, error)
- func (session *Session) GetConfirmations(identitySecret string, current int64) ([]*Confirmation, error)
- func (session *Session) GetEscrow(url string) (*EscrowSteamGuardInfo, error)
- func (session *Session) GetEscrowGuardInfo(sid SteamID, token string) (*EscrowSteamGuardInfo, error)
- func (session *Session) GetEscrowGuardInfoForTrade(offerID uint64) (*EscrowSteamGuardInfo, error)
- func (session *Session) GetFilterableInventory(sid SteamID, appID, contextID uint64, filters []Filter) ([]InventoryItem, error)
- func (session *Session) GetFriends(sid SteamID) ([]*Friend, error)
- func (session *Session) GetInventory(sid SteamID, appID, contextID uint64) ([]InventoryItem, error)
- func (session *Session) GetInventoryAppStats(sid SteamID) (map[string]InventoryAppStats, error)
- func (session *Session) GetInventoryContext(steamID string) (*SteamInventoryContext, error)
- func (session *Session) GetMarketItemPriceHistory(appID uint64, marketHashName string) ([]*MarketItemPrice, error)
- func (session *Session) GetMarketItemPriceOverview(appID uint64, country, currencyID, marketHashName string) (*MarketItemPriceOverview, error)
- func (s *Session) GetMarketItems(appid, start, perPage uint64) (*SteamMarketItems, error)
- func (session *Session) GetMyListingsItems(start, perPage uint64) (*ListingItem, error)
- func (session *Session) GetMyTradeToken() (string, error)
- func (session *Session) GetOwnedGames(sid SteamID, freeGames bool, appInfo bool) (*OwnedGamesResponse, error)
- func (session *Session) GetPlayerBans(steamids string) ([]*PlayerBan, error)
- func (session *Session) GetPlayerSummaries(steamids string) ([]*PlayerSummary, error)
- func (session *Session) GetProfileURL() (string, error)
- func (session *Session) GetRequiredSteamAppVersion(appID int) (int, error)
- func (session *Session) GetSteamID() SteamID
- func (session *Session) GetTradeOffer(id uint64) (*TradeOffer, error)
- func (session *Session) GetTradeOffers(filter uint32, timeCutOff time.Time) (*TradeOfferResponse, error)
- func (session *Session) GetTradeReceivedItems(receiptID uint64) ([]*InventoryItem, error)
- func (session *Session) GetWallet() (string, error)
- func (session *Session) GetWebAPIKey() (string, error)
- func (session *Session) InitiateRemovePhoneNumber() error
- func (session *Session) Login(accountName, password, sharedSecret string, timeOffset time.Duration) error
- func (session *Session) PlaceBuyOrder(appid uint64, priceTotal float64, quantity uint64, ...) (*MarketBuyOrderResponse, error)
- func (session *Session) PrepareForSteamStore()
- func (session *Session) ReSendVerificationCode() error
- func (session *Session) Refresh() error
- func (session *Session) RegisterWebAPIKey(domain string) (string, error)
- func (session *Session) ResolveVanityURL(vanityURL string) (uint64, error)
- func (session *Session) RevokeWebAPIKey() error
- func (session *Session) SellItem(item *InventoryItem, amount, price uint64) (*MarketSellResponse, error)
- func (s *Session) SendConfirmationAjax(conf *Confirmation, tag, is string) (*ConfirmationAcceptResponse, error)
- func (session *Session) SendTradeOffer(offer *TradeOffer, sid SteamID, token string) error
- func (session *Session) SetLanguage(lang string)
- func (session *Session) SetProfileInfo(profileURL string, values *map[string][]string) error
- func (session *Session) SetProfilePrivacy(profileURL string, commentPrivacy string, privacy uint8) error
- func (session *Session) SetupProfile(profileURL string) error
- func (session *Session) ValidatePhoneNumber(number string) error
- func (session *Session) VerifyPhoneNumber(code string) error
- type SteamID
- func (sid *SteamID) GetAccountID() uint32
- func (sid *SteamID) GetAccountInstance() uint32
- func (sid *SteamID) GetAccountType() uint32
- func (sid *SteamID) GetAccountUniverse() uint32
- func (sid *SteamID) Parse(accid uint32, instance uint32, accountType uint32, universe uint8)
- func (sid *SteamID) ParseDefaults(accid uint32)
- func (sid *SteamID) ParseSteam2ID(input string) error
- func (sid *SteamID) ParseSteam3ID(input string) error
- func (sid *SteamID) ToSteam2ID() string
- func (sid *SteamID) ToSteam3ID() string
- func (sid *SteamID) ToString() string
- type SteamInventoryContext
- type SteamMarketItems
- type SteamTime
- type SteamTimeResponse
- type TradeOffer
- type TradeOfferResponse
- type TransferInfo
- type TransferParam
- type TwoFactorInfo
Constants ¶
View Source
const ( PersonaStateOffline = iota PersonaStateOnline PersonaStateBusy PersonaStateAway PersonaStateSnooze PersonaStateLookingToTrade PersonaStateLookingToPlay )
View Source
const ( PersonaStateFlagRichPresence = 1 << 0 PersonaStateFlagInJoinableGame = 1 << 1 PersonaStateFlagWeb = 1 << 8 PersonaStateFlagMobile = 1 << 9 PersonaStateFlagBigPicture = 1 << 10 )
View Source
const ( MessageTypeStatus = "personastate" MessageTypeTyping = "typing" MessageTypeSayText = "saytext" )
View Source
const ( ChatUIModeMobile = "mobile" // empty string works too ChatUIModeWeb = "web" )
View Source
const ( RSAPublicKey = APIBaseUrl + "/IAuthenticationService/GetPasswordRSAPublicKey/v1" AuthSession = APIBaseUrl + "/IAuthenticationService/BeginAuthSessionViaCredentials/v1" UpdateAuthSession = APIBaseUrl + "/IAuthenticationService/UpdateAuthSessionWithSteamGuardCode/v1" Poll = APIBaseUrl + "/IAuthenticationService/PollAuthSessionStatus/v1" LoginBaseUrl = "https://login.steampowered.com" FinalizeLogin = LoginBaseUrl + "/jwt/finalizelogin" RefreshSession = LoginBaseUrl + "/jwt/refresh?redir=https%3A%2F%2Fsteamcommunity.com" )
View Source
const ( CurrencyUSD = "1" CurrencyGBP = "2" CurrencyEUR = "3" CurrencyCHF = "4" CurrencyRUB = "5" CurrencyPLN = "6" CurrencyBRL = "7" CurrencyJPY = "8" CurrencyNOK = "9" CurrencyIDR = "10" CurrencyMYR = "11" CurrencyPHP = "12" CurrencySGD = "13" CurrencyTHB = "14" CurrencyVND = "15" CurrencyKRW = "16" CurrencyTRY = "17" CurrencyUAH = "18" CurrencyMXN = "19" CurrencyCAD = "20" CurrencyAUD = "21" CurrencyNZD = "22" CurrencyCNY = "23" CurrencyINR = "24" CurrencyCLP = "25" CurrencyPEN = "26" CurrencyCOP = "27" CurrencyZAR = "28" CurrencyHKD = "29" CurrencyTWD = "30" CurrencySAR = "31" CurrencyAED = "32" CurrencyARS = "34" CurrencyILS = "35" CurrencyBYN = "36" CurrencyKZT = "37" CurrencyKWD = "38" CurrencyQAR = "39" CurrencyCRC = "40" CurrencyUYU = "41" CurrencyRMB = "9000" )
View Source
const ( PrivacyStatePrivate = 1 PrivacyStateFriendsOnly = 2 PrivacyStatePublic = 3 )
View Source
const ( CommentSettingSelf = "commentselfonly" CommentSettingFriends = "commentfriendsonly" CommentSettingPublic = "commentanyone" )
View Source
const ( UniverseInvalid = iota UniversePublic UniverseBeta UniverseInternal UniverseDev )
View Source
const ( AccountTypeInvalid = iota AccountTypeIndividual AccountTypeMultiSeat AccountTypeGameServer AccountTypeAnonymousGameServer AccountTypePending AccountTypeContentServer AccountTypeClan AccountTypeChat AccountTypeP2PSuperSeeder AccountTypeAnonymous )
View Source
const ( AccountInstanceAll = iota AccountInstanceDesktop AccountInstanceConsole AccountInstanceWeb )
View Source
const ( ChatInstanceFlagClan = 0x80000 ChatInstanceFlagLobby = 0x40000 ChatInstanceFlagMMSLobby = 0x20000 )
View Source
const ( TradeStateNone = iota TradeStateInvalid TradeStateActive TradeStateAccepted TradeStateCountered TradeStateExpired TradeStateCanceled TradeStateDeclined TradeStateInvalidItems TradeStateCreatedNeedsConfirmation TradeStateCanceledByTwoFactor TradeStateInEscrow )
View Source
const ( TradeConfirmationNone = iota TradeConfirmationEmail TradeConfirmationMobileApp TradeConfirmationMobile )
View Source
const ( TradeFilterNone = iota TradeFilterSentOffers = 1 << 0 TradeFilterRecvOffers = 1 << 1 TradeFilterActiveOnly = 1 << 3 TradeFilterHistoricalOnly = 1 << 4 TradeFilterItemDescriptions = 1 << 5 )
View Source
const (
APIBaseUrl = "https://api.steampowered.com"
)
View Source
const (
InventoryEndpoint = "http://steamcommunity.com/inventory/%d/%d/%d?"
)
View Source
const (
SteamcommunityURL = "https://steamcommunity.com/"
)
Variables ¶
View Source
var ( //ErrConfirmationsUnknownError = errors.New("unknown error occurred finding confirmation") ErrCannotFindConfirmations = errors.New("unable to find confirmation") ErrCannotFindDescriptions = errors.New("unable to find confirmation descriptions") ErrConfirmationsDescMismatch = errors.New("cannot match confirmation with their respective descriptions") ErrWGTokenExpired = errors.New("WGToken expired") )
View Source
var ( ErrEmptySessionID = errors.New("sessionid is empty") ErrInvalidUsername = errors.New("invalid username") ErrNeedTwoFactor = errors.New("invalid twofactor code") )
View Source
var ( ErrInvalidSteam2ID = errors.New("invalid input specified for a Steam 2 ID") ErrInvalidSteam3ID = errors.New("invalid input specified for a Steam 3 ID") )
View Source
var ( ErrReceiptMatch = errors.New("unable to match items in trade receipt") ErrCannotAcceptActive = errors.New("unable to accept a non-active trade") ErrCannotFindOfferInfo = errors.New("unable to match data from trade offer url") )
View Source
var ( ErrCannotRegisterKey = errors.New("unable to register API key") ErrCannotRevokeKey = errors.New("unable to revoke API key") ErrAccessDenied = errors.New("access is denied") ErrKeyNotFound = errors.New("key not found") )
View Source
var ErrCannotDisable = errors.New("unable to process disable two factor request")
View Source
var ErrCannotFindVanityMatch = errors.New("no match for the vanity URL")
View Source
var (
ErrCannotLoadPrices = errors.New("unable to load prices at this time")
)
View Source
var ErrInvalidPhoneNumber = errors.New("invalid phone number specified")
View Source
var WalletMap = map[string]string{
"$": "1",
"£": "2",
"€": "3",
"CHF": "4",
"₽": "5",
"zł": "6",
"R$": "7",
"¥": "8",
"kr": "9",
"Rp": "10",
"RM": "11",
"₱": "12",
"S$": "13",
"฿": "14",
"₫": "15",
"₩": "16",
"₺": "17",
"₴": "18",
"Mex$": "19",
"CAD": "20",
"AUD": "21",
"NZ$": "22",
"元": "23",
"₹": "24",
"CLP$": "25",
"S/": "26",
"COP$": "27",
"R": "28",
"HK$": "29",
"NT$": "30",
"ر.س": "31",
"د.إ": "32",
"₪": "35",
"Br": "36",
"₸": "37",
"KWD": "38",
"QAR": "39",
"₡": "40",
"UYU$": "41",
"RMB": "23",
}
Functions ¶
Types ¶
type APIResponse ¶
type APIResponse struct {
Inner *TradeOfferResponse `json:"response"`
}
type Asset ¶
type Asset struct { Currency uint64 `json:"currency"` AppID uint64 `json:"appid"` ContextID string `json:"contextid"` ID string `json:"id"` ClassID string `json:"classid"` InstanceID string `json:"instanceid"` Amount string `json:"amount"` Status uint64 `json:"status"` OriginalAmount string `json:"original_amount"` UnownedID string `json:"unowned_id"` UnownedContextID string `json:"unowned_contextid"` BackgroundColor string `json:"background_color"` IconURL string `json:"icon_url"` IconURLLarge string `json:"icon_url_large"` Descriptions []Description `json:"descriptions"` Tradable uint64 `json:"tradable"` Actions []Action `json:"actions"` OwnerDescriptions []Description `json:"owner_descriptions"` Name string `json:"name"` NameColor string `json:"name_color"` Type string `json:"type"` MarketName string `json:"market_name"` MarketHashName string `json:"market_hash_name"` Commodity uint64 `json:"commodity"` MarketTradableRestriction int `json:"market_tradable_restriction"` MarketMarketableRestriction uint64 `json:"market_marketable_restriction"` Marketable uint64 `json:"marketable"` AppIcon string `json:"app_icon"` Owner uint64 `json:"owner"` }
type AssetDescription ¶
type AssetDescription struct { AppID uint64 `json:"appid"` ClassID string `json:"classid"` InstanceID string `json:"instanceid"` Currency uint64 `json:"currency"` BackgroundColor string `json:"background_color"` IconURL string `json:"icon_url"` IconURLLarge string `json:"icon_url_large"` Tradable uint64 `json:"tradable"` Name string `json:"name"` NameColor string `json:"name_color"` Type string `json:"type"` MarketName string `json:"market_name"` MarketHashName string `json:"market_hash_name"` Commodity uint64 `json:"commodity"` MarketTradableRestriction int `json:"market_tradable_restriction"` MarketMarketableRestriction uint64 `json:"market_marketable_restriction"` Marketable uint64 `json:"marketable"` }
type ChatFriendResponse ¶
type ChatFriendResponse struct { AccountID uint32 `json:"m_unAccountID"` SteamID SteamID `json:"m_ulSteamID,string"` Name string `json:"m_strName"` State uint8 `json:"m_ePersonaState"` StateFlags uint32 `json:"m_nPersonaStateFlags"` AvatarHash string `json:"m_strAvatarHash"` InGame bool `json:"m_bIngame"` InGameAppID uint64 `json:"m_nInGameAppID,string"` InGameName string `json:"m_strInGameName"` LastMessage int64 `json:"m_tsLastMessage"` LastView int64 `json:"m_tsLastView"` }
type ChatLogMessage ¶
type ChatMessage ¶
type ChatMessage struct { Type string `json:"type"` Text string `json:"text"` TimestampOff int64 `json:"timestamp"` UTCTimestamp int64 `json:"utc_timestamp"` Partner uint32 `json:"accountid_from"` StatusFlags uint32 `json:"status_flags"` PersonaState uint32 `json:"persona_state"` PersonaName string `json:"persona_name"` }
type ChatResponse ¶
type ChatResponse struct { Message int `json:"message"` // Login / Internal UmqID string `json:"umqid"` // Login / Internal TimestampOff int64 `json:"timestamp"` // Login UTCTimestamp int64 `json:"utc_timestamp"` // Login Push int `json:"push"` // Login ErrorMessage string `json:"error"` // All (returned as error if not "OK") MessageBase uint32 `json:"messagebase"` // ChatPoll LastMessages uint32 `json:"messagelast"` // ChatPoll Messages []*ChatMessage `json:"messages"` // ChatPoll SecTimeout uint32 `json:"sectimeout"` // ChatPoll }
type Confirmation ¶
type ConfirmationAcceptResponse ¶
type ConfirmationAcceptResponse struct {
Success bool `json:"success"`
}
type ConfirmationResponse ¶
type ConfirmationResponse struct { Success bool `json:"success"` Confirmations []*Confirmation `json:"conf"` }
type Description ¶
type EconAction ¶
type EconItem ¶
type EconItem struct { AssetID uint64 `json:"assetid,string,omitempty"` InstanceID uint64 `json:"instanceid,string,omitempty"` ClassID uint64 `json:"classid,string,omitempty"` AppID uint32 `json:"appid"` ContextID uint64 `json:"contextid,string"` Amount uint32 `json:"amount,string"` Missing bool `json:"missing,omitempty"` EstUSD uint32 `json:"est_usd,string"` }
type EconItemDesc ¶
type EconItemDesc struct { ClassID uint64 `json:"classid,string"` // for matching with EconItem InstanceID uint64 `json:"instanceid,string"` // for matching with EconItem Tradable int `json:"tradable"` BackgroundColor string `json:"background_color"` IconURL string `json:"icon_url"` IconLargeURL string `json:"icon_url_large"` IconDragURL string `json:"icon_drag_url"` Name string `json:"name"` NameColor string `json:"name_color"` MarketName string `json:"market_name"` MarketHashName string `json:"market_hash_name"` MarketFeeApp uint32 `json:"market_fee_app"` Comodity bool `json:"comodity"` Actions []*EconAction `json:"actions"` Tags []*EconTag `json:"tags"` Descriptions []*EconDesc `json:"descriptions"` }
type EscrowSteamGuardInfo ¶
type Filter ¶
type Filter func(*InventoryItem) bool
Filter get InventoryItem and return true if item meet its condition false otherwise
type FinalizeTwoFactorInfo ¶
type GameContext ¶
type GameContext struct { AppID uint64 `json:"appid"` Name string `json:"name"` Icon string `json:"icon"` Link string `json:"link"` AssetCount uint64 `json:"asset_count"` InventoryLogo string `json:"inventory_logo,omitempty"` TradePerms string `json:"trade_permissions"` LoadFailed uint64 `json:"load_failed"` StoreVetted string `json:"store_vetted"` OwnerOnly bool `json:"owner_only"` RGContexts map[string]Context `json:"rgContexts"` }
type InventoryAppStats ¶
type InventoryAppStats struct { AppID uint64 `json:"appid"` Name string `json:"name"` AssetCount uint32 `json:"asset_count"` Icon string `json:"icon"` Link string `json:"link"` InventoryLogo string `json:"inventory_logo"` TradePermissions string `json:"trade_permissions"` Contexts map[string]*InventoryContext `json:"rgContexts"` }
type InventoryContext ¶
type InventoryItem ¶
type InventoryItem struct { AppID uint32 `json:"appid"` ContextID uint64 `json:"contextid"` AssetID uint64 `json:"id,string,omitempty"` ClassID uint64 `json:"classid,string,omitempty"` InstanceID uint64 `json:"instanceid,string,omitempty"` Amount uint64 `json:"amount,string"` Desc *EconItemDesc `json:"-"` /* May be nil */ }
Due to the JSON being string, etc... we cannot re-use EconItem Also, "assetid" is included as "id" not as assetid.
type Listing ¶
type Listing struct { ListingID string `json:"listingid"` TimeCreated uint64 `json:"time_created"` Asset Asset `json:"asset"` SteamIDLister string `json:"steamid_lister"` Price uint64 `json:"price"` OriginalPrice uint64 `json:"original_price"` Fee uint64 `json:"fee"` CurrencyID string `json:"currencyid"` ConvertedPrice uint64 `json:"converted_price"` ConvertedFee uint64 `json:"converted_fee"` ConvertedCurrencyID string `json:"converted_currencyid"` Status uint64 `json:"status"` Active uint64 `json:"active"` SteamFee uint64 `json:"steam_fee"` ConvertedSteamFee uint64 `json:"converted_steam_fee"` PublisherFee uint64 `json:"publisher_fee"` ConvertedPublisherFee uint64 `json:"converted_publisher_fee"` PublisherFeePercent string `json:"publisher_fee_percent"` PublisherFeeApp uint64 `json:"publisher_fee_app"` CancelReason uint64 `json:"cancel_reason"` ItemExpired uint64 `json:"item_expired"` OriginalAmountListed uint64 `json:"original_amount_listed"` OriginalPricePerUnit uint64 `json:"original_price_per_unit"` FeePerUnit uint64 `json:"fee_per_unit"` SteamFeePerUnit uint64 `json:"steam_fee_per_unit"` PublisherFeePerUnit uint64 `json:"publisher_fee_per_unit"` ConvertedPricePerUnit uint64 `json:"converted_price_per_unit"` ConvertedFeePerUnit uint64 `json:"converted_fee_per_unit"` ConvertedSteamFeePerUnit uint64 `json:"converted_steam_fee_per_unit"` ConvertedPublisherFeePerUnit uint64 `json:"converted_publisher_fee_per_unit"` TimeFinishHold uint64 `json:"time_finish_hold"` TimeCreatedStr string `json:"time_created_str"` }
type ListingItem ¶
type ListingItem struct { Success bool `json:"success"` PageSize uint64 `json:"pagesize"` TotalCount int `json:"total_count"` Start uint64 `json:"start"` NumActiveListings uint64 `json:"num_active_listings"` Assets map[string]map[string]map[string]Asset `json:"assets"` Listings []Listing `json:"listings"` ListingsOnHold []Listing `json:"listings_on_hold"` ListingsToConfirm []Listing `json:"listings_to_confirm"` BuyOrders []Listing `json:"buy_orders"` }
type LoginFinalized ¶
type LoginFinalized struct { SteamID SteamID `json:"steamID,string"` TransferInfo []TransferInfo `json:"transfer_info"` }
type MarketBuyOrderResponse ¶
type MarketItem ¶
type MarketItem struct { Name string `json:"name"` HashName string `json:"hash_name"` SellListings int `json:"sell_listings"` SellPrice int `json:"sell_price"` SellPriceText string `json:"sell_price_text"` AppIcon string `json:"app_icon"` AppName string `json:"app_name"` AssetDescription AssetDescription `json:"asset_description"` SalePriceText string `json:"sale_price_text"` }
type MarketItemPrice ¶
type MarketItemPriceOverview ¶
type MarketItemResponse ¶
type MarketSellResponse ¶
type OwnedGamesResponse ¶
type PhoneAPIResponse ¶
type PlayerBan ¶
type PlayerBan struct { SteamID uint64 `json:"SteamId,string"` CommunityBanned bool `json:"CommunityBanned"` VACBanned bool `json:"VACBanned"` NumberOfVACBans int `json:"NumberOfVACBans"` DaysSinceLastBan int `json:"DaysSinceLastBan"` NumberOfGameBans int `json:"NumberOfGameBans"` EconomyBan string `json:"EconomyBan"` }
type PlayerSummary ¶
type PlayerSummary struct { SteamID SteamID `json:"steamid,string"` VisibilityState uint32 `json:"communityvisibilitystate"` ProfileState uint32 `json:"profilestate"` PersonaName string `json:"personaname"` PersonaState uint32 `json:"personastate"` PersonaStateFlags uint32 `json:"personastateflags"` RealName string `json:"realname"` LastLogoff int64 `json:"lastlogoff"` ProfileURL string `json:"profileurl"` AvatarURL string `json:"avatar"` AvatarMediumURL string `json:"avatarmedium"` AvatarFullURL string `json:"avatarfull"` PrimaryClanID uint64 `json:"primaryclanid,string"` TimeCreated int64 `json:"timecreated"` LocCountryCode string `json:"loccountrycode"` LocStateCode string `json:"locstatecode"` LocCityID uint32 `json:"loccityid"` GameID uint64 `json:"gameid,string"` GameServerIP string `json:"gameserverip"` GameExtraInfo string `json:"gameextrainfo"` }
type SearchData ¶
type ServerTimeTip ¶
type ServerTimeTip struct { Time int64 `json:"server_time,string"` SkewToleranceSeconds uint32 `json:"skew_tolerance_seconds,string"` LargeTimeJink uint32 `json:"large_time_jink,string"` ProbeFrequencySeconds uint32 `json:"probe_frequency_seconds"` AdjustedTimeProbeFrequencySeconds uint32 `json:"adjusted_time_probe_frequency_seconds"` HintProbeFrequencySeconds uint32 `json:"hint_probe_frequency_seconds"` SyncTimeout uint32 `json:"sync_timeout"` TryAgainSeconds uint32 `json:"try_again_seconds"` MaxAttempts uint32 `json:"max_attempts"` }
func GetTimeTip ¶
func GetTimeTip() (*ServerTimeTip, error)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func NewSessionWithAPIKey ¶
func (*Session) AcceptConfirmation ¶
func (s *Session) AcceptConfirmation(identitySecret string) (*ConfirmationResponse, error)
func (*Session) AcceptTradeOffer ¶
func (*Session) AddPhoneNumber ¶
func (*Session) AnswerConfirmation ¶
func (session *Session) AnswerConfirmation(confirmation *Confirmation, identitySecret, answer string, current int64) error
func (*Session) CancelBuyOrder ¶
func (*Session) CancelTradeOffer ¶
func (*Session) ChatFriendState ¶
func (session *Session) ChatFriendState(sid SteamID) (*ChatFriendResponse, error)
func (*Session) ChatLog ¶
func (session *Session) ChatLog(partner uint32) ([]*ChatLogMessage, error)
func (*Session) ChatLogoff ¶
func (*Session) ChatPoll ¶
func (session *Session) ChatPoll(timeoutSeconds string) (*ChatResponse, error)
func (*Session) ChatSendMessage ¶
func (*Session) CleanPrice ¶
func (*Session) ConfirmRemovePhoneNumber ¶
func (*Session) DeclineTradeOffer ¶
func (*Session) DisableTwoFactor ¶
func (*Session) EnableTwoFactor ¶
func (session *Session) EnableTwoFactor() (*TwoFactorInfo, error)
func (*Session) FetchConfirmations ¶
func (s *Session) FetchConfirmations(identitySecret string) (*ConfirmationResponse, error)
func (*Session) FinalizeTwoFactor ¶
func (session *Session) FinalizeTwoFactor(authCode, mobileCode string) (*FinalizeTwoFactorInfo, error)
func (*Session) GetConfirmations ¶
func (session *Session) GetConfirmations(identitySecret string, current int64) ([]*Confirmation, error)
func (*Session) GetEscrow ¶
func (session *Session) GetEscrow(url string) (*EscrowSteamGuardInfo, error)
func (*Session) GetEscrowGuardInfo ¶
func (session *Session) GetEscrowGuardInfo(sid SteamID, token string) (*EscrowSteamGuardInfo, error)
func (*Session) GetEscrowGuardInfoForTrade ¶
func (session *Session) GetEscrowGuardInfoForTrade(offerID uint64) (*EscrowSteamGuardInfo, error)
func (*Session) GetFilterableInventory ¶
func (*Session) GetInventory ¶
func (session *Session) GetInventory(sid SteamID, appID, contextID uint64) ([]InventoryItem, error)
func (*Session) GetInventoryAppStats ¶
func (session *Session) GetInventoryAppStats(sid SteamID) (map[string]InventoryAppStats, error)
func (*Session) GetInventoryContext ¶
func (session *Session) GetInventoryContext(steamID string) (*SteamInventoryContext, error)
func (*Session) GetMarketItemPriceHistory ¶
func (session *Session) GetMarketItemPriceHistory(appID uint64, marketHashName string) ([]*MarketItemPrice, error)
func (*Session) GetMarketItemPriceOverview ¶
func (session *Session) GetMarketItemPriceOverview(appID uint64, country, currencyID, marketHashName string) (*MarketItemPriceOverview, error)
func (*Session) GetMarketItems ¶
func (s *Session) GetMarketItems(appid, start, perPage uint64) (*SteamMarketItems, error)
func (*Session) GetMyListingsItems ¶
func (session *Session) GetMyListingsItems(start, perPage uint64) (*ListingItem, error)
func (*Session) GetMyTradeToken ¶
func (*Session) GetOwnedGames ¶
func (*Session) GetPlayerBans ¶
func (*Session) GetPlayerSummaries ¶
func (session *Session) GetPlayerSummaries(steamids string) ([]*PlayerSummary, error)
func (*Session) GetProfileURL ¶
func (*Session) GetRequiredSteamAppVersion ¶
func (*Session) GetSteamID ¶
func (*Session) GetTradeOffer ¶
func (session *Session) GetTradeOffer(id uint64) (*TradeOffer, error)
func (*Session) GetTradeOffers ¶
func (*Session) GetTradeReceivedItems ¶
func (session *Session) GetTradeReceivedItems(receiptID uint64) ([]*InventoryItem, error)
func (*Session) GetWebAPIKey ¶
func (*Session) InitiateRemovePhoneNumber ¶
func (*Session) PlaceBuyOrder ¶
func (*Session) PrepareForSteamStore ¶
func (session *Session) PrepareForSteamStore()
func (*Session) ReSendVerificationCode ¶
func (*Session) RegisterWebAPIKey ¶
func (*Session) ResolveVanityURL ¶
func (*Session) RevokeWebAPIKey ¶
func (*Session) SellItem ¶
func (session *Session) SellItem(item *InventoryItem, amount, price uint64) (*MarketSellResponse, error)
func (*Session) SendConfirmationAjax ¶
func (s *Session) SendConfirmationAjax(conf *Confirmation, tag, is string) (*ConfirmationAcceptResponse, error)
func (*Session) SendTradeOffer ¶
func (session *Session) SendTradeOffer(offer *TradeOffer, sid SteamID, token string) error
func (*Session) SetLanguage ¶
func (*Session) SetProfileInfo ¶
func (*Session) SetProfilePrivacy ¶
func (*Session) SetupProfile ¶
func (*Session) ValidatePhoneNumber ¶
func (*Session) VerifyPhoneNumber ¶
type SteamID ¶
type SteamID uint64
* Full Steam 64-bit ID * Upper 32 bits Lower 32 bits * Upper 16 bits Lower 16 bits * Universe Type Acc Instance Account ID * |||| |||| xxxx |||| xxxx xx|| |||| |||| |||| |||| |||| |||| |||| |||| |||| ||||
func (*SteamID) GetAccountID ¶
func (*SteamID) GetAccountInstance ¶
func (*SteamID) GetAccountType ¶
func (*SteamID) GetAccountUniverse ¶
func (*SteamID) ParseDefaults ¶
func (*SteamID) ParseSteam2ID ¶
func (*SteamID) ParseSteam3ID ¶
func (*SteamID) ToSteam2ID ¶
func (*SteamID) ToSteam3ID ¶
type SteamInventoryContext ¶
type SteamInventoryContext map[string]GameContext
type SteamMarketItems ¶
type SteamMarketItems struct { Success bool `json:"success"` Start int `json:"start"` PageSize int `json:"pagesize"` TotalCount int `json:"total_count"` SearchData SearchData `json:"searchdata"` MarketItem []MarketItem `json:"results"` }
type SteamTime ¶
type SteamTime struct { ServerTime int64 `json:"server_time,string"` SkewToleranceSeconds int `json:"skew_tolerance_seconds,string"` LargeTimeJink int `json:"large_time_jink,string"` ProbeFrequencySeconds int `json:"probe_frequency_seconds"` AdjustedTimeProbeFrequencySeconds int `json:"adjusted_time_probe_frequency_seconds"` }
type SteamTimeResponse ¶
type SteamTimeResponse struct {
SteamTime *SteamTime `json:"response"`
}
type TradeOffer ¶
type TradeOffer struct { ID uint64 `json:"tradeofferid,string"` Partner uint32 `json:"accountid_other"` ReceiptID uint64 `json:"tradeid,string"` RecvItems []*EconItem `json:"items_to_receive"` SendItems []*EconItem `json:"items_to_give"` Message string `json:"message"` State uint8 `json:"trade_offer_state"` ConfirmationMethod uint8 `json:"confirmation_method"` Created int64 `json:"time_created"` Updated int64 `json:"time_updated"` Expires int64 `json:"expiration_time"` EscrowEndDate int64 `json:"escrow_end_date"` RealTime bool `json:"from_real_time_trade"` IsOurOffer bool `json:"is_our_offer"` }
func (*TradeOffer) Accept ¶
func (offer *TradeOffer) Accept(session *Session) error
func (*TradeOffer) Cancel ¶
func (offer *TradeOffer) Cancel(session *Session) error
type TradeOfferResponse ¶
type TradeOfferResponse struct { Offer *TradeOffer `json:"offer"` // GetTradeOffer SentOffers []*TradeOffer `json:"trade_offers_sent"` // GetTradeOffers ReceivedOffers []*TradeOffer `json:"trade_offers_received"` // GetTradeOffers Descriptions []*EconItemDesc `json:"descriptions"` // GetTradeOffers }
type TransferInfo ¶
type TransferInfo struct { URL string `json:"url"` Params TransferParam `json:"params"` }
type TransferParam ¶
type TwoFactorInfo ¶
type TwoFactorInfo struct { Status uint32 `json:"status"` IdentitySecret string `json:"identity_secret"` Secret1 string `json:"secret_1"` SerialNumber uint64 `json:"serial_number,string"` RevocationCode string `json:"revocation_code"` URI string `json:"uri"` ServerTime uint64 `json:"server_time,string"` TokenGID string `json:"token_gid"` }
Source Files
¶
Click to show internal directories.
Click to hide internal directories.