1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Add pod list endpoint with pagination, sort...

This commit is contained in:
Chocobozzz 2017-10-19 09:43:01 +02:00
parent 9fd540562c
commit 8a02bd0433
No known key found for this signature in database
GPG key ID: 583A612D890159BE
19 changed files with 232 additions and 94 deletions

View file

@ -12,6 +12,19 @@ function getFriendsList (url: string) {
.expect('Content-Type', /json/)
}
function getPodsListPaginationAndSort (url: string, start: number, count: number, sort: string) {
const path = '/api/v1/pods/'
return request(url)
.get(path)
.query({ start })
.query({ count })
.query({ sort })
.set('Accept', 'application/json')
.expect(200)
.expect('Content-Type', /json/)
}
async function makeFriends (url: string, accessToken: string, expectedStatus = 204) {
// Which pod makes friends with which pod
const friendsMatrix = {
@ -85,5 +98,6 @@ export {
getFriendsList,
makeFriends,
quitFriends,
quitOneFriend
quitOneFriend,
getPodsListPaginationAndSort
}