@standard-crypto/farcaster-js-hub-rest
Version:
A tool for interacting with the REST API of any Farcaster hub.
122 lines (121 loc) • 6.57 kB
TypeScript
/**
* Farcaster Hub REST API
* Perform basic queries of Farcaster state via the REST API of a Farcaster hub. See the [Farcaster docs](https://www.thehubble.xyz/docs/httpapi/httpapi.html) for more details. Some client libraries: - [TypeScript](https://www.npmjs.com/package/@standard-crypto/farcaster-js-hub-rest)
*
* The version of the OpenAPI document: 1.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 { GetUserDataByFid200Response } from '../models/index.js';
import { UserDataType } from '../models/index.js';
/**
* UserDataApi - axios parameter creator
* @export
*/
export declare const UserDataApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead
* @summary Get UserData for a FID.
* @param {number} fid The FID that\'s being requested
* @param {UserDataType} [userDataType] The type of user data, either as a numerical value or type string. If this is omitted, all user data for the FID is returned
* @param {number} [pageSize] Maximum number of messages to return in a single response
* @param {boolean} [reverse] Reverse the sort order, returning latest messages first
* @param {string} [pageToken] The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserDataByFid: (fid: number, userDataType?: UserDataType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* UserDataApi - functional programming interface
* @export
*/
export declare const UserDataApiFp: (configuration?: Configuration) => {
/**
* **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead
* @summary Get UserData for a FID.
* @param {number} fid The FID that\'s being requested
* @param {UserDataType} [userDataType] The type of user data, either as a numerical value or type string. If this is omitted, all user data for the FID is returned
* @param {number} [pageSize] Maximum number of messages to return in a single response
* @param {boolean} [reverse] Reverse the sort order, returning latest messages first
* @param {string} [pageToken] The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserDataByFid(fid: number, userDataType?: UserDataType, pageSize?: number, reverse?: boolean, pageToken?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetUserDataByFid200Response>>;
};
/**
* UserDataApi - factory interface
* @export
*/
export declare const UserDataApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead
* @summary Get UserData for a FID.
* @param {UserDataApiGetUserDataByFidRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getUserDataByFid(requestParameters: UserDataApiGetUserDataByFidRequest, options?: AxiosRequestConfig): AxiosPromise<GetUserDataByFid200Response>;
};
/**
* Request parameters for getUserDataByFid operation in UserDataApi.
* @export
* @interface UserDataApiGetUserDataByFidRequest
*/
export interface UserDataApiGetUserDataByFidRequest {
/**
* The FID that\'s being requested
* @type {number}
* @memberof UserDataApiGetUserDataByFid
*/
readonly fid: number;
/**
* The type of user data, either as a numerical value or type string. If this is omitted, all user data for the FID is returned
* @type {UserDataType}
* @memberof UserDataApiGetUserDataByFid
*/
readonly userDataType?: UserDataType;
/**
* Maximum number of messages to return in a single response
* @type {number}
* @memberof UserDataApiGetUserDataByFid
*/
readonly pageSize?: number;
/**
* Reverse the sort order, returning latest messages first
* @type {boolean}
* @memberof UserDataApiGetUserDataByFid
*/
readonly reverse?: boolean;
/**
* The page token returned by the previous query, to fetch the next page. If this parameter is empty, fetch the first page
* @type {string}
* @memberof UserDataApiGetUserDataByFid
*/
readonly pageToken?: string;
}
/**
* UserDataApi - object-oriented interface
* @export
* @class UserDataApi
* @extends {BaseAPI}
*/
export declare class UserDataApi extends BaseAPI {
/**
* **Note:** one of two different response schemas is returned based on whether the caller provides the `user_data_type` parameter. If included, a single `UserDataAdd` message is returned (or a `not_found` error). If omitted, a paginated list of `UserDataAdd` messages is returned instead
* @summary Get UserData for a FID.
* @param {UserDataApiGetUserDataByFidRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof UserDataApi
*/
getUserDataByFid(requestParameters: UserDataApiGetUserDataByFidRequest, options?: AxiosRequestConfig): Promise<globalAxios.AxiosResponse<GetUserDataByFid200Response, any>>;
}