opengraph_fetch library
This library provides metadata parsers and utility functions for retrieving and parsing documents from a URL.
OpengraphParser and HtmlMetaParser are metadata parsers that take in a dom.Document
Utility functions opengraph_fetch and opengraph_fetch_raw help retrieving and decoding documents.
Classes
- FaviconParser
-
Extracts the favicon declared by a
Documenthead. - HtmlMetaParser
-
Takes a
Documentand parses OpengraphMetadata from<meta>,<title>and<img>tags - JsonLdParser
-
Takes a
Documentand parses OpengraphMetadata fromjson-lddata in<script> - OpengraphCache
- In-memory cache for opengraph_fetch results.
- OpengraphFetch
- OpengraphMetadata
- Container class for Metadata
- OpengraphMetadataAdapter
- Adapter to convert between OpengraphMetadata and OpenGraphEntity
- OpengraphMetadataParser
-
Does Works with
BaseOpengraphParser - OpengraphParser
-
Takes a
Documentand parses OpengraphMetadata from<meta property='og:*'>tags - TwitterCardParser
-
Takes a
Documentand parses OpengraphMetadata from<meta property='twitter:*'>tags
Mixins
Functions
-
opengraph_fetch(
String url, {bool throwOnError = false, Map< String, String> ? headers, Duration? maxAge}) → Future<OpenGraphEntity?> - Fetch OpenGraph data from a URL and return it as an OpenGraphEntity
-
opengraph_fetch_raw(
String url) → Future - Fetch OpenGraph data from a URL and return the raw metadata