API::StatusID
Inherits Struct < Value < Object
Encodes and decodes API status ids.
A status id is normally an ActivityPub::Object id. A reblog
wrapper, however, needs its own id distinct from the reblogged
object's id, so it encodes the ActivityPub::Activity::Announce
id with a reserved high bit set. The bit disambiguates the two
otherwise-overlapping namespaces while keeping the id a positive,
all-digit string.
Constants
REBLOG_FLAG = 1_i64 << 62
The reserved high bit marking an announce-derived (reblog) id.
Constructors
Encodes the id of an announce (reblog) as a wrapper id distinct from the reblogged object's id.
Class methods
decode(string : String) : Tuple(Symbol, Int64) | Nil
Decodes a wire id into its kind and internal id.
Returns {:announce, id} for a reblog wrapper id, {:object, id}
for a plain object id, or nil if the input is malformed or out
of range.
Instance methods
==(other : StatusID) : Bool
Source==(other : String) : Bool
Sourceto_json(*args, **options)
Sourceto_json(*args, **options, &)
Sourceto_s(*args, **options)
Sourceto_s(*args, **options, &)
Source