@neynar/nodejs-sdk
Version:
SDK to interact with Neynar APIs (https://docs.neynar.com/reference/quickstart)
492 lines (491 loc) • 31.3 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* 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.
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ReactionsApi = exports.ReactionsApiFactory = exports.ReactionsApiFp = exports.ReactionsApiAxiosParamCreator = void 0;
const axios_1 = __importDefault(require("axios"));
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
* ReactionsApi - axios parameter creator
* @export
*/
const ReactionsApiAxiosParamCreator = function (configuration) {
return {
/**
* Retrieve all reactions (likes or recasts) on a specific cast in the Farcaster network. The cast is identified by its creator\'s FID and unique hash. This endpoint helps track engagement metrics and user interactions with specific content.
* @summary On cast
* @param {number} targetFid The FID of the cast\'s creator. Required to uniquely identify the cast that received the reactions. Must be used in conjunction with target_hash.
* @param {string} targetHash The unique hash identifier of the cast that received the reactions. This is a 40-character hexadecimal string prefixed with \'0x\' that uniquely identifies the cast within the creator\'s posts. Must be used with target_fid.
* @param {ReactionType} reactionType
* @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}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-reactions)
*
*/
fetchCastReactions: async (targetFid, targetHash, reactionType, pageSize, reverse, pageToken, options = {}) => {
// verify required parameter 'targetFid' is not null or undefined
(0, common_1.assertParamExists)('fetchCastReactions', 'targetFid', targetFid);
// verify required parameter 'targetHash' is not null or undefined
(0, common_1.assertParamExists)('fetchCastReactions', 'targetHash', targetHash);
// verify required parameter 'reactionType' is not null or undefined
(0, common_1.assertParamExists)('fetchCastReactions', 'reactionType', reactionType);
const localVarPath = `/v1/reactionsByCast`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
if (targetFid !== undefined) {
localVarQueryParameter['target_fid'] = targetFid;
}
if (targetHash !== undefined) {
localVarQueryParameter['target_hash'] = targetHash;
}
if (reactionType !== undefined) {
localVarQueryParameter['reaction_type'] = reactionType;
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (reverse !== undefined) {
localVarQueryParameter['reverse'] = reverse;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Fetch all reactions of a specific type (like or recast) that target a given URL. This endpoint is useful for tracking engagement with content across the Farcaster network.
* @summary To a target URL
* @param {string} url Target URL starting with \'chain://\'.
* @param {ReactionType} [reactionType]
* @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}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-reactions-by-target)
*
*/
fetchReactionsByTarget: async (url, reactionType, pageSize, reverse, pageToken, options = {}) => {
// verify required parameter 'url' is not null or undefined
(0, common_1.assertParamExists)('fetchReactionsByTarget', 'url', url);
const localVarPath = `/v1/reactionsByTarget`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
if (url !== undefined) {
localVarQueryParameter['url'] = url;
}
if (reactionType !== undefined) {
localVarQueryParameter['reaction_type'] = reactionType;
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (reverse !== undefined) {
localVarQueryParameter['reverse'] = reverse;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Fetch reactions by a user.
* @summary By FID
* @param {number} fid The FID of the reaction\'s creator
* @param {ReactionType} reactionType
* @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}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-reactions)
*
*/
fetchUserReactions: async (fid, reactionType, pageSize, reverse, pageToken, options = {}) => {
// verify required parameter 'fid' is not null or undefined
(0, common_1.assertParamExists)('fetchUserReactions', 'fid', fid);
// verify required parameter 'reactionType' is not null or undefined
(0, common_1.assertParamExists)('fetchUserReactions', 'reactionType', reactionType);
const localVarPath = `/v1/reactionsByFid`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
if (fid !== undefined) {
localVarQueryParameter['fid'] = fid;
}
if (reactionType !== undefined) {
localVarQueryParameter['reaction_type'] = reactionType;
}
if (pageSize !== undefined) {
localVarQueryParameter['pageSize'] = pageSize;
}
if (reverse !== undefined) {
localVarQueryParameter['reverse'] = reverse;
}
if (pageToken !== undefined) {
localVarQueryParameter['pageToken'] = pageToken;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Lookup a reaction by its FID or cast.
* @summary By FID or cast
* @param {number} fid The FID of the reaction\'s creator
* @param {number} targetFid The FID of the cast\'s creator
* @param {string} targetHash The cast\'s hash
* @param {ReactionType} reactionType
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<Reaction>} A promise that resolves to a `Reaction` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-reaction-by-id)
*
*/
lookupReactionById: async (fid, targetFid, targetHash, reactionType, options = {}) => {
// verify required parameter 'fid' is not null or undefined
(0, common_1.assertParamExists)('lookupReactionById', 'fid', fid);
// verify required parameter 'targetFid' is not null or undefined
(0, common_1.assertParamExists)('lookupReactionById', 'targetFid', targetFid);
// verify required parameter 'targetHash' is not null or undefined
(0, common_1.assertParamExists)('lookupReactionById', 'targetHash', targetHash);
// verify required parameter 'reactionType' is not null or undefined
(0, common_1.assertParamExists)('lookupReactionById', 'reactionType', reactionType);
const localVarPath = `/v1/reactionById`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-api-key", configuration);
if (fid !== undefined) {
localVarQueryParameter['fid'] = fid;
}
if (targetFid !== undefined) {
localVarQueryParameter['target_fid'] = targetFid;
}
if (targetHash !== undefined) {
localVarQueryParameter['target_hash'] = targetHash;
}
if (reactionType !== undefined) {
localVarQueryParameter['reaction_type'] = reactionType;
}
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.ReactionsApiAxiosParamCreator = ReactionsApiAxiosParamCreator;
/**
* ReactionsApi - functional programming interface
* @export
*/
const ReactionsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.ReactionsApiAxiosParamCreator)(configuration);
return {
/**
* Retrieve all reactions (likes or recasts) on a specific cast in the Farcaster network. The cast is identified by its creator\'s FID and unique hash. This endpoint helps track engagement metrics and user interactions with specific content.
* @summary On cast
* @param {number} targetFid The FID of the cast\'s creator. Required to uniquely identify the cast that received the reactions. Must be used in conjunction with target_hash.
* @param {string} targetHash The unique hash identifier of the cast that received the reactions. This is a 40-character hexadecimal string prefixed with \'0x\' that uniquely identifies the cast within the creator\'s posts. Must be used with target_fid.
* @param {ReactionType} reactionType
* @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}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-reactions)
*
*/
async fetchCastReactions(targetFid, targetHash, reactionType, pageSize, reverse, pageToken, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchCastReactions(targetFid, targetHash, reactionType, pageSize, reverse, pageToken, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ReactionsApi.fetchCastReactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Fetch all reactions of a specific type (like or recast) that target a given URL. This endpoint is useful for tracking engagement with content across the Farcaster network.
* @summary To a target URL
* @param {string} url Target URL starting with \'chain://\'.
* @param {ReactionType} [reactionType]
* @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}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-reactions-by-target)
*
*/
async fetchReactionsByTarget(url, reactionType, pageSize, reverse, pageToken, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchReactionsByTarget(url, reactionType, pageSize, reverse, pageToken, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ReactionsApi.fetchReactionsByTarget']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Fetch reactions by a user.
* @summary By FID
* @param {number} fid The FID of the reaction\'s creator
* @param {ReactionType} reactionType
* @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}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-reactions)
*
*/
async fetchUserReactions(fid, reactionType, pageSize, reverse, pageToken, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchUserReactions(fid, reactionType, pageSize, reverse, pageToken, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ReactionsApi.fetchUserReactions']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Lookup a reaction by its FID or cast.
* @summary By FID or cast
* @param {number} fid The FID of the reaction\'s creator
* @param {number} targetFid The FID of the cast\'s creator
* @param {string} targetHash The cast\'s hash
* @param {ReactionType} reactionType
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<Reaction>} A promise that resolves to a `Reaction` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-reaction-by-id)
*
*/
async lookupReactionById(fid, targetFid, targetHash, reactionType, options) {
var _a, _b, _c;
const localVarAxiosArgs = await localVarAxiosParamCreator.lookupReactionById(fid, targetFid, targetHash, reactionType, options);
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['ReactionsApi.lookupReactionById']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
};
};
exports.ReactionsApiFp = ReactionsApiFp;
/**
* ReactionsApi - factory interface
* @export
*/
const ReactionsApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.ReactionsApiFp)(configuration);
return {
/**
* Retrieve all reactions (likes or recasts) on a specific cast in the Farcaster network. The cast is identified by its creator\'s FID and unique hash. This endpoint helps track engagement metrics and user interactions with specific content.
* @summary On cast
* @param {ReactionsApiFetchCastReactionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-reactions)
*
*/
fetchCastReactions(requestParameters, options) {
return localVarFp.fetchCastReactions(requestParameters.targetFid, requestParameters.targetHash, requestParameters.reactionType, requestParameters.pageSize, requestParameters.reverse, requestParameters.pageToken, options).then((request) => request(axios, basePath));
},
/**
* Fetch all reactions of a specific type (like or recast) that target a given URL. This endpoint is useful for tracking engagement with content across the Farcaster network.
* @summary To a target URL
* @param {ReactionsApiFetchReactionsByTargetRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-reactions-by-target)
*
*/
fetchReactionsByTarget(requestParameters, options) {
return localVarFp.fetchReactionsByTarget(requestParameters.url, requestParameters.reactionType, requestParameters.pageSize, requestParameters.reverse, requestParameters.pageToken, options).then((request) => request(axios, basePath));
},
/**
* Fetch reactions by a user.
* @summary By FID
* @param {ReactionsApiFetchUserReactionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-reactions)
*
*/
fetchUserReactions(requestParameters, options) {
return localVarFp.fetchUserReactions(requestParameters.fid, requestParameters.reactionType, requestParameters.pageSize, requestParameters.reverse, requestParameters.pageToken, options).then((request) => request(axios, basePath));
},
/**
* Lookup a reaction by its FID or cast.
* @summary By FID or cast
* @param {ReactionsApiLookupReactionByIdRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @returns {Promise<Reaction>} A promise that resolves to a `Reaction` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-reaction-by-id)
*
*/
lookupReactionById(requestParameters, options) {
return localVarFp.lookupReactionById(requestParameters.fid, requestParameters.targetFid, requestParameters.targetHash, requestParameters.reactionType, options).then((request) => request(axios, basePath));
},
};
};
exports.ReactionsApiFactory = ReactionsApiFactory;
/**
* ReactionsApi - object-oriented interface
* @export
* @class ReactionsApi
* @extends {BaseAPI}
*/
class ReactionsApi extends base_1.BaseAPI {
/**
* Retrieve all reactions (likes or recasts) on a specific cast in the Farcaster network. The cast is identified by its creator\'s FID and unique hash. This endpoint helps track engagement metrics and user interactions with specific content.
* @summary On cast
* @param {ReactionsApiFetchCastReactionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReactionsApi
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-cast-reactions)
*
*/
fetchCastReactions(requestParameters, options) {
return (0, exports.ReactionsApiFp)(this.configuration).fetchCastReactions(requestParameters.targetFid, requestParameters.targetHash, requestParameters.reactionType, requestParameters.pageSize, requestParameters.reverse, requestParameters.pageToken, options).then((request) => request(this.axios, this.basePath));
}
/**
* Fetch all reactions of a specific type (like or recast) that target a given URL. This endpoint is useful for tracking engagement with content across the Farcaster network.
* @summary To a target URL
* @param {ReactionsApiFetchReactionsByTargetRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReactionsApi
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-reactions-by-target)
*
*/
fetchReactionsByTarget(requestParameters, options) {
return (0, exports.ReactionsApiFp)(this.configuration).fetchReactionsByTarget(requestParameters.url, requestParameters.reactionType, requestParameters.pageSize, requestParameters.reverse, requestParameters.pageToken, options).then((request) => request(this.axios, this.basePath));
}
/**
* Fetch reactions by a user.
* @summary By FID
* @param {ReactionsApiFetchUserReactionsRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReactionsApi
* @returns {Promise<FetchCastReactions200Response>} A promise that resolves to a `FetchCastReactions200Response` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/fetch-user-reactions)
*
*/
fetchUserReactions(requestParameters, options) {
return (0, exports.ReactionsApiFp)(this.configuration).fetchUserReactions(requestParameters.fid, requestParameters.reactionType, requestParameters.pageSize, requestParameters.reverse, requestParameters.pageToken, options).then((request) => request(this.axios, this.basePath));
}
/**
* Lookup a reaction by its FID or cast.
* @summary By FID or cast
* @param {ReactionsApiLookupReactionByIdRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ReactionsApi
* @returns {Promise<Reaction>} A promise that resolves to a `Reaction` object
*
* For more information, refer to the [API documentation](https://docs.neynar.com/reference/lookup-reaction-by-id)
*
*/
lookupReactionById(requestParameters, options) {
return (0, exports.ReactionsApiFp)(this.configuration).lookupReactionById(requestParameters.fid, requestParameters.targetFid, requestParameters.targetHash, requestParameters.reactionType, options).then((request) => request(this.axios, this.basePath));
}
}
exports.ReactionsApi = ReactionsApi;