Hosts class
Hosts config.
- Annotations
Constructors
- Hosts()
-
Creates default hosts config.
const
-
Hosts.multiple({List<
ApiHost> api = defaultApiHosts, List<ImageHost> image = defaultImageHosts, List<ThumbnailHost> thumbnail = defaultThumbnailHosts}) - Creates a hosts config with multiple host of each type.
- Hosts.only({ApiHost api = defaultApiHost, ImageHost image = defaultImageHost, ThumbnailHost thumbnail = defaultThumbnailHost})
- Creates a hosts config with one host of each type.
Properties
- api → ApiHost
-
Preferred API host.
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
-
hosts
→ Map<
HostType, List< Host> > -
Hosts map.
final
- image → ImageHost
-
Preferred image host.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- thumbnail → ThumbnailHost
-
Preferred thumbnail host.
read-only
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
selectHost<
T extends Host> (HostType type, List< T> hosts) → T -
Returns preferred host of given
type
fromhosts
list. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator [](
HostType type) → Host -
Returns preferred host of given
type
.
Constants
- defaultApiHost → const ApiHost
-
Default API host.
ApiHost('nhentai.net')
-
defaultApiHosts
→ const List<
ApiHost> -
Default API hosts.
[defaultApiHost]
- defaultImageHost → const ImageHost
-
Default image host.
ImageHost('i.nhentai.net')
-
defaultImageHosts
→ const List<
ImageHost> -
Default image hosts.
[defaultImageHost, ImageHost('i2.nhentai.net'), ImageHost('i3.nhentai.net'), ImageHost('i5.nhentai.net'), ImageHost('i7.nhentai.net')]
- defaultThumbnailHost → const ThumbnailHost
-
Default thumbnail host.
ThumbnailHost('t.nhentai.net')
-
defaultThumbnailHosts
→ const List<
ThumbnailHost> -
Default thumbnail hosts.
[defaultThumbnailHost, ThumbnailHost('t2.nhentai.net'), ThumbnailHost('t3.nhentai.net'), ThumbnailHost('t5.nhentai.net'), ThumbnailHost('t7.nhentai.net')]