2017-12-24 09:28:48 +00:00
|
|
|
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
|
var helpers_1 = require("./helpers");
|
|
|
|
var MatrixLiteClient = /** @class */ (function () {
|
|
|
|
function MatrixLiteClient(homeserverName, accessToken) {
|
|
|
|
this.homeserverName = homeserverName;
|
|
|
|
this.accessToken = accessToken;
|
2017-05-27 05:08:24 +00:00
|
|
|
}
|
2017-12-24 09:28:48 +00:00
|
|
|
MatrixLiteClient.prototype.getUrlPreview = function (url) {
|
|
|
|
return helpers_1.doFederatedApiCall("GET", this.homeserverName, "/_matrix/media/r0/preview_url", { access_token: this.accessToken, url: url }).then(function (response) {
|
|
|
|
return response;
|
2017-05-27 05:08:24 +00:00
|
|
|
});
|
2017-12-24 09:28:48 +00:00
|
|
|
};
|
|
|
|
return MatrixLiteClient;
|
|
|
|
}());
|
|
|
|
exports.MatrixLiteClient = MatrixLiteClient;
|
|
|
|
//# sourceMappingURL=MatrixLiteClient.js.map
|