@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
169 lines (168 loc) • 6.79 kB
TypeScript
/**
* Farcaster API V2
* The Farcaster API allows you to interact with the Farcaster protocol. See the [Neynar docs](https://docs.neynar.com/reference) for more details.
*
* The version of the OpenAPI document: 2.26.1
* 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 { CastsMetricsResponse } from '../models';
/**
* MetricsApi - axios parameter creator
* @export
*/
export declare const MetricsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {string} q Query string to search for casts
* @param {FetchCastMetricsIntervalEnum} [interval] Interval of time for which to fetch metrics. Choices are `1d`, `7d`, `30d`
* @param {number} [authorFid] Fid of the user whose casts you want to search
* @param {string} [channelId] Channel ID of the casts you want to search
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics: (q: string, interval?: FetchCastMetricsIntervalEnum, authorFid?: number, channelId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* MetricsApi - functional programming interface
* @export
*/
export declare const MetricsApiFp: (configuration?: Configuration) => {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {string} q Query string to search for casts
* @param {FetchCastMetricsIntervalEnum} [interval] Interval of time for which to fetch metrics. Choices are `1d`, `7d`, `30d`
* @param {number} [authorFid] Fid of the user whose casts you want to search
* @param {string} [channelId] Channel ID of the casts you want to search
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics(q: string, interval?: FetchCastMetricsIntervalEnum, authorFid?: number, channelId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CastsMetricsResponse>>;
};
/**
* MetricsApi - factory interface
* @export
*/
export declare const MetricsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {MetricsApiFetchCastMetricsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics(requestParameters: MetricsApiFetchCastMetricsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CastsMetricsResponse>;
};
/**
* MetricsApi - interface
* @export
* @interface MetricsApi
*/
export interface MetricsApiInterface {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {MetricsApiFetchCastMetricsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsApiInterface
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics(requestParameters: MetricsApiFetchCastMetricsRequest, options?: RawAxiosRequestConfig): AxiosPromise<CastsMetricsResponse>;
}
/**
* Request parameters for fetchCastMetrics operation in MetricsApi.
* @export
* @interface MetricsApiFetchCastMetricsRequest
*/
export interface MetricsApiFetchCastMetricsRequest {
/**
* Query string to search for casts
*
*
*
* @type {string}
* @memberof MetricsApiFetchCastMetrics
*/
readonly q: string;
/**
* Interval of time for which to fetch metrics. Choices are `1d`, `7d`, `30d`
*
*
*
* @type {'1d' | '7d' | '30d'}
* @memberof MetricsApiFetchCastMetrics
*/
readonly interval?: FetchCastMetricsIntervalEnum;
/**
* Fid of the user whose casts you want to search
*
*
*
* @type {number}
* @memberof MetricsApiFetchCastMetrics
*/
readonly authorFid?: number;
/**
* Channel ID of the casts you want to search
*
*
*
* @type {string}
* @memberof MetricsApiFetchCastMetrics
*/
readonly channelId?: string;
}
/**
* MetricsApi - object-oriented interface
* @export
* @class MetricsApi
* @extends {BaseAPI}
*/
export declare class MetricsApi extends BaseAPI implements MetricsApiInterface {
/**
* Fetches metrics casts matching a query
* @summary Metrics for casts
* @param {MetricsApiFetchCastMetricsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetricsApi
* @returns {Promise<CastsMetricsResponse>} A promise that resolves to a `CastsMetricsResponse` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-metrics)
*
*/
fetchCastMetrics(requestParameters: MetricsApiFetchCastMetricsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CastsMetricsResponse, any>>;
}
/**
* @export
*/
export declare const FetchCastMetricsIntervalEnum: {
readonly _1d: "1d";
readonly _7d: "7d";
readonly _30d: "30d";
};
export type FetchCastMetricsIntervalEnum = typeof FetchCastMetricsIntervalEnum[keyof typeof FetchCastMetricsIntervalEnum];