Registers a new provider site. name is optional while url and api are required. If you specify the mangled url parameter like '*://www.flickr.com/' it will die with an error. You can call this method multiple times to add multiple oEmbed providers.

Given an URL it will try to find the correspondent provider based on their registered URL scheme, and then send the oEmbed request to the oEmbed provider endpoint and parse the response. The method returns an instance of Web::oEmbed::Response.

Returns undef if there's no provider found for the URL. Throws an error if there's an error in JSON/XML parsing etc. (Note: I don't like this interface because there's no cleaner way to handle and diagnose errors. This might be changed.)

format optional parameter specifies which format is sent to the provider as a prefered format parameter. When omitted, the default format parameter set in new is used. If it's not speciied in new either, the default will be json.

NOT IMPLEMENTED YET: When optional parameter discovery is set, the consumer will issue the HTTP request to the original URL to discover the oEmbed discovery tag described in the oEmbed spec chapter 4. If the oEmbed discovery tag is found in the HTML, it will then issue the oEmbed request against the provider.

Returns the HTML that you can use to display the embedded object. This method is an alias to html accessor if there is one in the response (i.e. video or rich), or creates an A tag to represent photo or rich response.

Currently if you register 100 providers, the embed method could potentially iterate through all of providers to run the regular expression, which doesn't sound good. I guess we could come up with some Trie-ish regexp solution that immediately returns the correspondent provider by compiling all regular expressions into one.