pse-podcast-synchronisation/pse-dashboard/src/api/gpodder.test.js
2024-06-27 12:11:14 +02:00

30 lines
655 B
JavaScript

import * as GPodder from './gpodder.js'
const user = new GPodder.GPodderUser({
username: "iam@not.real",
password: "12345678aB@"
});
console.log(user)
console.log(user.username, user.password);
GPodder.init({
baseURL: "http://localhost:8080",
throwHandler: err => err
})
async function testGPodder() {
const register = await GPodder.register(user);
console.log(register.status);
const login = await GPodder.login(user)
console.log(login.status, login.headers);
const response = await GPodder.getTitles();
const json = await response.text();
console.log(`${response.status} "${json}"`);
}
testGPodder();