1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

improve commentary

This commit is contained in:
Matthew Hodgson
2016-04-08 22:00:07 +01:00
parent 1ff1064295
commit 11e4760935

View File

@@ -1450,11 +1450,15 @@ MatrixClient.prototype.getCurrentUploads = function() {
};
/**
* Get a preview of the given URL as OpenGraph metadata.
* Get a preview of the given URL as of (roughly) the given point in time,
* described as an object with OpenGraph keys and associated values.
* Attributes may be synthesized where actual OG metadata is lacking.
* Caches results to prevent hammering the server.
* @param {string} url The URL to get preview data for
* @param {Number} ts The timestamp (ms since epoch) for querying
* historical preview data.
* @param {Number} ts The preferred point in time that the preview should
* describe (ms since epoch). The preview returned will either be the most
* recent one preceding this timestamp if available, or failing that the next
* most recent available preview.
* @param {module:client.callback} callback Optional.
* @return {module:client.Promise} Resolves: Object of OG metadata.
* @return {module:http-api.MatrixError} Rejects: with an error response.