
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
JavaScript SDK for RSS3-Hub
npm install rss3 --save
or
yarn add rss3
import RSS3 from 'rss3';
or
const RSS3 = require('rss3').default;
new RSS3(options: {
endpoint: string; // RSS3 Hub Address
privateKey?: string; // Persona's private key, a new persona will be created if it is empty
})
Example:
const rss3 = new RSS3({
endpoint: 'https://rss3-hub-playground-6raed.ondigitalocean.app',
privateKey: '0x47e18d6c386898b424025cd9db446f779ef24ad33a26c499c87bb3d9372540ba',
});
persona.privateKey
persona.privateKey: string
Example:
const privateKey = rss3.persona.privateKey;
persona.id
persona.id: string
Example:
const id = rss3.persona.id;
persona.sync()
Please note that changes will only be synced to the node after persona.sync()
is successfully executed
persona.sync(): string[]
Example:
const changedFiles = rss3.persona.sync();
persona.raw()
persona.raw(fileID: string = persona.id): Promise<RSS3IContent>x
Example:
const file = await rss3.persona.raw();
profile.get()
profile.get(personaID: string = persona.id): Promise<RSS3Profile>
Example:
const profile = rss3.profile.get();
profile.patch()
profile.patch(profile: RSS3Profile): Promise<RSS3Profile>
Example:
const newProfile = await 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.',
});
items.get()
items.get(fileID: string = persona.id): Promise<{
items: RSS3Item[],
items_next?: string,
}>
Example:
const list1 = await rss3.items.get();
const items1 = list1.items;
const list2 = await rss3.items.get(list1.items_next);
const items2 = list2.items;
item.get
item.get(itemID: string): Promise<RSS3Item>
Example:
const item = await rss3.item.get('0x47e18d6c386898b424025cd9db446f779ef24ad33a26c499c87bb3d9372540ba-item-0');
item.post
item.post(item: RSS3ItemInput): Promise<RSS3ItemInput>
Example:
const item = await rss3.item.post({
title: 'Hello RSS3',
summary: 'RSS3 is an open protocol designed for content and social networks in the Web 3.0 era.',
});
item.patch
item.patch(item: RSS3ItemInput): Promise<RSS3ItemInput>
Example:
const newItem = await rss3.item.patch({
title: 'Hi RSS3',
});
FAQs
RSS3 SDK for JavaScript
We found that rss3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.