You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MementoEmbed shall support the link type as dictated in the oEmbed standard.
The oEmbed specification uses query parameters to specify behavior, and all arguments must be urlencoded. The spec also states providers are welcome to support custom additional parameters. MementoEmbed will support the following request parameters:
url - required by the oEmbed spec, the URI for which to create the embed
maxwidth - optional as per the oEmbed spec, the maximum width of the embedded resource, only applies to some resource types
maxheight - optional as per the oEmbed spec, the maximum height of the embedded resource, only applies to some resource types
format - optional as per the oEmbed spec, the required response format, typically json or xml
create_thumbnails - allows the user to specify yes or no in order to control the creation of thumbnails as part of the response
type - allows the user to request link or rich, with rich to be supported in a future release
The oEmbed specification provides for 4 embed types: photo, video, link, and rich. Neither photo nor video make sense for most mementos, which leaves link and rich.
rich requires supporting maxwidth and maxheight query string attributes, as mentioned in #100. Unfortunately, MementoEmbed's social cards do not currently support easy resizing to comply with rich. The link type allows MementoEmbed to expose "any generic embed data", permitting us to provide some oEmbed support while other work prepares MementoEmbed to support the additional requirements of the rich type.
The specification states:
Providers may optionally include any parameters not specified in this document (so long as they use the same key-value format) and consumers may choose to ignore these. Consumers must ignore parameters they do not understand.
Thus, we will add our own metadata to make MementoEmbed useful for those that want to generate their own formatted social cards.
Response parameters:
type - required by the oEmbed spec, to be set to link
version - required by the oEmbed spec, required to be set at 1.0
title - optional as per the oEmbed spec, will return the value of MementoSurrogate.title
author_name - optional as per the oEmbed spec, likely not available for most mementos so this will not be implemented
author_url - optional as per the oEmbed spec, likely not available for most mementos so this will not be implemented
provider_name - optional as per the oEmbed spec, the name of the resource provider, to be set to the upper-case archive domain name, as on the card
provider_url - optional as per the oEmbed spec, the URI of the archive
thumbnail_url - optional as per the oEmbed spec, the data URI for the thumbnail at a size conforming to maxwidth and maxheight
thumbnail_width - optional as per the oEmbed spec, the width of the thumbnail
thumbnail_height - optional as per the oEmbed spec, the height of the thumbnail
originalurl - the URI-R of the resource, as returned from MementoSurrogate.original_uri
original_favicon - the favicon of the original resource, as returned from MementoSurrogate.original_favicon
provider_favicon - the favicon of the archive, as returned by MementoSurrogate.archive_favicon
collection_url - the URI of the collection, if any, as returned by MementoSurrogate.collection_uri
collection_name - the name of the collection, if any, as returned by MementoSurrogate.collection_name
striking_image - the image provided on the social card, as returned by MementoSurrogate.striking_image
description - the text provided on the social card, as returned by MementoSurrogate.text_snippet
HTTP status codes:
200 - if all goes well
404 - if the given URI-M does not exist (from oEmbed spec) or does not refer to a memento, mimicking the behavior of other MementoEmbed services that implement Prefer
501 - if the consumer requests a response in a format other than xml or json (from oEmbed spec)
401 - this will not be implemented as it only applies to non-public resources (from oEmbed spec)
MementoEmbed shall support the
link
type as dictated in the oEmbed standard.The oEmbed specification uses query parameters to specify behavior, and all arguments must be urlencoded. The spec also states providers are welcome to support custom additional parameters. MementoEmbed will support the following request parameters:
url
- required by the oEmbed spec, the URI for which to create the embedmaxwidth
- optional as per the oEmbed spec, the maximum width of the embedded resource, only applies to some resource typesmaxheight
- optional as per the oEmbed spec, the maximum height of the embedded resource, only applies to some resource typesformat
- optional as per the oEmbed spec, the required response format, typicallyjson
orxml
create_thumbnails
- allows the user to specify yes or no in order to control the creation of thumbnails as part of the responsetype
- allows the user to requestlink
orrich
, withrich
to be supported in a future releaseThe oEmbed specification provides for 4 embed types:
photo
,video
,link
, andrich
. Neitherphoto
norvideo
make sense for most mementos, which leaveslink
andrich
.rich
requires supportingmaxwidth
andmaxheight
query string attributes, as mentioned in #100. Unfortunately, MementoEmbed's social cards do not currently support easy resizing to comply withrich
. Thelink
type allows MementoEmbed to expose "any generic embed data", permitting us to provide some oEmbed support while other work prepares MementoEmbed to support the additional requirements of therich
type.The specification states:
Thus, we will add our own metadata to make MementoEmbed useful for those that want to generate their own formatted social cards.
Response parameters:
type
- required by the oEmbed spec, to be set tolink
version
- required by the oEmbed spec, required to be set at1.0
title
- optional as per the oEmbed spec, will return the value ofMementoSurrogate.title
author_name
- optional as per the oEmbed spec, likely not available for most mementos so this will not be implementedauthor_url
- optional as per the oEmbed spec, likely not available for most mementos so this will not be implementedprovider_name
- optional as per the oEmbed spec, the name of the resource provider, to be set to the upper-case archive domain name, as on the cardprovider_url
- optional as per the oEmbed spec, the URI of the archivethumbnail_url
- optional as per the oEmbed spec, the data URI for the thumbnail at a size conforming tomaxwidth
andmaxheight
thumbnail_width
- optional as per the oEmbed spec, the width of the thumbnailthumbnail_height
- optional as per the oEmbed spec, the height of the thumbnailoriginalurl
- the URI-R of the resource, as returned fromMementoSurrogate.original_uri
original_favicon
- the favicon of the original resource, as returned fromMementoSurrogate.original_favicon
provider_favicon
- the favicon of the archive, as returned byMementoSurrogate.archive_favicon
collection_url
- the URI of the collection, if any, as returned byMementoSurrogate.collection_uri
collection_name
- the name of the collection, if any, as returned byMementoSurrogate.collection_name
striking_image
- the image provided on the social card, as returned byMementoSurrogate.striking_image
description
- the text provided on the social card, as returned byMementoSurrogate.text_snippet
HTTP status codes:
200
- if all goes well404
- if the given URI-M does not exist (from oEmbed spec) or does not refer to a memento, mimicking the behavior of other MementoEmbed services that implementPrefer
501
- if the consumer requests a response in a format other than xml or json (from oEmbed spec)401
- this will not be implemented as it only applies to non-public resources (from oEmbed spec)400
- if the consumer requests an embed using an invalid set of properties, see Ensure social card produced by oEmbed endpoint is compliant with size standards #100 for discussion, also currently the behavior for the MementoEmbed services that implementPrefer
500
- if the consumer requests an embed and MementoEmbed fails internally - currently the behavior for the MementoEmbed services that implementPrefer
502
- if there was an issue connecting to the archive - currently the behavior for the MementoEmbed services that implementPrefer
504
- if the connection to the archive timed out - currently the behavior for the MementoEmbed services that implementPrefer
This issue will take the place of #100 and #101. Those issues will be closed. This issue will encompass all initial oEmbed work.
As MementoEmbed was developed with oEmbed in mind, much of the work for this is already done. It just needs to be brought together.
The text was updated successfully, but these errors were encountered: