neynarxyz / nodejs-sdk

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

Add new `/v2/farcaster/feed/for_you` API to NodeJS SDK [NEYN-1882] #125

Closed tybook closed 3 months ago

tybook commented 3 months ago

https://github.com/neynarxyz/api/pull/517 https://github.com/neynarxyz/OAS/pull/145

kale5195 commented 3 months ago

Hi @tybook , the for-you api is not able to call from neynar-api-client, is this a bug?

tybook commented 3 months ago

Hi @tybook , the for-you api is not able to call from neynar-api-client, is this a bug?

Can you give more specifics on reproducing the problem?

kale5195 commented 3 months ago

@tybook I usually call the api like this way:

const neynarClient = new NeynarAPIClient(process.env.NEYNAR_API_KEY)

const res = await neynarClient.fetchFeed("following", {
          fid: fid,
          withRecasts: false,
          limit: PageSize,
          cursor: cursor,
        });

However, cannot find the feed-for-you api there.

tybook commented 3 months ago

@tybook I usually call the api like this way:

const neynarClient = new NeynarAPIClient(process.env.NEYNAR_API_KEY)

const res = await neynarClient.fetchFeed("following", {
          fid: fid,
          withRecasts: false,
          limit: PageSize,
          cursor: cursor,
        });

However, cannot find the feed-for-you api there.

This is fixed in v1.33.1 just released (see https://github.com/neynarxyz/nodejs-sdk/pull/126). So something like this should work now:

const res = await neynarClient.fetchFeedForYou(
    194, {
      limit: 5,
      cursor: undefined,
    });