Package com.attribyte.parser.model
Class OEmbedProvider.Endpoint
java.lang.Object
com.attribyte.parser.model.OEmbedProvider.Endpoint
- Enclosing class:
OEmbedProvider
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
patterns
A list of patterns for each scheme. -
schemes
The immutable list of schemes. -
url
The endpoint URL.
-
-
Constructor Details
-
Endpoint
Creates an endpoint.- Parameters:
url- The endpoint URL.schemes- The collection of schemes.
-
-
Method Details
-
toString
-
buildRequestURL
Creates the oembed request URL.- Parameters:
url- The input URL (should match one of the patterns).format- The format, e.g. json.- Returns:
- The oembed URL.
- Throws:
MalformedURLException- If URL is invalid.
-
matches
Determine if a URL matches any of the supported schemes.- Parameters:
url- The URL.- Returns:
- Does this endpoint support the URL?
-