Page MenuHomePhabricator

[lib] introduce fetchFollowedFarcasterChannels to neynar client class
ClosedPublic

Authored by ginsu on Apr 17 2024, 10:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 7:28 PM
Unknown Object (File)
Nov 25 2024, 9:37 AM
Unknown Object (File)
Nov 25 2024, 6:51 AM
Unknown Object (File)
Nov 25 2024, 6:40 AM
Unknown Object (File)
Nov 25 2024, 6:39 AM
Unknown Object (File)
Nov 3 2024, 7:19 AM
Unknown Object (File)
Oct 12 2024, 9:39 PM
Unknown Object (File)
Oct 12 2024, 9:39 PM
Subscribers

Details

Summary

fetchFollowedFarcasterChannels is a function that given a user fid will retrieve all channels that the user follows on farcaster

Endpoint reference in neynar docs: https://docs.neynar.com/reference/user-channels

Linear task: https://linear.app/comm/issue/ENG-7465/add-the-user-channels-neynar-endpoint-to-our-neynar-api-client

Depends on D11675

Test Plan

Passed in my personal fid and confirmed that the results I got from this function match exactly what is shown on warpcast

my channels I follow on warpcast:

Screenshot 2024-04-17 at 1.55.54 PM.png (1×470 px, 89 KB)

results of fetchFollowedFarcasterChannels (intentionally only logged the channel name to make it easy to view all the results):

Screenshot 2024-04-17 at 1.57.28 PM.png (158×1 px, 24 KB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added inline comments.
lib/utils/neynar-client.js
22–26 ↗(On Diff #39187)

This type is a bit barebones atm, but figured we could always just extend this as we keep building

ginsu added reviewers: atul, inka.
ashoat added inline comments.
lib/utils/neynar-client.js
107 ↗(On Diff #39187)

I would just return FarcasterChannel[] here

140–142 ↗(On Diff #39187)

getMessageForException

This revision is now accepted and ready to land.Apr 17 2024, 3:29 PM
ginsu edited the summary of this revision. (Show Details)

address comments

This revision was landed with ongoing or failed builds.Apr 18 2024, 7:55 AM
This revision was automatically updated to reflect the committed changes.