HomePhabricator
Diffusion Comm 62e742612659

[lib] introduce fetchFarcasterChannelByName to neynar client class

Description

[lib] introduce fetchFarcasterChannelByName to neynar client class

Summary:
fetchFarcasterChannelByName is a function that given a farcaster channel name, will retreive the info for that channel. The reason for this function is that we want to validate the user input given to us from the TagUnfollowedFarcasterChannel screen and confirm that the user inputted a valid channel name.

If the user inputted a channel name that does not exist, fetchFarcasterChannelByName will return null

Neynar API docs: https://docs.neynar.com/reference/search-channels

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

Test Plan:
Used the neynar docs to confirm that fetchFarcasterChannelByName was getting the expected/same response as the docs.

Additionally confirmed that fetchFarcasterChannelByName when I inputted a channel name that does not exist on farcaster

Reviewers: ashoat, inka

Reviewed By: ashoat

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D11865

Details