@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
747 lines • 77.5 kB
TypeScript
/**
* Neynar API
* The Neynar API allows you to interact with the Farcaster protocol among other things. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 3.115.0
* Contact: team@neynar.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import { type RequestArgs, BaseAPI } from '../base';
import type { BulkCastsResponse } from '../models';
import type { FeedResponse } from '../models';
/**
* FeedApi - axios parameter creator
* @export
*/
export declare const FeedApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel
* @summary Chronologically
* @param {number} fid FID of user whose recent casts you want to fetch
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [appFid] Optionally filter to casts created via a specific app FID, e.g. 9152 for Warpcast
* @param {number} [viewerFid] FID of the user viewing the feed
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 150)
* @param {string} [cursor] Pagination cursor
* @param {boolean | null} [includeReplies] Include reply casts by the author in the response, true by default
* @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id
* @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-casts-for-user)
*
*/
fetchCastsForUser: (fid: number, xNeynarExperimental?: boolean, appFid?: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean | null, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type.
* @summary By filters
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {FetchFeedFeedTypeEnum} [feedType] Defaults to following (requires FID or address). If set to filter (requires filter_type)
* @param {FetchFeedFilterTypeEnum} [filterType] Used when feed_type=filter. Options include fids (requires fids), parent_url (requires parent_url), channel_id (requires channel_id), embed_url (requires embed_url), embed_types (requires embed_types), or global_trending.
* @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type
* @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 100. Requires feed_type and filter_type.
* @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type.
* @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type.
* @param {boolean | null} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default.
* @param {string} [embedUrl] Used when filter_type=embed_url. Casts with embedded URLs prefixed by this embed_url param will be returned. We normalize your given URL prefix and prepend \'https://\' if no protocol is included. Requires feed_type and filter_type.
* @param {Array<FetchFeedEmbedTypesEnum>} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed)
*
*/
fetchFeed: (xNeynarExperimental?: boolean, feedType?: FetchFeedFeedTypeEnum, filterType?: FetchFeedFilterTypeEnum, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean | null, embedUrl?: string, embedTypes?: Array<FetchFeedEmbedTypesEnum>, withRecasts?: boolean | null, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch feed based on channel IDs
* @summary By channel IDs
* @param {string} channelIds Comma separated list of up to 10 channel IDs e.g. neynar,farcaster
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {boolean | null} [withReplies] Include replies in the response, false by default
* @param {boolean | null} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default.
* @param {string} [fids] Comma separated list of FIDs to filter the feed by, up to 10 at a time
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {boolean | null} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-channel-ids)
*
*/
fetchFeedByChannelIds: (channelIds: string, xNeynarExperimental?: boolean, withRecasts?: boolean | null, viewerFid?: number, withReplies?: boolean | null, membersOnly?: boolean | null, fids?: string, limit?: number, cursor?: string, shouldModerate?: boolean | null, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch feed based on parent URLs
* @summary By parent URLs
* @param {string} parentUrls Comma separated list of parent_urls
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {boolean | null} [withReplies] Include replies in the response, false by default
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-parent-urls)
*
*/
fetchFeedByParentUrls: (parentUrls: string, xNeynarExperimental?: boolean, withRecasts?: boolean | null, viewerFid?: number, withReplies?: boolean | null, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch feed based on a topic slug.
* @summary By topic
* @param {string} slug Topic slug to filter casts by. Must be lowercase and contain only alphanumeric characters and underscores.
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {number} [limit] Number of results to fetch. (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-topic)
*
*/
fetchFeedByTopic: (slug: string, xNeynarExperimental?: boolean, withRecasts?: boolean | null, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch a personalized For You feed for a user
* @summary For you
* @param {number} fid FID of user whose feed you want to create
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {FetchFeedForYouProviderEnum} [provider] The provider of the For You feed.
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 50)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-for-you)
*
*/
fetchFeedForYou: (fid: number, xNeynarExperimental?: boolean, viewerFid?: number, provider?: FetchFeedForYouProviderEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first
* @summary 10 most popular casts
* @param {number} fid FID of user whose feed you want to create
* @param {number} [viewerFid]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BulkCastsResponse>} A promise that resolves to a `BulkCastsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-popular-casts-by-user)
*
*/
fetchPopularCastsByUser: (fid: number, viewerFid?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch recent replies and recasts for a given user FID; sorted by most recent first
* @summary Replies and recasts
* @param {number} fid FID of user whose replies and recasts you want to fetch
* @param {FetchRepliesAndRecastsForUserFilterEnum} [filter] Filter to fetch only replies or recasts
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 50)
* @param {string} [cursor] Pagination cursor.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-replies-and-recasts-for-user)
*
*/
fetchRepliesAndRecastsForUser: (fid: number, filter?: FetchRepliesAndRecastsForUserFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only.
* @summary Trending feeds
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [limit] Number of results to fetch (Default: 10, Maximum: 10)
* @param {string} [cursor] Pagination cursor
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {FetchTrendingFeedTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only)
* @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. Provide either `channel_id` or `parent_url`, not both.
* @param {string} [parentUrl] Parent URL to filter trending casts. Less active channels might have no casts in the time window selected. Provide either `channel_id` or `parent_url`, not both.
* @param {FetchTrendingFeedProviderEnum} [provider] The provider of the trending casts feed.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-feed)
*
*/
fetchTrendingFeed: (xNeynarExperimental?: boolean, limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FetchTrendingFeedTimeWindowEnum, channelId?: string, parentUrl?: string, provider?: FetchTrendingFeedProviderEnum, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
/**
* Fetch feed based on who a user is following
* @summary Following
* @param {number} fid FID of user whose feed you want to create
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following-feed)
*
*/
fetchUserFollowingFeed: (fid: number, xNeynarExperimental?: boolean, viewerFid?: number, withRecasts?: boolean | null, limit?: number, cursor?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* FeedApi - functional programming interface
* @export
*/
export declare const FeedApiFp: (configuration?: Configuration) => {
/**
* Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel
* @summary Chronologically
* @param {number} fid FID of user whose recent casts you want to fetch
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [appFid] Optionally filter to casts created via a specific app FID, e.g. 9152 for Warpcast
* @param {number} [viewerFid] FID of the user viewing the feed
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 150)
* @param {string} [cursor] Pagination cursor
* @param {boolean | null} [includeReplies] Include reply casts by the author in the response, true by default
* @param {string} [parentUrl] Parent URL to filter the feed; mutually exclusive with channel_id
* @param {string} [channelId] Channel ID to filter the feed; mutually exclusive with parent_url
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-casts-for-user)
*
*/
fetchCastsForUser(fid: number, xNeynarExperimental?: boolean, appFid?: number, viewerFid?: number, limit?: number, cursor?: string, includeReplies?: boolean | null, parentUrl?: string, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type.
* @summary By filters
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {FetchFeedFeedTypeEnum} [feedType] Defaults to following (requires FID or address). If set to filter (requires filter_type)
* @param {FetchFeedFilterTypeEnum} [filterType] Used when feed_type=filter. Options include fids (requires fids), parent_url (requires parent_url), channel_id (requires channel_id), embed_url (requires embed_url), embed_types (requires embed_types), or global_trending.
* @param {number} [fid] (Optional) FID of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type
* @param {string} [fids] Used when filter_type=FIDs . Create a feed based on a list of FIDs. Max array size is 100. Requires feed_type and filter_type.
* @param {string} [parentUrl] Used when filter_type=parent_url can be used to fetch content under any parent url e.g. FIP-2 channels on Warpcast. Requires feed_type and filter_type.
* @param {string} [channelId] Used when filter_type=channel_id can be used to fetch casts under a channel. Requires feed_type and filter_type.
* @param {boolean | null} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default.
* @param {string} [embedUrl] Used when filter_type=embed_url. Casts with embedded URLs prefixed by this embed_url param will be returned. We normalize your given URL prefix and prepend \'https://\' if no protocol is included. Requires feed_type and filter_type.
* @param {Array<FetchFeedEmbedTypesEnum>} [embedTypes] Used when filter_type=embed_types can be used to fetch all casts with matching content types. Requires feed_type and filter_type.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed)
*
*/
fetchFeed(xNeynarExperimental?: boolean, feedType?: FetchFeedFeedTypeEnum, filterType?: FetchFeedFilterTypeEnum, fid?: number, fids?: string, parentUrl?: string, channelId?: string, membersOnly?: boolean | null, embedUrl?: string, embedTypes?: Array<FetchFeedEmbedTypesEnum>, withRecasts?: boolean | null, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch feed based on channel IDs
* @summary By channel IDs
* @param {string} channelIds Comma separated list of up to 10 channel IDs e.g. neynar,farcaster
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {boolean | null} [withReplies] Include replies in the response, false by default
* @param {boolean | null} [membersOnly] Used when filter_type=channel_id. Only include casts from members of the channel. True by default.
* @param {string} [fids] Comma separated list of FIDs to filter the feed by, up to 10 at a time
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {boolean | null} [shouldModerate] If true, only casts that have been liked by the moderator (if one exists) will be returned.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-channel-ids)
*
*/
fetchFeedByChannelIds(channelIds: string, xNeynarExperimental?: boolean, withRecasts?: boolean | null, viewerFid?: number, withReplies?: boolean | null, membersOnly?: boolean | null, fids?: string, limit?: number, cursor?: string, shouldModerate?: boolean | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch feed based on parent URLs
* @summary By parent URLs
* @param {string} parentUrls Comma separated list of parent_urls
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {boolean | null} [withReplies] Include replies in the response, false by default
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-parent-urls)
*
*/
fetchFeedByParentUrls(parentUrls: string, xNeynarExperimental?: boolean, withRecasts?: boolean | null, viewerFid?: number, withReplies?: boolean | null, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch feed based on a topic slug.
* @summary By topic
* @param {string} slug Topic slug to filter casts by. Must be lowercase and contain only alphanumeric characters and underscores.
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {number} [limit] Number of results to fetch. (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-topic)
*
*/
fetchFeedByTopic(slug: string, xNeynarExperimental?: boolean, withRecasts?: boolean | null, viewerFid?: number, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch a personalized For You feed for a user
* @summary For you
* @param {number} fid FID of user whose feed you want to create
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {FetchFeedForYouProviderEnum} [provider] The provider of the For You feed.
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 50)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-for-you)
*
*/
fetchFeedForYou(fid: number, xNeynarExperimental?: boolean, viewerFid?: number, provider?: FetchFeedForYouProviderEnum, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first
* @summary 10 most popular casts
* @param {number} fid FID of user whose feed you want to create
* @param {number} [viewerFid]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BulkCastsResponse>} A promise that resolves to a `BulkCastsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-popular-casts-by-user)
*
*/
fetchPopularCastsByUser(fid: number, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<BulkCastsResponse>>;
/**
* Fetch recent replies and recasts for a given user FID; sorted by most recent first
* @summary Replies and recasts
* @param {number} fid FID of user whose replies and recasts you want to fetch
* @param {FetchRepliesAndRecastsForUserFilterEnum} [filter] Filter to fetch only replies or recasts
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 50)
* @param {string} [cursor] Pagination cursor.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-replies-and-recasts-for-user)
*
*/
fetchRepliesAndRecastsForUser(fid: number, filter?: FetchRepliesAndRecastsForUserFilterEnum, limit?: number, cursor?: string, viewerFid?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only.
* @summary Trending feeds
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [limit] Number of results to fetch (Default: 10, Maximum: 10)
* @param {string} [cursor] Pagination cursor
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {FetchTrendingFeedTimeWindowEnum} [timeWindow] Time window for trending casts (7d window for channel feeds only)
* @param {string} [channelId] Channel ID to filter trending casts. Less active channels might have no casts in the time window selected. Provide either `channel_id` or `parent_url`, not both.
* @param {string} [parentUrl] Parent URL to filter trending casts. Less active channels might have no casts in the time window selected. Provide either `channel_id` or `parent_url`, not both.
* @param {FetchTrendingFeedProviderEnum} [provider] The provider of the trending casts feed.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-feed)
*
*/
fetchTrendingFeed(xNeynarExperimental?: boolean, limit?: number, cursor?: string, viewerFid?: number, timeWindow?: FetchTrendingFeedTimeWindowEnum, channelId?: string, parentUrl?: string, provider?: FetchTrendingFeedProviderEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
/**
* Fetch feed based on who a user is following
* @summary Following
* @param {number} fid FID of user whose feed you want to create
* @param {boolean} [xNeynarExperimental] Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
* @param {number} [viewerFid] Providing this will return a feed that respects this user\'s mutes and blocks and includes `viewer_context`.
* @param {boolean | null} [withRecasts] Include recasts in the response, true by default
* @param {number} [limit] Number of results to fetch (Default: 25, Maximum: 100)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following-feed)
*
*/
fetchUserFollowingFeed(fid: number, xNeynarExperimental?: boolean, viewerFid?: number, withRecasts?: boolean | null, limit?: number, cursor?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>;
};
/**
* FeedApi - factory interface
* @export
*/
export declare const FeedApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel
* @summary Chronologically
* @param {FeedApiFetchCastsForUserRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-casts-for-user)
*
*/
fetchCastsForUser(requestParameters: FeedApiFetchCastsForUserRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type.
* @summary By filters
* @param {FeedApiFetchFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed)
*
*/
fetchFeed(requestParameters?: FeedApiFetchFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on channel IDs
* @summary By channel IDs
* @param {FeedApiFetchFeedByChannelIdsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-channel-ids)
*
*/
fetchFeedByChannelIds(requestParameters: FeedApiFetchFeedByChannelIdsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on parent URLs
* @summary By parent URLs
* @param {FeedApiFetchFeedByParentUrlsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-parent-urls)
*
*/
fetchFeedByParentUrls(requestParameters: FeedApiFetchFeedByParentUrlsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on a topic slug.
* @summary By topic
* @param {FeedApiFetchFeedByTopicRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-topic)
*
*/
fetchFeedByTopic(requestParameters: FeedApiFetchFeedByTopicRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch a personalized For You feed for a user
* @summary For you
* @param {FeedApiFetchFeedForYouRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-for-you)
*
*/
fetchFeedForYou(requestParameters: FeedApiFetchFeedForYouRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first
* @summary 10 most popular casts
* @param {FeedApiFetchPopularCastsByUserRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<BulkCastsResponse>} A promise that resolves to a `BulkCastsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-popular-casts-by-user)
*
*/
fetchPopularCastsByUser(requestParameters: FeedApiFetchPopularCastsByUserRequest, options?: RawAxiosRequestConfig): AxiosPromise<BulkCastsResponse>;
/**
* Fetch recent replies and recasts for a given user FID; sorted by most recent first
* @summary Replies and recasts
* @param {FeedApiFetchRepliesAndRecastsForUserRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-replies-and-recasts-for-user)
*
*/
fetchRepliesAndRecastsForUser(requestParameters: FeedApiFetchRepliesAndRecastsForUserRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only.
* @summary Trending feeds
* @param {FeedApiFetchTrendingFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-feed)
*
*/
fetchTrendingFeed(requestParameters?: FeedApiFetchTrendingFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on who a user is following
* @summary Following
* @param {FeedApiFetchUserFollowingFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following-feed)
*
*/
fetchUserFollowingFeed(requestParameters: FeedApiFetchUserFollowingFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
};
/**
* FeedApi - interface
* @export
* @interface FeedApi
*/
export interface FeedApiInterface {
/**
* Fetch casts for a given user FID in reverse chronological order. Also allows filtering by parent_url and channel
* @summary Chronologically
* @param {FeedApiFetchCastsForUserRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-casts-for-user)
*
*/
fetchCastsForUser(requestParameters: FeedApiFetchCastsForUserRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch casts based on filters. Ensure setting the correct parameters based on the feed_type and filter_type.
* @summary By filters
* @param {FeedApiFetchFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed)
*
*/
fetchFeed(requestParameters?: FeedApiFetchFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on channel IDs
* @summary By channel IDs
* @param {FeedApiFetchFeedByChannelIdsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-channel-ids)
*
*/
fetchFeedByChannelIds(requestParameters: FeedApiFetchFeedByChannelIdsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on parent URLs
* @summary By parent URLs
* @param {FeedApiFetchFeedByParentUrlsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-parent-urls)
*
*/
fetchFeedByParentUrls(requestParameters: FeedApiFetchFeedByParentUrlsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on a topic slug.
* @summary By topic
* @param {FeedApiFetchFeedByTopicRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-by-topic)
*
*/
fetchFeedByTopic(requestParameters: FeedApiFetchFeedByTopicRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch a personalized For You feed for a user
* @summary For you
* @param {FeedApiFetchFeedForYouRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-feed-for-you)
*
*/
fetchFeedForYou(requestParameters: FeedApiFetchFeedForYouRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch 10 most popular casts for a given user FID; popularity based on replies, likes and recasts; sorted by most popular first
* @summary 10 most popular casts
* @param {FeedApiFetchPopularCastsByUserRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<BulkCastsResponse>} A promise that resolves to a `BulkCastsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-popular-casts-by-user)
*
*/
fetchPopularCastsByUser(requestParameters: FeedApiFetchPopularCastsByUserRequest, options?: RawAxiosRequestConfig): AxiosPromise<BulkCastsResponse>;
/**
* Fetch recent replies and recasts for a given user FID; sorted by most recent first
* @summary Replies and recasts
* @param {FeedApiFetchRepliesAndRecastsForUserRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-replies-and-recasts-for-user)
*
*/
fetchRepliesAndRecastsForUser(requestParameters: FeedApiFetchRepliesAndRecastsForUserRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch trending casts or on the global feed or channels feeds. 7d time window available for channel feeds only.
* @summary Trending feeds
* @param {FeedApiFetchTrendingFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-trending-feed)
*
*/
fetchTrendingFeed(requestParameters?: FeedApiFetchTrendingFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
/**
* Fetch feed based on who a user is following
* @summary Following
* @param {FeedApiFetchUserFollowingFeedRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof FeedApiInterface
* @returns {Promise<FeedResponse>} A promise that resolves to a `FeedResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-following-feed)
*
*/
fetchUserFollowingFeed(requestParameters: FeedApiFetchUserFollowingFeedRequest, options?: RawAxiosRequestConfig): AxiosPromise<FeedResponse>;
}
/**
* Request parameters for fetchCastsForUser operation in FeedApi.
* @export
* @interface FeedApiFetchCastsForUserRequest
*/
export interface FeedApiFetchCastsForUserRequest {
/**
* FID of user whose recent casts you want to fetch
*
*
*
* @type {number}
* @memberof FeedApiFetchCastsForUser
*/
readonly fid: number;
/**
* Enables experimental features including filtering based on the Neynar score. See [docs](https://neynar.notion.site/Experimental-Features-1d2655195a8b80eb98b4d4ae7b76ae4a) for more details.
*
*
* @globalHeader
* @type {boolean}
* @memberof FeedApiFetchCastsForUser
*/
readonly xNeynarExperimental?: boolean;
/**
* Optionally filter to casts created via a specific app FID, e.g. 9152 for Warpcast
*
*
*
* @type {number}
* @memberof FeedApiFetchCastsForUser
*/
readonly appFid?: number;
/**
* FID of the user viewing the feed
*
*
*
* @type {number}
* @memberof FeedApiFetchCastsForUser
*/
readonly viewerFid?: number;
/**
* Number of results to fetch (Default: 25, Maximum: 150)
*
*
*
* @type {number}
* @memberof FeedApiFetchCastsForUser
*/
readonly limit?: number;
/**
* Pagination cursor
*
*
*
* @type {string}
* @memberof FeedApiFetchCastsForUser
*/
readonly cursor?: string;
/**
* Include reply casts by the author in the response, true by default
*
*
*
* @type {boolean}
* @memberof FeedApiFetchCastsForUser
*/
readonly includeReplies?: boolean | null;
/**
* Parent URL to filter the feed; mutually exclusive with channel_id
*
*
*
* @type {string}
* @memberof FeedApiFetchCastsForUser
*/
readonly parentUrl?: string;
/**
* Channel ID to filter the feed; mutually exclusive with parent_url
*
*
*
* @type {string}
* @memberof FeedApiFetchCastsForUser
*/
readonly channelId?: string;
}
/**
* Request parameters for