ReadOnlyManager<T extends ManagedSnowflakeEntity<T>> class abstract

A Manager that provides only read access to the API.

Implementers

Constructors

ReadOnlyManager(CacheConfig<T> config, NyxxRest client, {required String identifier})
Create a new read-only manager.

Properties

cache Cache<T>
The cache for this manager.
final
client NyxxRest
The client this manager belongs to.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetch(Snowflake id) Future<T>
Fetch the item with the given id from the API.
get(Snowflake id) Future<T>
Get an item by its id from the cache if it exists, else fetch it from the API.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parse(Map<String, Object?> raw) → T
Parse the raw data received from the API into an instance of the type of this manager.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](Snowflake id) ManagedSnowflakeEntity<T>
Return a partial instance of the entity with ID id containing no data.