UNPKG

@standard-crypto/farcaster-js-neynar

Version:

A tool for interacting with Farcaster via Neynar APIs.

145 lines (144 loc) 6.74 kB
/** * 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. */ import type { Configuration } from '../configuration.js'; import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; import { RequestArgs, BaseAPI } from '../base.js'; import { FeedResponse } from '../models'; /** * FeedApi - axios parameter creator * @export */ export declare const FeedApiAxiosParamCreator: (configuration?: Configuration) => { /** * * @summary Retrieve casts based on filters * @param {'following' | 'filter'} feedType Defaults to following (requires fid or address). If set to filter (requires filter_type) * @param {'fids' | 'parent_url' | 'global_trending'} [filterType] Used when feed_type&#x3D;filter. Can be set to fids (requires fids) or parent_url (requires parent_url) * @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&#x3D;fids . Create a feed based on a list of fids. Max array size is 250. Requires feed_type and filter_type. * @param {string} [parentUrl] Used when filter_type&#x3D;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} [cursor] Pagination cursor. * @param {number} [limit] Number of results to retrieve (default 25, max 100) * @param {boolean} [withRecasts] Include recasts in the response, true by default * @param {*} [options] Override http request option. * @throws {RequiredError} */ feed: (feedType: 'following' | 'filter', filterType?: 'fids' | 'parent_url' | 'global_trending', fid?: number, fids?: string, parentUrl?: string, cursor?: string, limit?: number, withRecasts?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>; }; /** * FeedApi - functional programming interface * @export */ export declare const FeedApiFp: (configuration?: Configuration) => { /** * * @summary Retrieve casts based on filters * @param {'following' | 'filter'} feedType Defaults to following (requires fid or address). If set to filter (requires filter_type) * @param {'fids' | 'parent_url' | 'global_trending'} [filterType] Used when feed_type&#x3D;filter. Can be set to fids (requires fids) or parent_url (requires parent_url) * @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&#x3D;fids . Create a feed based on a list of fids. Max array size is 250. Requires feed_type and filter_type. * @param {string} [parentUrl] Used when filter_type&#x3D;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} [cursor] Pagination cursor. * @param {number} [limit] Number of results to retrieve (default 25, max 100) * @param {boolean} [withRecasts] Include recasts in the response, true by default * @param {*} [options] Override http request option. * @throws {RequiredError} */ feed(feedType: 'following' | 'filter', filterType?: 'fids' | 'parent_url' | 'global_trending', fid?: number, fids?: string, parentUrl?: string, cursor?: string, limit?: number, withRecasts?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FeedResponse>>; }; /** * FeedApi - factory interface * @export */ export declare const FeedApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * * @summary Retrieve casts based on filters * @param {FeedApiFeedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ feed(requestParameters: FeedApiFeedRequest, options?: AxiosRequestConfig): AxiosPromise<FeedResponse>; }; /** * Request parameters for feed operation in FeedApi. * @export * @interface FeedApiFeedRequest */ export interface FeedApiFeedRequest { /** * Defaults to following (requires fid or address). If set to filter (requires filter_type) * @type {'following' | 'filter'} * @memberof FeedApiFeed */ readonly feedType: 'following' | 'filter'; /** * Used when feed_type&#x3D;filter. Can be set to fids (requires fids) or parent_url (requires parent_url) * @type {'fids' | 'parent_url' | 'global_trending'} * @memberof FeedApiFeed */ readonly filterType?: 'fids' | 'parent_url' | 'global_trending'; /** * (Optional) fid of user whose feed you want to create. By default, the API expects this field, except if you pass a filter_type * @type {number} * @memberof FeedApiFeed */ readonly fid?: number; /** * Used when filter_type&#x3D;fids . Create a feed based on a list of fids. Max array size is 250. Requires feed_type and filter_type. * @type {string} * @memberof FeedApiFeed */ readonly fids?: string; /** * Used when filter_type&#x3D;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 * @type {string} * @memberof FeedApiFeed */ readonly parentUrl?: string; /** * Pagination cursor. * @type {string} * @memberof FeedApiFeed */ readonly cursor?: string; /** * Number of results to retrieve (default 25, max 100) * @type {number} * @memberof FeedApiFeed */ readonly limit?: number; /** * Include recasts in the response, true by default * @type {boolean} * @memberof FeedApiFeed */ readonly withRecasts?: boolean; } /** * FeedApi - object-oriented interface * @export * @class FeedApi * @extends {BaseAPI} */ export declare class FeedApi extends BaseAPI { /** * * @summary Retrieve casts based on filters * @param {FeedApiFeedRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof FeedApi */ feed(requestParameters: FeedApiFeedRequest, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<FeedResponse, any>>; }