Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/whatrocks/farcaster-feed
Farcaster-feed is a Farcaster protocol syndication tool for Node.js
https://github.com/whatrocks/farcaster-feed
Last synced: 9 days ago
JSON representation
Farcaster-feed is a Farcaster protocol syndication tool for Node.js
- Host: GitHub
- URL: https://github.com/whatrocks/farcaster-feed
- Owner: whatrocks
- License: mit
- Created: 2022-03-22T13:34:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-28T03:03:36.000Z (about 2 years ago)
- Last Synced: 2024-11-28T21:35:43.929Z (14 days ago)
- Language: TypeScript
- Homepage:
- Size: 131 KB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-farcaster - whatrocks/farcaster-feed
README
# farcaster-feed
![NPM](https://img.shields.io/npm/l/farcaster-feed?no-cache)
![NPM](https://img.shields.io/npm/v/farcaster-feed?no-cache)Farcaster-feed is a [Farcaster](https://farcaster.xyz) protocol syndication tool for Node.js.
The library will cast "new" items for a given Farcaster user. The intended use case is with static site generators - similar to RSS feed generation, this library will auto-cast new posts.
## Install
```bash
npm install --save farcaster-feed
```## Usage
You will need a Farcaster username (and its corresponding [private key](https://farcasterxyz.notion.site/Find-your-Farcaster-private-key-c409a0c2b036467d8f5172ff8df3bc9d)).
```javascript
import { FarcasterFeed } from "farcaster-feed";const username = "whatrocks";
const mnemonic = "words words wordzzz";
const farcaster = new FarcasterFeed(username, mnemonic);
const blogPosts = [
{
title: "Example.com",
url: "https://example.com",
otherContent: "ignored for now!",
},
{
title: "Charlie Harrington's Website",
url: "https://charlieharrington.com",
otherContent: "interesting stuff, ignored for now!",
}
];
const casts = blogPosts.map(({title, url, ...rest}) => ({ title, url }));
farcaster.castPosts(casts);
```## Update NPM
```
npm version
git push —-tags origin main
npm publish
```