MetaFetch class abstract final

Read Document and find all metadata tags to generate corresponded MetaInfo.

At the same time, it manages all MetaPropertyParser according to MetaPropertyParser.propertyNamePrefix and will be refer them for finding matched MetaPropertyParser.

Constructors

MetaFetch()
Create new instance of MetaFetch which dedicated from instance.
factory
MetaFetch.forTest()
A dedicated MetaFetch which replicate Client behaviours with mapped link in MockOgHrefClient.usesSample.
factory

Properties

allowRedirect bool
Allow MetaFetch fetch redirected Uri's metadata instead of provided one.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
isPrimaryPrefixEnabled bool
Determine does primaryPrefix is ready to uses.
no setter
primaryPrefix String?
Get which prefix of property will be overriden when parse.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deregister(String prefix) bool
Remove MetaPropertyParser with corresponded prefix.
fetchAllFromHttp(Uri url) Future<Map<String, MetaInfo>>
Fetch all MetaInfo from various protocols into a single Map.
fetchFromHttp(Uri url) Future<MetaInfo>
Retrive MetaInfo from HTTP request from url.
hasBeenRegistered(Object identifier) bool
Determine the identifier is registered or not.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(MetaPropertyParser parser) bool
Register parser into MetaFetch.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

disguiseUserAgent bool
Determine using user agent from web browser instead of userAgentString.
getter/setter pair
instance MetaFetch
Get current instance of MetaFetch.
getter/setter pair
timeout int
Retrive current preference of timeout.
no setter
userAgentString String
Retrive current preference of user agent String.
no setter

Static Methods

changeTimeout([int seconds = OgHrefClient.DEFAULT_TIMEOUT]) → void
Define timeout of response.
changeUserAgent([String userAgent = OgHrefClient.DEFAULT_USER_AGENT_STRING]) → void
Define a value of user agent when making request in fetchFromHttp.