MetaFetch class 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()
Get a instance of MetaFetch.
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
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

buildMetaInfo(Document htmlDocument) MetaInfo
Construct MetaInfo with given Document.
deregister(String prefix) bool
Remove MetaPropertyParser with corresponded prefix.
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

userAgentString String
Define a value of user agent when making request in fetchFromHttp.
getter/setter pair

Static Methods

forTest() MetaFetch
A dedicated MetaFetch which ignore content type condition that allowing parse to HTML Document.

Constants

DEFAULT_USER_AGENT_STRING → const String
Default request user agent value.