struct Steam::ID
- Steam::ID
- Struct
- Value
- Object
Overview
A Steam ID is an encoded 64 bit integer that contains various metadata about a Steam account.
A given ID does not uniquely identify an account,
as encoded IDs may be missing certain pieces of metadata if it was decoded
from certain formats (see Steam::ID::Format
for more info).
Defined in:
formatter.crmask.cr
parser.cr
steam_id.cr
Constant Summary
-
VERSION =
"0.2.0"
Constructors
-
.new(string : String, format : Format)
Parses a string as the given
Format
. -
.new(value : UInt64)
Create a Steam ID from a 64 bit value
-
.new(string : String)
Attempts to parse the given string as an ID of any of
Format
.
Instance Method Summary
-
#account_id(with_lowest_bit : Bool = false)
The account ID this
ID
represents -
#account_type
The
AccountType
thisID
represents -
#account_type=(new_value : AccountType)
Re-encodes this ID with an updated
AccountType
-
#instance
The instance of this account
-
#instance=(new_value : UInt64)
Re-encodes this ID with an updated instance value
-
#lowest_bit
The lowest bit value of this
ID
. - #to_s(format : Format = Format::Community64)
- #to_s(io : IO, format : Format = Format::Community64)
- #to_u64 : UInt64
- #universe
-
#universe=(new_value : Universe)
Re-encodes this ID with an updated
Universe
Constructor Detail
Attempts to parse the given string as an ID of any of Format
. Raises
Error
if no format parses well.