Page MenuHomePhabricator

[lib] introduce fetchFollowedFarcasterChannels to neynar client class
ClosedPublic

Authored by ginsu on Wed, Apr 17, 10:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 29, 4:22 PM
Unknown Object (File)
Sat, Apr 27, 5:45 PM
Unknown Object (File)
Sat, Apr 27, 4:00 PM
Unknown Object (File)
Sat, Apr 27, 11:02 AM
Unknown Object (File)
Sat, Apr 27, 9:58 AM
Unknown Object (File)
Fri, Apr 26, 3:11 PM
Unknown Object (File)
Thu, Apr 25, 4:20 PM
Unknown Object (File)
Thu, Apr 18, 6:25 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
Lint Not Applicable
Unit
Tests Not Applicable

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.Wed, Apr 17, 3:29 PM
ginsu edited the summary of this revision. (Show Details)

address comments

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