From 120c9fa06875ac36efb2adfd820ca04a2feaef39 Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 11:12:59 -0700 Subject: [PATCH 01/11] validate changes and misc --- src/neynar-api/neynar-api-client.ts | 4 +- src/neynar-api/v2/client.ts | 7 +- .../.openapi-generator/FILES | 3 + .../v2/openapi-farcaster/apis/channel-api.ts | 6 +- .../v2/openapi-farcaster/apis/user-api.ts | 10 +-- .../models/authorization-url-response-type.ts | 5 +- .../cast-with-interactions-all-of-channel.ts | 32 ++++++++++ .../models/cast-with-interactions-all-of.ts | 9 +++ ...ast-with-interactions-and-conversations.ts | 3 + .../models/cast-with-interactions.ts | 3 + .../models/channel-activity.ts | 64 +++++++++++++++++++ .../v2/openapi-farcaster/models/channel.ts | 6 ++ .../v2/openapi-farcaster/models/index.ts | 3 + .../models/trending-channel-response.ts | 42 ++++++++++++ .../models/user-viewer-context.ts | 2 +- .../v2/openapi-farcaster/models/user.ts | 4 +- .../models/validate-frame-request.ts | 6 ++ src/oas | 2 +- 18 files changed, 197 insertions(+), 14 deletions(-) create mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts create mode 100644 src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index 4f43480b..596d895a 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -51,6 +51,7 @@ import { FrameValidateListResponse, AuthorizationUrlResponse, AuthorizationUrlResponseType, + TrendingChannelResponse, } from "./v2/openapi-farcaster"; import { @@ -2151,7 +2152,7 @@ export class NeynarAPIClient { limit?: number; cursor?: string; } - ): Promise { + ): Promise { return await this.clients.v2.fetchTrendingChannels(timeWindow, options); } @@ -2497,6 +2498,7 @@ export class NeynarAPIClient { castReactionContext?: boolean; followContext?: boolean; signerContext?: boolean; + channelFollowContext?: boolean; } ): Promise { return await this.clients.v2.validateFrameAction( diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index 0dc21e1b..509c66f7 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -65,6 +65,7 @@ import { FrameValidateAnalyticsResponse, AuthorizationUrlResponse, AuthorizationUrlResponseType, + TrendingChannelResponse, } from "./openapi-farcaster"; import axios, { AxiosError, AxiosInstance } from "axios"; import { silentLogger, Logger } from "../common/logger"; @@ -1896,7 +1897,7 @@ export class NeynarV2APIClient { limit?: number; cursor?: string; } - ): Promise { + ): Promise { const response = await this.apis.channel.trendingChannels( this.apiKey, timeWindow, @@ -2264,6 +2265,7 @@ export class NeynarV2APIClient { castReactionContext?: boolean; followContext?: boolean; signerContext?: boolean; + channelFollowContext?: boolean; } ): Promise { const reqBody: ValidateFrameRequest = { @@ -2277,6 +2279,9 @@ export class NeynarV2APIClient { ...(typeof options?.signerContext !== "undefined" && { signer_context: options?.signerContext, }), + ...(typeof options?.channelFollowContext !== "undefined" && { + channel_follow_context: options?.channelFollowContext, + }), }; const response = await this.apis.frame.validateFrame(this.apiKey, reqBody); diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 8ba8704f..2f82a51d 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -33,6 +33,7 @@ models/cast-param-type.ts models/cast-parent-author-all-of.ts models/cast-parent-author.ts models/cast-response.ts +models/cast-with-interactions-all-of-channel.ts models/cast-with-interactions-all-of.ts models/cast-with-interactions-and-conversations.ts models/cast-with-interactions-reactions.ts @@ -41,6 +42,7 @@ models/cast-with-interactions.ts models/cast.ts models/casts-response-result.ts models/casts-response.ts +models/channel-activity.ts models/channel-list-response.ts models/channel-response.ts models/channel-viewer-context.ts @@ -128,6 +130,7 @@ models/storage-allocation.ts models/storage-allocations-response.ts models/storage-object.ts models/storage-usage-response.ts +models/trending-channel-response.ts models/update-user-req-body.ts models/user-dehydrated.ts models/user-fidresponse.ts diff --git a/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts index 8a027f24..820c85c2 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/channel-api.ts @@ -28,6 +28,8 @@ import { ChannelResponse } from '../models'; // @ts-ignore import { ErrorRes } from '../models'; // @ts-ignore +import { TrendingChannelResponse } from '../models'; +// @ts-ignore import { UsersActiveChannelsResponse } from '../models'; // @ts-ignore import { UsersResponse } from '../models'; @@ -571,7 +573,7 @@ export const ChannelApiFp = function(configuration?: Configuration) { * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async trendingChannels(apiKey: string, timeWindow?: '1d' | '7d' | '30d', limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + async trendingChannels(apiKey: string, timeWindow?: '1d' | '7d' | '30d', limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.trendingChannels(apiKey, timeWindow, limit, cursor, options); return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); }, @@ -687,7 +689,7 @@ export const ChannelApiFactory = function (configuration?: Configuration, basePa * @param {*} [options] Override http request option. * @throws {RequiredError} */ - trendingChannels(apiKey: string, timeWindow?: '1d' | '7d' | '30d', limit?: number, cursor?: string, options?: any): AxiosPromise { + trendingChannels(apiKey: string, timeWindow?: '1d' | '7d' | '30d', limit?: number, cursor?: string, options?: any): AxiosPromise { return localVarFp.trendingChannels(apiKey, timeWindow, limit, cursor, options).then((request) => request(axios, basePath)); }, /** diff --git a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts index 370b34ec..ea505c41 100644 --- a/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts +++ b/src/neynar-api/v2/openapi-farcaster/apis/user-api.ts @@ -22,7 +22,7 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base'; // @ts-ignore -import { AddVerificationReqBody } from '../models'; +import { AddVerificationReqBody } from '../models'; // @ts-ignore import { AuthorizationUrlResponse } from '../models'; // @ts-ignore @@ -199,11 +199,11 @@ export const UserApiAxiosParamCreator = function (configuration?: Configuration) * @summary Fetch authorization url * @param {string} apiKey API key required for authentication. * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * @param {AuthorizationUrlResponseType} responseType * @param {*} [options] Override http request option. * @throws {RequiredError} */ - fetchAuthorizationUrl: async (apiKey: string, clientId: string, responseType: AuthorizationUrlResponseType , options: AxiosRequestConfig = {}): Promise => { + fetchAuthorizationUrl: async (apiKey: string, clientId: string, responseType: AuthorizationUrlResponseType, options: AxiosRequestConfig = {}): Promise => { // verify required parameter 'apiKey' is not null or undefined assertParamExists('fetchAuthorizationUrl', 'apiKey', apiKey) // verify required parameter 'clientId' is not null or undefined @@ -754,7 +754,7 @@ export const UserApiFp = function(configuration?: Configuration) { * @summary Fetch authorization url * @param {string} apiKey API key required for authentication. * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * @param {AuthorizationUrlResponseType} responseType * @param {*} [options] Override http request option. * @throws {RequiredError} */ @@ -936,7 +936,7 @@ export const UserApiFactory = function (configuration?: Configuration, basePath? * @summary Fetch authorization url * @param {string} apiKey API key required for authentication. * @param {string} clientId - * @param {AuthorizationUrlResponseType} responseType + * @param {AuthorizationUrlResponseType} responseType * @param {*} [options] Override http request option. * @throws {RequiredError} */ diff --git a/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts b/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts index 78d18344..82e1f92d 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/authorization-url-response-type.ts @@ -24,4 +24,7 @@ export const AuthorizationUrlResponseType = { Code: 'code' } as const; -export type AuthorizationUrlResponseType = typeof AuthorizationUrlResponseType[keyof typeof AuthorizationUrlResponseType]; \ No newline at end of file +export type AuthorizationUrlResponseType = typeof AuthorizationUrlResponseType[keyof typeof AuthorizationUrlResponseType]; + + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts new file mode 100644 index 00000000..ce976ee0 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts @@ -0,0 +1,32 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore +import { ChannelViewerContext } from './channel-viewer-context'; +// May contain unused imports in some cases +// @ts-ignore +import { User } from './user'; + +/** + * @type CastWithInteractionsAllOfChannel + * @export + */ +export type CastWithInteractionsAllOfChannel = Channel; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts index c5870b17..5da3d8bd 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts @@ -13,6 +13,9 @@ */ +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractionsAllOfChannel } from './cast-with-interactions-all-of-channel'; // May contain unused imports in some cases // @ts-ignore import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; @@ -62,5 +65,11 @@ export interface CastWithInteractionsAllOf { * @memberof CastWithInteractionsAllOf */ 'mentioned_profiles': Array; + /** + * + * @type {CastWithInteractionsAllOfChannel} + * @memberof CastWithInteractionsAllOf + */ + 'channel'?: CastWithInteractionsAllOfChannel; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts index 4824f89f..5c9b1f36 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts @@ -24,6 +24,9 @@ import { CastParentAuthor } from './cast-parent-author'; import { CastWithInteractions } from './cast-with-interactions'; // May contain unused imports in some cases // @ts-ignore +import { CastWithInteractionsAllOfChannel } from './cast-with-interactions-all-of-channel'; +// May contain unused imports in some cases +// @ts-ignore import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; // May contain unused imports in some cases // @ts-ignore diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts index a9f8a0d8..add762eb 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts @@ -27,6 +27,9 @@ import { CastParentAuthor } from './cast-parent-author'; import { CastWithInteractionsAllOf } from './cast-with-interactions-all-of'; // May contain unused imports in some cases // @ts-ignore +import { CastWithInteractionsAllOfChannel } from './cast-with-interactions-all-of-channel'; +// May contain unused imports in some cases +// @ts-ignore import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; // May contain unused imports in some cases // @ts-ignore diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts b/src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts new file mode 100644 index 00000000..29aa3c12 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/channel-activity.ts @@ -0,0 +1,64 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { Channel } from './channel'; + +/** + * + * @export + * @interface ChannelActivity + */ +export interface ChannelActivity { + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'object': ChannelActivityObjectEnum; + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'cast_count_1d': string; + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'cast_count_7d': string; + /** + * + * @type {string} + * @memberof ChannelActivity + */ + 'cast_count_30d': string; + /** + * + * @type {Channel} + * @memberof ChannelActivity + */ + 'channel': Channel; +} + +export const ChannelActivityObjectEnum = { + ChannelActivity: 'channel_activity' +} as const; + +export type ChannelActivityObjectEnum = typeof ChannelActivityObjectEnum[keyof typeof ChannelActivityObjectEnum]; + + diff --git a/src/neynar-api/v2/openapi-farcaster/models/channel.ts b/src/neynar-api/v2/openapi-farcaster/models/channel.ts index 0d9ad55d..56370eb5 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/channel.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/channel.ts @@ -74,6 +74,12 @@ export interface Channel { * @memberof Channel */ 'image_url'?: string; + /** + * + * @type {string} + * @memberof Channel + */ + 'parent_url'?: string; /** * * @type {User} diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index 4085a666..2a77da72 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -15,12 +15,14 @@ export * from './cast-parent-author-all-of'; export * from './cast-response'; export * from './cast-with-interactions'; export * from './cast-with-interactions-all-of'; +export * from './cast-with-interactions-all-of-channel'; export * from './cast-with-interactions-and-conversations'; export * from './cast-with-interactions-reactions'; export * from './cast-with-interactions-replies'; export * from './casts-response'; export * from './casts-response-result'; export * from './channel'; +export * from './channel-activity'; export * from './channel-list-response'; export * from './channel-response'; export * from './channel-viewer-context'; @@ -106,6 +108,7 @@ export * from './storage-allocation'; export * from './storage-allocations-response'; export * from './storage-object'; export * from './storage-usage-response'; +export * from './trending-channel-response'; export * from './update-user-req-body'; export * from './user'; export * from './user-dehydrated'; diff --git a/src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts b/src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts new file mode 100644 index 00000000..eb9d6363 --- /dev/null +++ b/src/neynar-api/v2/openapi-farcaster/models/trending-channel-response.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Farcaster API V2 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +// May contain unused imports in some cases +// @ts-ignore +import { ChannelActivity } from './channel-activity'; +// May contain unused imports in some cases +// @ts-ignore +import { NextCursor } from './next-cursor'; + +/** + * + * @export + * @interface TrendingChannelResponse + */ +export interface TrendingChannelResponse { + /** + * + * @type {Array} + * @memberof TrendingChannelResponse + */ + 'channels': Array; + /** + * + * @type {NextCursor} + * @memberof TrendingChannelResponse + */ + 'next': NextCursor; +} + diff --git a/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts b/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts index 999f4291..05d44b54 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/user-viewer-context.ts @@ -15,7 +15,7 @@ /** - * + * Adds context on the viewer\'s follow relationship with the user. * @export * @interface UserViewerContext */ diff --git a/src/neynar-api/v2/openapi-farcaster/models/user.ts b/src/neynar-api/v2/openapi-farcaster/models/user.ts index 6049ffc0..ac2e6d16 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/user.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/user.ts @@ -55,7 +55,7 @@ export interface User { * @type {string} * @memberof User */ - 'display_name': string; + 'display_name'?: string; /** * Ethereum address * @type {string} @@ -67,7 +67,7 @@ export interface User { * @type {string} * @memberof User */ - 'pfp_url': string; + 'pfp_url'?: string; /** * * @type {UserProfile} diff --git a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts index 30911867..1c02f8e5 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/validate-frame-request.ts @@ -44,5 +44,11 @@ export interface ValidateFrameRequest { * @memberof ValidateFrameRequest */ 'signer_context'?: boolean; + /** + * Adds viewer_context inside the cast object to indicate whether the interactor reacted to the cast housing the frame. + * @type {boolean} + * @memberof ValidateFrameRequest + */ + 'channel_follow_context'?: boolean; } diff --git a/src/oas b/src/oas index 6d40afae..d9faa97d 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit 6d40afaef8e75beabdff88cfd407d909f44ddba1 +Subproject commit d9faa97d661424d54c162f09b6565e2dc21a8c25 From 2aa736fa5a6221a7228be8d1d2e9024b68ce5d92 Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 11:16:54 -0700 Subject: [PATCH 02/11] Update neynar-api-client.ts --- src/neynar-api/neynar-api-client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index 596d895a..e152aedc 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -2133,7 +2133,7 @@ export class NeynarAPIClient { * @param {string} [options.cursor] - Pagination cursor for the next set of results. * Omit this parameter for the initial request to start from the first page. * - * @returns {Promise} A promise that resolves to a `ChannelListResponse` object, + * @returns {Promise} A promise that resolves to a `ChannelListResponse` object, * containing a list of trending channels based on the specified time window. * * @example From af765fbbf52171c3e32e3717b3bcf045bbaaecbf Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 11:19:33 -0700 Subject: [PATCH 03/11] update type --- src/neynar-api/v2/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index 509c66f7..a6dd31bb 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -1878,7 +1878,7 @@ export class NeynarV2APIClient { * @param {string} [options.cursor] - Pagination cursor for the next set of results. * Omit this parameter for the initial request to start from the first page. * - * @returns {Promise} A promise that resolves to a `ChannelListResponse` object, + * @returns {Promise} A promise that resolves to a `ChannelListResponse` object, * containing a list of trending channels based on the specified time window. * * @example From 784344ab12bd22de0dc021a7d8c6ffcee410017a Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 11:20:15 -0700 Subject: [PATCH 04/11] Patch update: v1.19.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 30899d4f..5cbc7f38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neynar/nodejs-sdk", - "version": "1.19.0", + "version": "1.19.1", "description": "SDK to interact with Neynar APIs (https://docs.neynar.com/)", "main": "./build/index.js", "types": "./build/index.d.ts", From 6b38bd1a0f7aedcc83cf1c82a0fdb35eacb4b9ff Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 11:34:03 -0700 Subject: [PATCH 05/11] add to example --- src/neynar-api/neynar-api-client.ts | 4 ++-- src/neynar-api/v2/client.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index e152aedc..b0f0a4a4 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -2479,14 +2479,14 @@ export class NeynarAPIClient { * @param {boolean} [options.castReactionContext] - Adds viewer_context inside the cast object to indicate whether the interactor reacted to the cast housing the frame. * @param {boolean} [options.followContext] - Adds viewer_context inside the user (interactor) object to indicate whether the interactor follows or is followed by the cast author. * @param {boolean} [options.signerContext] - Adds context about the app used by the user inside `frame.action`. - * + * @param {boolean} [options.channelFollowContext] - Adds context about the channel the cast was in the cast object, as well as following information inside `frame.action`. * @returns {Promise} A promise that resolves to a `ValidateFrameActionResponse` object, * indicating the outcome of the frame action validation, potentially enriched with specified contexts. * * @example * // Example: Validate a frame action with additional context for cast reactions and follow actions * const messageBytesInHex = '0a49080d1085940118f6a6a32e20018201390a1a86db69b3ffdf6ab8acb6872b69ccbe7eb6a67af7ab71e95aa69f10021a1908ef011214237025b322fd03a9ddc7ec6c078fb9c56d1a72111214e3d88aeb2d0af356024e0c693f31c11b42c76b721801224043cb2f3fcbfb5dafce110e934b9369267cf3d1aef06f51ce653dc01700fc7b778522eb7873fd60dda4611376200076caf26d40a736d3919ce14e78a684e4d30b280132203a66717c82d728beb3511b05975c6603275c7f6a0600370bf637b9ecd2bd231e'; - * client.validateFrameAction(messageBytesInHex, { castReactionContext: false, followContext: true, signerContext: true }).then(response => { + * client.validateFrameAction(messageBytesInHex, { castReactionContext: false, followContext: true, signerContext: true, channelFollowContext: true }).then(response => { * console.log('Frame Action Validation:', response); * }); * diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index a6dd31bb..8c2e5f62 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -2246,6 +2246,7 @@ export class NeynarV2APIClient { * @param {boolean} [options.castReactionContext] - Adds viewer_context inside the cast object to indicate whether the interactor reacted to the cast housing the frame. * @param {boolean} [options.followContext] - Adds viewer_context inside the user (interactor) object to indicate whether the interactor follows or is followed by the cast author. * @param {boolean} [options.signerContext] - Adds context about the app used by the user inside `frame.action`. + * @param {boolean} [options.channelFollowContext] - Adds context about the channel the cast was in the cast object, as well as following information inside `frame.action`. * * @returns {Promise} A promise that resolves to a `ValidateFrameActionResponse` object, * indicating the outcome of the frame action validation, potentially enriched with specified contexts. @@ -2253,7 +2254,7 @@ export class NeynarV2APIClient { * @example * // Example: Validate a frame action with additional context for cast reactions and follow actions * const messageBytesInHex = '0a49080d1085940118f6a6a32e20018201390a1a86db69b3ffdf6ab8acb6872b69ccbe7eb6a67af7ab71e95aa69f10021a1908ef011214237025b322fd03a9ddc7ec6c078fb9c56d1a72111214e3d88aeb2d0af356024e0c693f31c11b42c76b721801224043cb2f3fcbfb5dafce110e934b9369267cf3d1aef06f51ce653dc01700fc7b778522eb7873fd60dda4611376200076caf26d40a736d3919ce14e78a684e4d30b280132203a66717c82d728beb3511b05975c6603275c7f6a0600370bf637b9ecd2bd231e'; - * client.validateFrameAction(messageBytesInHex, { castReactionContext: false, followContext: true, signerContext: true }).then(response => { + * client.validateFrameAction(messageBytesInHex, { castReactionContext: false, followContext: true, signerContext: true, channelFollowContext: true }).then(response => { * console.log('Frame Action Validation:', response); * }); * From 8ef5ea6839531ac3480609bfaf46a5337b8471a0 Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 13:16:10 -0700 Subject: [PATCH 06/11] all of --- .../.openapi-generator/FILES | 1 - .../cast-with-interactions-all-of-channel.ts | 32 ------------------- .../models/cast-with-interactions-all-of.ts | 10 +++--- ...ast-with-interactions-and-conversations.ts | 6 ++-- .../models/cast-with-interactions.ts | 6 ++-- .../v2/openapi-farcaster/models/index.ts | 1 - src/oas | 2 +- 7 files changed, 12 insertions(+), 46 deletions(-) delete mode 100644 src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 2f82a51d..831deb3f 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -33,7 +33,6 @@ models/cast-param-type.ts models/cast-parent-author-all-of.ts models/cast-parent-author.ts models/cast-response.ts -models/cast-with-interactions-all-of-channel.ts models/cast-with-interactions-all-of.ts models/cast-with-interactions-and-conversations.ts models/cast-with-interactions-reactions.ts diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts deleted file mode 100644 index ce976ee0..00000000 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of-channel.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Farcaster API V2 - * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - * - * The version of the OpenAPI document: 2.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -// May contain unused imports in some cases -// @ts-ignore -import { Channel } from './channel'; -// May contain unused imports in some cases -// @ts-ignore -import { ChannelViewerContext } from './channel-viewer-context'; -// May contain unused imports in some cases -// @ts-ignore -import { User } from './user'; - -/** - * @type CastWithInteractionsAllOfChannel - * @export - */ -export type CastWithInteractionsAllOfChannel = Channel; - - diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts index 5da3d8bd..095bff89 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-all-of.ts @@ -13,9 +13,6 @@ */ -// May contain unused imports in some cases -// @ts-ignore -import { CastWithInteractionsAllOfChannel } from './cast-with-interactions-all-of-channel'; // May contain unused imports in some cases // @ts-ignore import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; @@ -24,6 +21,9 @@ import { CastWithInteractionsReactions } from './cast-with-interactions-reaction import { CastWithInteractionsReplies } from './cast-with-interactions-replies'; // May contain unused imports in some cases // @ts-ignore +import { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore import { Frame } from './frame'; // May contain unused imports in some cases // @ts-ignore @@ -67,9 +67,9 @@ export interface CastWithInteractionsAllOf { 'mentioned_profiles': Array; /** * - * @type {CastWithInteractionsAllOfChannel} + * @type {Channel} * @memberof CastWithInteractionsAllOf */ - 'channel'?: CastWithInteractionsAllOfChannel; + 'channel'?: Channel; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts index 5c9b1f36..63b59ef0 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions-and-conversations.ts @@ -24,15 +24,15 @@ import { CastParentAuthor } from './cast-parent-author'; import { CastWithInteractions } from './cast-with-interactions'; // May contain unused imports in some cases // @ts-ignore -import { CastWithInteractionsAllOfChannel } from './cast-with-interactions-all-of-channel'; -// May contain unused imports in some cases -// @ts-ignore import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; // May contain unused imports in some cases // @ts-ignore import { CastWithInteractionsReplies } from './cast-with-interactions-replies'; // May contain unused imports in some cases // @ts-ignore +import { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore import { EmbeddedCast } from './embedded-cast'; // May contain unused imports in some cases // @ts-ignore diff --git a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts index add762eb..f3da98bb 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/cast-with-interactions.ts @@ -27,15 +27,15 @@ import { CastParentAuthor } from './cast-parent-author'; import { CastWithInteractionsAllOf } from './cast-with-interactions-all-of'; // May contain unused imports in some cases // @ts-ignore -import { CastWithInteractionsAllOfChannel } from './cast-with-interactions-all-of-channel'; -// May contain unused imports in some cases -// @ts-ignore import { CastWithInteractionsReactions } from './cast-with-interactions-reactions'; // May contain unused imports in some cases // @ts-ignore import { CastWithInteractionsReplies } from './cast-with-interactions-replies'; // May contain unused imports in some cases // @ts-ignore +import { Channel } from './channel'; +// May contain unused imports in some cases +// @ts-ignore import { EmbeddedCast } from './embedded-cast'; // May contain unused imports in some cases // @ts-ignore diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index 2a77da72..f56c424c 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -15,7 +15,6 @@ export * from './cast-parent-author-all-of'; export * from './cast-response'; export * from './cast-with-interactions'; export * from './cast-with-interactions-all-of'; -export * from './cast-with-interactions-all-of-channel'; export * from './cast-with-interactions-and-conversations'; export * from './cast-with-interactions-reactions'; export * from './cast-with-interactions-replies'; diff --git a/src/oas b/src/oas index d9faa97d..ba327a2c 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit d9faa97d661424d54c162f09b6565e2dc21a8c25 +Subproject commit ba327a2ce5fa7a4d09fa26d3c1296087d2199cd5 From 7b453aa381c12e7ca7a17c3c5edb8d49816108de Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 20:40:53 -0700 Subject: [PATCH 07/11] update conversation object --- .../.openapi-generator/FILES | 2 +- ...sponse.ts => conversation-conversation.ts} | 19 ++++++++++++++----- .../openapi-farcaster/models/conversation.ts | 15 +++------------ .../v2/openapi-farcaster/models/index.ts | 2 +- src/oas | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) rename src/neynar-api/v2/openapi-farcaster/models/{conversation-response.ts => conversation-conversation.ts} (50%) diff --git a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES index 831deb3f..787b2929 100644 --- a/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES +++ b/src/neynar-api/v2/openapi-farcaster/.openapi-generator/FILES @@ -46,7 +46,7 @@ models/channel-list-response.ts models/channel-response.ts models/channel-viewer-context.ts models/channel.ts -models/conversation-response.ts +models/conversation-conversation.ts models/conversation.ts models/dehydrated-follower.ts models/delete-cast-req-body.ts diff --git a/src/neynar-api/v2/openapi-farcaster/models/conversation-response.ts b/src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts similarity index 50% rename from src/neynar-api/v2/openapi-farcaster/models/conversation-response.ts rename to src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts index 754c9006..9f829962 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/conversation-response.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/conversation-conversation.ts @@ -16,18 +16,27 @@ // May contain unused imports in some cases // @ts-ignore import { CastWithInteractions } from './cast-with-interactions'; +// May contain unused imports in some cases +// @ts-ignore +import { CastWithInteractionsAndConversations } from './cast-with-interactions-and-conversations'; /** * * @export - * @interface ConversationResponse + * @interface ConversationConversation */ -export interface ConversationResponse { +export interface ConversationConversation { + /** + * + * @type {CastWithInteractionsAndConversations} + * @memberof ConversationConversation + */ + 'cast': CastWithInteractionsAndConversations; /** * - * @type {CastWithInteractions} - * @memberof ConversationResponse + * @type {Array} + * @memberof ConversationConversation */ - 'cast': CastWithInteractions; + 'chronological_parent_casts'?: Array; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/conversation.ts b/src/neynar-api/v2/openapi-farcaster/models/conversation.ts index 3440202b..56d50f34 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/conversation.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/conversation.ts @@ -15,10 +15,7 @@ // May contain unused imports in some cases // @ts-ignore -import { CastWithInteractions } from './cast-with-interactions'; -// May contain unused imports in some cases -// @ts-ignore -import { CastWithInteractionsAndConversations } from './cast-with-interactions-and-conversations'; +import { ConversationConversation } from './conversation-conversation'; /** * @@ -28,15 +25,9 @@ import { CastWithInteractionsAndConversations } from './cast-with-interactions-a export interface Conversation { /** * - * @type {CastWithInteractionsAndConversations} - * @memberof Conversation - */ - 'cast': CastWithInteractionsAndConversations; - /** - * - * @type {Array} + * @type {ConversationConversation} * @memberof Conversation */ - 'chronological_parent_casts'?: Array; + 'conversation': ConversationConversation; } diff --git a/src/neynar-api/v2/openapi-farcaster/models/index.ts b/src/neynar-api/v2/openapi-farcaster/models/index.ts index f56c424c..db2a8c9c 100644 --- a/src/neynar-api/v2/openapi-farcaster/models/index.ts +++ b/src/neynar-api/v2/openapi-farcaster/models/index.ts @@ -26,7 +26,7 @@ export * from './channel-list-response'; export * from './channel-response'; export * from './channel-viewer-context'; export * from './conversation'; -export * from './conversation-response'; +export * from './conversation-conversation'; export * from './dehydrated-follower'; export * from './delete-cast-req-body'; export * from './delete-frame-response'; diff --git a/src/oas b/src/oas index ba327a2c..f7ab066b 160000 --- a/src/oas +++ b/src/oas @@ -1 +1 @@ -Subproject commit ba327a2ce5fa7a4d09fa26d3c1296087d2199cd5 +Subproject commit f7ab066b7f599e1ab08d8f7b4961a173ddb78134 From 65cb79544ae5822f3a08c0c258fe917d65749ed4 Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 22:07:35 -0700 Subject: [PATCH 08/11] limit updated --- src/neynar-api/neynar-api-client.ts | 10 +++++----- src/neynar-api/v2/client.ts | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index b0f0a4a4..a6373e45 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -1922,9 +1922,9 @@ export class NeynarAPIClient { * containing the user's notifications. * * @example - * // Example: Fetch the first 30 notifications for a user + * // Example: Fetch the first 25 notifications for a user * client.fetchAllNotifications(3, { - * limit: 30, + * limit: 25, * // cursor: "nextPageCursor" // Omit this parameter for the initial request * }).then(response => { * console.log('User Notifications:', response); @@ -1955,10 +1955,10 @@ export class NeynarAPIClient { * containing the channel-specific notifications for the user. * * @example - * // Example: Retrieve channel notifications for a user limit to 30 results + * // Example: Retrieve channel notifications for a user limit to 25 results * client.fetchChannelNotificationsForUser(3, ['neynar', 'farcaster'], * { - * limit: 30, + * limit: 25, * // cursor: "nextPageCursor" // Omit this parameter for the initial request. * }).then(response => { * console.log('Channel Notifications:', response); @@ -2173,7 +2173,7 @@ export class NeynarAPIClient { * * @example * // Example: Retrieve notifications for a user based on specific parent URLs - * client.fetchNotificationsByParentUrlForUser(3, ['chain://eip155:1/erc721:0xd4498134211baad5846ce70ce04e7c4da78931cc', 'chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61'], { limit: 30 }).then(response => { + * client.fetchNotificationsByParentUrlForUser(3, ['chain://eip155:1/erc721:0xd4498134211baad5846ce70ce04e7c4da78931cc', 'chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61'], { limit: 25 }).then(response => { * console.log('User Notifications:', response); * }); * diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index 8c2e5f62..e671040d 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -1567,9 +1567,9 @@ export class NeynarV2APIClient { * containing the user's notifications. * * @example - * // Example: Fetch the first 30 notifications for a user + * // Example: Fetch the first 25 notifications for a user * client.fetchAllNotifications(3, { - * limit: 30, + * limit: 25, * // cursor: "nextPageCursor" // Omit this parameter for the initial request * }).then(response => { * console.log('User Notifications:', response); @@ -1606,10 +1606,10 @@ export class NeynarV2APIClient { * containing the channel-specific notifications for the user. * * @example - * // Example: Retrieve channel notifications for a user limit to 30 results + * // Example: Retrieve channel notifications for a user limit to 25 results * client.fetchChannelNotificationsForUser(3, ['neynar', 'farcaster'], * { - * limit: 30, + * limit: 25, * // cursor: "nextPageCursor" // Omit this parameter for the initial request. * }).then(response => { * console.log('Channel Notifications:', response); @@ -1650,7 +1650,7 @@ export class NeynarV2APIClient { * * @example * // Example: Retrieve notifications for a user based on specific parent URLs - * client.fetchNotificationsByParentUrlForUser(3, ['chain://eip155:1/erc721:0xd4498134211baad5846ce70ce04e7c4da78931cc', 'chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61'], { limit: 30 }).then(response => { + * client.fetchNotificationsByParentUrlForUser(3, ['chain://eip155:1/erc721:0xd4498134211baad5846ce70ce04e7c4da78931cc', 'chain://eip155:1/erc721:0xfd8427165df67df6d7fd689ae67c8ebf56d9ca61'], { limit: 25 }).then(response => { * console.log('User Notifications:', response); * }); * From 14f8259342052f3b08fcaa7b1cd1e036071715c8 Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 22:12:07 -0700 Subject: [PATCH 09/11] added --- src/neynar-api/neynar-api-client.ts | 6 +++--- src/neynar-api/v2/client.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index a6373e45..7ff92dd6 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -1913,7 +1913,7 @@ export class NeynarAPIClient { * * @param {number} fid - The FID of the user whose notifications are being fetched. * @param {Object} [options] - Optional parameters to tailor the request. - * @param {number} [options.limit] - The maximum number of users to be returned in the response. + * @param {number} [options.limit=25] - The maximum number of users to be returned in the response. * Defaults to 25, with a maximum allowable value of 50. * @param {string} [options.cursor] - A pagination cursor for fetching specific subsets of results. * Omit this parameter for the initial request. Use it for paginated retrieval of subsequent data. @@ -1947,7 +1947,7 @@ export class NeynarAPIClient { * @param {number} fid - The FID of the user whose channel notifications are being fetched. * @param {string} channelIds - channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) * @param {Object} [options] - Optional parameters for the request. - * @param {number} [options.limit] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * @@ -2164,7 +2164,7 @@ export class NeynarAPIClient { * @param {number} fid - The FID of the user for whom notifications are being fetched. * @param {Array} parentUrls - An array of parent URLs to specify the channels. * @param {Object} [options] - Optional parameters for customizing the response. - * @param {number} [options.limit] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index e671040d..cf3a6a94 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -1559,7 +1559,7 @@ export class NeynarV2APIClient { * * @param {number} fid - The FID of the user whose notifications are being fetched. * @param {Object} [options] - Optional parameters to tailor the request. - * @param {number} [options.limit] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * @@ -1598,7 +1598,7 @@ export class NeynarV2APIClient { * @param {number} fid - The FID of the user whose channel notifications are being fetched. * @param {string} channelIds - channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) * @param {Object} [options] - Optional parameters for the request. - * @param {number} [options.limit] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * @@ -1641,7 +1641,7 @@ export class NeynarV2APIClient { * @param {number} fid - The FID of the user for whom notifications are being fetched. * @param {Array} parentUrls - An array of parent URLs to specify the channels. * @param {Object} [options] - Optional parameters for customizing the response. - * @param {number} [options.limit] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * From fea8aecfa4c9454e8ccdcb8e7abbd928805be8b7 Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 22:21:02 -0700 Subject: [PATCH 10/11] limit --- src/neynar-api/neynar-api-client.ts | 8 ++++---- src/neynar-api/v2/client.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/neynar-api/neynar-api-client.ts b/src/neynar-api/neynar-api-client.ts index 7ff92dd6..f518fd87 100644 --- a/src/neynar-api/neynar-api-client.ts +++ b/src/neynar-api/neynar-api-client.ts @@ -1913,8 +1913,8 @@ export class NeynarAPIClient { * * @param {number} fid - The FID of the user whose notifications are being fetched. * @param {Object} [options] - Optional parameters to tailor the request. - * @param {number} [options.limit=25] - The maximum number of users to be returned in the response. - * Defaults to 25, with a maximum allowable value of 50. + * @param {number} [options.limit=15] - The maximum number of users to be returned in the response. + * Defaults to 15, with a maximum allowable value of 25. * @param {string} [options.cursor] - A pagination cursor for fetching specific subsets of results. * Omit this parameter for the initial request. Use it for paginated retrieval of subsequent data. * @@ -1947,7 +1947,7 @@ export class NeynarAPIClient { * @param {number} fid - The FID of the user whose channel notifications are being fetched. * @param {string} channelIds - channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) * @param {Object} [options] - Optional parameters for the request. - * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=15] - Number of results to retrieve (default 15, max 25). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * @@ -2164,7 +2164,7 @@ export class NeynarAPIClient { * @param {number} fid - The FID of the user for whom notifications are being fetched. * @param {Array} parentUrls - An array of parent URLs to specify the channels. * @param {Object} [options] - Optional parameters for customizing the response. - * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=15] - Number of results to retrieve (default 15, max 25). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index cf3a6a94..20f6eebc 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -1559,7 +1559,7 @@ export class NeynarV2APIClient { * * @param {number} fid - The FID of the user whose notifications are being fetched. * @param {Object} [options] - Optional parameters to tailor the request. - * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=25] - Number of results to retrieve (default 15, max 25). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * @@ -1598,7 +1598,7 @@ export class NeynarV2APIClient { * @param {number} fid - The FID of the user whose channel notifications are being fetched. * @param {string} channelIds - channel_ids (find list of all channels here - https://docs.neynar.com/reference/list-all-channels) * @param {Object} [options] - Optional parameters for the request. - * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=15] - Number of results to retrieve (default 15, max 25). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * @@ -1641,7 +1641,7 @@ export class NeynarV2APIClient { * @param {number} fid - The FID of the user for whom notifications are being fetched. * @param {Array} parentUrls - An array of parent URLs to specify the channels. * @param {Object} [options] - Optional parameters for customizing the response. - * @param {number} [options.limit=25] - Number of results to retrieve (default 25, max 50). + * @param {number} [options.limit=15] - Number of results to retrieve (default 15, max 25). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. * From 493ba39c33d4ac9088edbdff95c5de17e605a45a Mon Sep 17 00:00:00 2001 From: Kevin O'Connell Date: Mon, 15 Apr 2024 22:36:27 -0700 Subject: [PATCH 11/11] 15 --- src/neynar-api/v2/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/neynar-api/v2/client.ts b/src/neynar-api/v2/client.ts index 20f6eebc..74b81a44 100644 --- a/src/neynar-api/v2/client.ts +++ b/src/neynar-api/v2/client.ts @@ -1559,7 +1559,7 @@ export class NeynarV2APIClient { * * @param {number} fid - The FID of the user whose notifications are being fetched. * @param {Object} [options] - Optional parameters to tailor the request. - * @param {number} [options.limit=25] - Number of results to retrieve (default 15, max 25). + * @param {number} [options.limit=15] - Number of results to retrieve (default 15, max 25). * @param {string} [options.cursor] - Pagination cursor for the next set of results, * omit this parameter for the initial request. *