Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(api): fetch up-to-date channels from neynar API #130

Merged
merged 1 commit into from
Dec 28, 2023

Conversation

stephancill
Copy link
Contributor

@stephancill stephancill commented Dec 19, 2023

Change Summary

Update api/farcaster/channels route to fetch channels list from Neynar API in the, which mirrors new Warpcast API and includes up-to-date permissionless channels.

Fixes #55
Fixes #126

Merge Checklist

  • PR has a changeset
  • PR includes documentation if necessary
  • PR updates the rich-embed examples if necessary
  • includes a parallel PR for Mod-starter and the gateway if necessary

Copy link

changeset-bot bot commented Dec 19, 2023

🦋 Changeset detected

Latest commit: 89a9672

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@mod-protocol/farcaster Patch
api Patch
@mod-protocol/core Patch
@mod-protocol/react-ui-shadcn Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 19, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
api ✅ Ready (Inspect) Visit Preview Dec 19, 2023 9:20am
docs ✅ Ready (Inspect) Visit Preview Dec 19, 2023 9:20am
example-nextjs-shadcn ✅ Ready (Inspect) Visit Preview Dec 19, 2023 9:20am

},
}
);
const result = await channelsRes.json();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should check this request succeeds before doing this and error if it does


export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url);
const q = searchParams.get("q");

const channelsRes = await fetch(
"https://api.neynar.com/v2/farcaster/channel/list",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do you feel about this re opencast? I know you wanted an external api-less solution for opencast

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since channels are basically warpcast-only at this stage there is no other option for the time being so this is the recommended method (see this thread with dan and rish https://warpcast.com/dwr.eth/0xaa065936)

@davidfurlong davidfurlong merged commit 6ae4441 into main Dec 28, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants