-
Notifications
You must be signed in to change notification settings - Fork 11
API oembed
Manuel Strehl edited this page Dec 15, 2015
·
1 revision
Template for this request:
http://codepoints.net/api/v1/oembed{?url}{?format*}{?maxwidth*}{?maxheight*}
This is Codepoint.net’s oEmbed endpoint. oEmbed is a specification to allow turning URLs in rich representations, e. g., Youtube URLs to embedded videos. It is mainly used by WordPress.
The url parameter must match ^https://codepoints.net/.*. The format can
be either json or xml. The dimensions of the response can be controlled
with maxwidth and maxheight (unitless, in CSS pixel).
The response is JSON or XML according to the oEmbed specification. It contains
the type rich and as html an iframe embed for the requested codepoint
page. Example:
{
"type": "rich",
"version": "1.0",
"title": "U+00E4 LATIN SMALL LETTER A WITH DIAERESIS",
"author_url": "http://codepoints.net/",
"provider_name": "Codepoints.net",
"provider_url": "http://codepoints.net/",
"cache_age": 604800,
"thumbnail_url": "http://codepoints.net/api/v1/glyph/00E4",
"html": "<iframe src=\"http://codepoints.net/U+00E4?embed\" style=\"width: 640px; height: 640px; border: 1px solid #444;\"></iframe>",
"width": 640,
"height": 640
}- 400 Bad Request: When the
urlparameter is missing. - 404 Not Found: When the
urlparameter cannot be resolved to a matching URL. - 501 Not Implemented: When
formatis neitherjsonnorxml(but is set).