neynarxyz / nodejs-sdk

Typescript SDK for Neynar APIs
https://neynar.com
MIT License
50 stars 10 forks source link

set up new lookupneynar frame and cast and user viewerfid #121

Closed MrKevinOConnell closed 3 months ago

MrKevinOConnell commented 3 months ago

merge this first: https://github.com/neynarxyz/nodejs-sdk/pull/120

fetchUserReactions -> https://docs.neynar.com/reference/reactions-user

fetchCastReactions -> https://docs.neynar.com/reference/reactions-cast both take in a viewerFid now

lookupNeynarFrame -> https://docs.neynar.com/reference/lookup-neynar-frame takes in an identifier and type now (wasn't sure how else to update without it being breaking)

fetchSubscribersForFid -> https://docs.neynar.com/reference/subscribers-1 now uses SubscriptionProviders instead of SubscriptionProvider

misc: fetchSubscribersForFid -> https://docs.neynar.com/reference/subscribers-1

tests:

// single query let neynarFrame = await client.lookupNeynarFrame("d2b000a7-f804-4a00-9738-0aead7381797",{ type: FrameType.Uuid, }) console.log(neynarFrame)

returns

Screenshot 2024-06-18 at 3 35 41 PM

let neynarFrame = await client.lookupNeynarFrame("https://frames.neynar.com/f/d2b000a7/b06cee80",{ type: FrameType.Url, }) console.log(neynarFrame)

returns

Screenshot 2024-06-18 at 3 36 07 PM