struct

Steam::ID

Inherits Struct < Value < Object

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).

Constants

VERSION = "0.2.0"

Constructors

new(string : String, format : Format)

Parses a string as the given Format. Raises Error if parsing fails.

Source
new(value : UInt64)

Create a Steam ID from a 64 bit value

Source
new(string : String)

Attempts to parse the given string as an ID of any of Format. Raises Error if no format parses well.

Source

Instance methods

account_id(with_lowest_bit : Bool = false)

The account ID this ID represents

Source
account_type

The AccountType this ID represents

Source
account_type=(new_value : AccountType)

Re-encodes this ID with an updated AccountType

Source
instance

The instance of this account

Source
instance=(new_value : UInt64)

Re-encodes this ID with an updated instance value

Source
lowest_bit

The lowest bit value of this ID. Used for encoding an ID into a string of a given Format

Source
to_s(format : Format = Format::Community64)

Serializes this ID as the given Format

Source
to_s(io : IO, format : Format = Format::Community64)

Serializes this ID as the given Format, writing to the given IO

Source
to_u64
Source
universe

The Universe this ID belongs to

Source
universe=(new_value : Universe)

Re-encodes this ID with an updated Universe

Source

Nested types