README examples didn't work as expected
LeetaoGoooo opened this issue · 1 comments
LeetaoGoooo commented
code
const RSS3 = require("rss3").default
const rss3 = new RSS3({
endpoint: 'https://rss3-hub-playground-6raed.ondigitalocean.app',
privateKey: '47e18d6c386898b424025cd9db446f779ef24ad33a26c499c87bb3d9372540ba',
});
rss3.profile.get().then(response => {
console.log(response)
}).catch(error => {
console.log('profile get:'+error)
})
rss3.profile.patch({
name: 'RSS3',
avatar: 'https://cloudflare-ipfs.com/ipfs/QmZWWSspbyFtWpLZtoAK35AjEYK75woNawqLgKC4DRpqxu',
bio: 'RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.',
}).then(repsonse =>{
console.log(repsonse)
}).catch(error => {
console.log('profile patch:'+error)
})
rss3.item.post({
title: 'Hello RSS3',
summary: 'RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.',
}).then(response=>{
console.log(response)
}).catch(error => {
console.log('item post:'+error)
})
rss3.persona.sync().then(response => {
console.log('persona sync response:'+response)
}).catch(error => {
console.log('perona sync:'+error)
})
output
profile patch:Error: Parameter error
persona sync response:undefined
item post:Incorrectly formatted content.
profile get:Incorrectly formatted content.
DIYgod commented
There is a problem with this persona data, there is no signature field in the profile, probably because it was created by an older version, please try creating a new user to test it.