1
0
Fork 0
peertube/shared/utils/videos/services.ts

24 lines
527 B
TypeScript
Raw Normal View History

2017-10-16 04:05:49 -04:00
import * as request from 'supertest'
function getOEmbed (url: string, oembedUrl: string, format?: string, maxHeight?: number, maxWidth?: number) {
const path = '/services/oembed'
const query = {
url: oembedUrl,
format,
maxheight: maxHeight,
maxwidth: maxWidth
}
return request(url)
.get(path)
.query(query)
.set('Accept', 'application/json')
.expect(200)
}
// ---------------------------------------------------------------------------
export {
getOEmbed
}