UNPKG

@neynar/nodejs-sdk

Version:

SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)

206 lines (205 loc) 8.86 kB
/** * Farcaster Hub API * Perform basic queries of Farcaster state via the REST API of a Farcaster hub. See the [Neynar docs](https://docs.neynar.com/reference) for more details. * * The version of the OpenAPI document: 2.35.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 { FetchEvents200Response } from '../models'; import type { HubEvent } from '../models'; /** * HubEventsApi - axios parameter creator * @export */ export declare const HubEventsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Fetch a list of events. * @summary Page of events * @param {number} [fromEventId] An optional Hub Id to start getting events from. This is also returned from the API as nextPageEventId, which can be used to page through all the Hub events. Set it to 0 to start from the first event. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<FetchEvents200Response>} A promise that resolves to a `FetchEvents200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-events) * */ fetchEvents: (fromEventId?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; /** * Lookup an event by its ID. * @summary Event by ID * @param {number} eventId The Hub Id of the event * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<HubEvent>} A promise that resolves to a `HubEvent` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-event) * */ lookupEvent: (eventId: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>; }; /** * HubEventsApi - functional programming interface * @export */ export declare const HubEventsApiFp: (configuration?: Configuration) => { /** * Fetch a list of events. * @summary Page of events * @param {number} [fromEventId] An optional Hub Id to start getting events from. This is also returned from the API as nextPageEventId, which can be used to page through all the Hub events. Set it to 0 to start from the first event. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<FetchEvents200Response>} A promise that resolves to a `FetchEvents200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-events) * */ fetchEvents(fromEventId?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FetchEvents200Response>>; /** * Lookup an event by its ID. * @summary Event by ID * @param {number} eventId The Hub Id of the event * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<HubEvent>} A promise that resolves to a `HubEvent` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-event) * */ lookupEvent(eventId: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<HubEvent>>; }; /** * HubEventsApi - factory interface * @export */ export declare const HubEventsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Fetch a list of events. * @summary Page of events * @param {HubEventsApiFetchEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<FetchEvents200Response>} A promise that resolves to a `FetchEvents200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-events) * */ fetchEvents(requestParameters?: HubEventsApiFetchEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchEvents200Response>; /** * Lookup an event by its ID. * @summary Event by ID * @param {HubEventsApiLookupEventRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @returns {Promise<HubEvent>} A promise that resolves to a `HubEvent` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-event) * */ lookupEvent(requestParameters: HubEventsApiLookupEventRequest, options?: RawAxiosRequestConfig): AxiosPromise<HubEvent>; }; /** * HubEventsApi - interface * @export * @interface HubEventsApi */ export interface HubEventsApiInterface { /** * Fetch a list of events. * @summary Page of events * @param {HubEventsApiFetchEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof HubEventsApiInterface * @returns {Promise<FetchEvents200Response>} A promise that resolves to a `FetchEvents200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-events) * */ fetchEvents(requestParameters?: HubEventsApiFetchEventsRequest, options?: RawAxiosRequestConfig): AxiosPromise<FetchEvents200Response>; /** * Lookup an event by its ID. * @summary Event by ID * @param {HubEventsApiLookupEventRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof HubEventsApiInterface * @returns {Promise<HubEvent>} A promise that resolves to a `HubEvent` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-event) * */ lookupEvent(requestParameters: HubEventsApiLookupEventRequest, options?: RawAxiosRequestConfig): AxiosPromise<HubEvent>; } /** * Request parameters for fetchEvents operation in HubEventsApi. * @export * @interface HubEventsApiFetchEventsRequest */ export interface HubEventsApiFetchEventsRequest { /** * An optional Hub Id to start getting events from. This is also returned from the API as nextPageEventId, which can be used to page through all the Hub events. Set it to 0 to start from the first event. * * * * @type {number} * @memberof HubEventsApiFetchEvents */ readonly fromEventId?: number; } /** * Request parameters for lookupEvent operation in HubEventsApi. * @export * @interface HubEventsApiLookupEventRequest */ export interface HubEventsApiLookupEventRequest { /** * The Hub Id of the event * * * * @type {number} * @memberof HubEventsApiLookupEvent */ readonly eventId: number; } /** * HubEventsApi - object-oriented interface * @export * @class HubEventsApi * @extends {BaseAPI} */ export declare class HubEventsApi extends BaseAPI implements HubEventsApiInterface { /** * Fetch a list of events. * @summary Page of events * @param {HubEventsApiFetchEventsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof HubEventsApi * @returns {Promise<FetchEvents200Response>} A promise that resolves to a `FetchEvents200Response` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-events) * */ fetchEvents(requestParameters?: HubEventsApiFetchEventsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FetchEvents200Response, any, {}>>; /** * Lookup an event by its ID. * @summary Event by ID * @param {HubEventsApiLookupEventRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof HubEventsApi * @returns {Promise<HubEvent>} A promise that resolves to a `HubEvent` object * * For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-event) * */ lookupEvent(requestParameters: HubEventsApiLookupEventRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HubEvent, any, {}>>; }