UNPKG

@standard-crypto/farcaster-js-neynar

Version:

A tool for interacting with Farcaster via Neynar APIs.

224 lines 11.5 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * v1 Farcaster * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * 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. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.NotificationsApi = exports.NotificationsApiFactory = exports.NotificationsApiFp = exports.NotificationsApiAxiosParamCreator = void 0; const axios_1 = __importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_js_1 = require("../common.js"); // @ts-ignore const base_js_1 = require("../base.js"); /** * NotificationsApi - axios parameter creator * @export */ const NotificationsApiAxiosParamCreator = function (configuration) { return { /** * Gets a list of mentions and replies to the user’s casts in reverse chronological order * @summary Get mentions and replies * @param {number} fid fid of a user * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. * @param {string} [cursor] Pagination cursor. * @param {number} [limit] Number of results to retrieve (default 25, max 150) * @param {*} [options] Override http request option. * @throws {RequiredError} */ mentionsAndReplies: async (fid, viewerFid, cursor, limit, options = {}) => { // verify required parameter 'fid' is not null or undefined (0, common_js_1.assertParamExists)('mentionsAndReplies', 'fid', fid); const localVarPath = `/farcaster/mentions-and-replies`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_js_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication ApiKeyAuth required await (0, common_js_1.setApiKeyToObject)(localVarHeaderParameter, "api_key", configuration); if (fid !== undefined) { localVarQueryParameter['fid'] = fid; } if (viewerFid !== undefined) { localVarQueryParameter['viewerFid'] = viewerFid; } if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } (0, common_js_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_js_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Get a list of reactions and recasts to the users’s casts in reverse chronological order * @summary Get reactions and recasts * @param {number} fid fid of a user * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. * @param {string} [cursor] Pagination cursor. * @param {number} [limit] Number of results to retrieve (default 25, max 150) * @param {*} [options] Override http request option. * @throws {RequiredError} */ reactionsAndRecasts: async (fid, viewerFid, cursor, limit, options = {}) => { // verify required parameter 'fid' is not null or undefined (0, common_js_1.assertParamExists)('reactionsAndRecasts', 'fid', fid); const localVarPath = `/farcaster/reactions-and-recasts`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_js_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication ApiKeyAuth required await (0, common_js_1.setApiKeyToObject)(localVarHeaderParameter, "api_key", configuration); if (fid !== undefined) { localVarQueryParameter['fid'] = fid; } if (viewerFid !== undefined) { localVarQueryParameter['viewerFid'] = viewerFid; } if (cursor !== undefined) { localVarQueryParameter['cursor'] = cursor; } if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } (0, common_js_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_js_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.NotificationsApiAxiosParamCreator = NotificationsApiAxiosParamCreator; /** * NotificationsApi - functional programming interface * @export */ const NotificationsApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.NotificationsApiAxiosParamCreator)(configuration); return { /** * Gets a list of mentions and replies to the user’s casts in reverse chronological order * @summary Get mentions and replies * @param {number} fid fid of a user * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. * @param {string} [cursor] Pagination cursor. * @param {number} [limit] Number of results to retrieve (default 25, max 150) * @param {*} [options] Override http request option. * @throws {RequiredError} */ async mentionsAndReplies(fid, viewerFid, cursor, limit, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.mentionsAndReplies(fid, viewerFid, cursor, limit, options); return (0, common_js_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_js_1.BASE_PATH, configuration); }, /** * Get a list of reactions and recasts to the users’s casts in reverse chronological order * @summary Get reactions and recasts * @param {number} fid fid of a user * @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information. * @param {string} [cursor] Pagination cursor. * @param {number} [limit] Number of results to retrieve (default 25, max 150) * @param {*} [options] Override http request option. * @throws {RequiredError} */ async reactionsAndRecasts(fid, viewerFid, cursor, limit, options) { const localVarAxiosArgs = await localVarAxiosParamCreator.reactionsAndRecasts(fid, viewerFid, cursor, limit, options); return (0, common_js_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_js_1.BASE_PATH, configuration); }, }; }; exports.NotificationsApiFp = NotificationsApiFp; /** * NotificationsApi - factory interface * @export */ const NotificationsApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.NotificationsApiFp)(configuration); return { /** * Gets a list of mentions and replies to the user’s casts in reverse chronological order * @summary Get mentions and replies * @param {NotificationsApiMentionsAndRepliesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ mentionsAndReplies(requestParameters, options) { return localVarFp.mentionsAndReplies(requestParameters.fid, requestParameters.viewerFid, requestParameters.cursor, requestParameters.limit, options).then((request) => request(axios, basePath)); }, /** * Get a list of reactions and recasts to the users’s casts in reverse chronological order * @summary Get reactions and recasts * @param {NotificationsApiReactionsAndRecastsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} */ reactionsAndRecasts(requestParameters, options) { return localVarFp.reactionsAndRecasts(requestParameters.fid, requestParameters.viewerFid, requestParameters.cursor, requestParameters.limit, options).then((request) => request(axios, basePath)); }, }; }; exports.NotificationsApiFactory = NotificationsApiFactory; /** * NotificationsApi - object-oriented interface * @export * @class NotificationsApi * @extends {BaseAPI} */ class NotificationsApi extends base_js_1.BaseAPI { /** * Gets a list of mentions and replies to the user’s casts in reverse chronological order * @summary Get mentions and replies * @param {NotificationsApiMentionsAndRepliesRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NotificationsApi */ mentionsAndReplies(requestParameters, options) { return (0, exports.NotificationsApiFp)(this.configuration).mentionsAndReplies(requestParameters.fid, requestParameters.viewerFid, requestParameters.cursor, requestParameters.limit, options).then((request) => request(this.axios, this.basePath)); } /** * Get a list of reactions and recasts to the users’s casts in reverse chronological order * @summary Get reactions and recasts * @param {NotificationsApiReactionsAndRecastsRequest} requestParameters Request parameters. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof NotificationsApi */ reactionsAndRecasts(requestParameters, options) { return (0, exports.NotificationsApiFp)(this.configuration).reactionsAndRecasts(requestParameters.fid, requestParameters.viewerFid, requestParameters.cursor, requestParameters.limit, options).then((request) => request(this.axios, this.basePath)); } } exports.NotificationsApi = NotificationsApi; //# sourceMappingURL=notifications-api.js.map