Skip to content

Commit

Permalink
Mark fetchCastLikes and fetchRecasters as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Shreyaschorge committed Apr 8, 2024
1 parent b41c068 commit 3189435
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 26 deletions.
6 changes: 6 additions & 0 deletions src/neynar-api/neynar-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,9 @@ export class NeynarAPIClient {
// ------------ Reactions ------------

/**
* @deprecated
* Now deprecated, use `fetchReactionsForCast` instead.
*
* Retrieves all like reactions for a specific cast in reverse chronological order.
*
* @param {CastV1 | string} castOrCastHash - The Cast object or its hash for which likes are being retrieved.
Expand Down Expand Up @@ -626,6 +629,9 @@ export class NeynarAPIClient {
}

/**
* @deprecated
* Now deprecated, use `fetchReactionsForCast` instead.
*
* Retrieves the list of users who have recasted a specific cast.
*
* @param {CastV1 | string} castOrCastHash - The Cast object or its hash for which recasters are being retrieved.
Expand Down
8 changes: 7 additions & 1 deletion src/neynar-api/v1/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export class NeynarV1APIClient {
/**
* @deprecated
* Now deprecated, use `lookupCastConversation` instead.
*
*
* Retrieves all casts, including root cast and all replies for a given thread hash. No limit to the depth of replies.
* **Note :** The parent provided by the caller is included in the response.
*
Expand Down Expand Up @@ -616,6 +616,9 @@ export class NeynarV1APIClient {
// ------------ Reactions ------------

/**
* @deprecated
* Now deprecated, use `fetchReactionsForCast` instead.
*
* Retrieves all like reactions for a specific cast in reverse chronological order.
*
* @param {Cast | string} castOrCastHash - The Cast object or its hash for which likes are being retrieved.
Expand Down Expand Up @@ -717,6 +720,9 @@ export class NeynarV1APIClient {
}

/**
* @deprecated
* Now deprecated, use `fetchReactionsForCast` instead.
*
* Retrieves the list of users who have recasted a specific cast.
*
* @param {Cast | string} castOrCastHash - The Cast object or its hash for which recasters are being retrieved.
Expand Down
4 changes: 4 additions & 0 deletions src/neynar-api/v1/openapi/apis/cast-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const CastApiAxiosParamCreator = function (configuration?: Configuration)
* @param {string} threadHash The hash of the thread to retrieve casts from.
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
allCastsInThread: async (apiKey: string, threadHash: string, viewerFid?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
Expand Down Expand Up @@ -269,6 +270,7 @@ export const CastApiFp = function(configuration?: Configuration) {
* @param {string} threadHash The hash of the thread to retrieve casts from.
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async allCastsInThread(apiKey: string, threadHash: string, viewerFid?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AllCastsInThreadResponse>> {
Expand Down Expand Up @@ -336,6 +338,7 @@ export const CastApiFactory = function (configuration?: Configuration, basePath?
* @param {string} threadHash The hash of the thread to retrieve casts from.
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
allCastsInThread(apiKey: string, threadHash: string, viewerFid?: number, options?: any): AxiosPromise<AllCastsInThreadResponse> {
Expand Down Expand Up @@ -399,6 +402,7 @@ export class CastApi extends BaseAPI {
* @param {string} threadHash The hash of the thread to retrieve casts from.
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof CastApi
*/
Expand Down
60 changes: 36 additions & 24 deletions src/neynar-api/v1/openapi/apis/reactions-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,15 @@ import { ErrorRes } from '../models';
export const ReactionsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Get all like reactions for a specific cast in reverse chronological order.
* @summary Get all like reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all like reactions for a specific cast in reverse chronological order.
* @summary DEPRECATED - Get all like reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
castLikes: async (apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
Expand Down Expand Up @@ -95,14 +96,15 @@ export const ReactionsApiAxiosParamCreator = function (configuration?: Configura
};
},
/**
* Get all reactions (likes and recasts) for a specific cast.
* @summary Get all reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all reactions (likes and recasts) for a specific cast.
* @summary DEPRECATED - Get all reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
castReactions: async (apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
Expand Down Expand Up @@ -154,14 +156,15 @@ export const ReactionsApiAxiosParamCreator = function (configuration?: Configura
};
},
/**
* Get all recasters for a specific cast.
* @summary Get all recasters for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all recasters for a specific cast.
* @summary DEPRECATED - Get all recasters for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
castRecasters: async (apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
Expand Down Expand Up @@ -223,44 +226,47 @@ export const ReactionsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = ReactionsApiAxiosParamCreator(configuration)
return {
/**
* Get all like reactions for a specific cast in reverse chronological order.
* @summary Get all like reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all like reactions for a specific cast in reverse chronological order.
* @summary DEPRECATED - Get all like reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async castLikes(apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CastLikesResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.castLikes(apiKey, castHash, viewerFid, limit, cursor, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Get all reactions (likes and recasts) for a specific cast.
* @summary Get all reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all reactions (likes and recasts) for a specific cast.
* @summary DEPRECATED - Get all reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async castReactions(apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CastReactionsResponse>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.castReactions(apiKey, castHash, viewerFid, limit, cursor, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Get all recasters for a specific cast.
* @summary Get all recasters for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all recasters for a specific cast.
* @summary DEPRECATED - Get all recasters for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
async castRecasters(apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CastRecasterResponse>> {
Expand All @@ -278,42 +284,45 @@ export const ReactionsApiFactory = function (configuration?: Configuration, base
const localVarFp = ReactionsApiFp(configuration)
return {
/**
* Get all like reactions for a specific cast in reverse chronological order.
* @summary Get all like reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all like reactions for a specific cast in reverse chronological order.
* @summary DEPRECATED - Get all like reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
castLikes(apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options?: any): AxiosPromise<CastLikesResponse> {
return localVarFp.castLikes(apiKey, castHash, viewerFid, limit, cursor, options).then((request) => request(axios, basePath));
},
/**
* Get all reactions (likes and recasts) for a specific cast.
* @summary Get all reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all reactions (likes and recasts) for a specific cast.
* @summary DEPRECATED - Get all reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
castReactions(apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options?: any): AxiosPromise<CastReactionsResponse> {
return localVarFp.castReactions(apiKey, castHash, viewerFid, limit, cursor, options).then((request) => request(axios, basePath));
},
/**
* Get all recasters for a specific cast.
* @summary Get all recasters for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all recasters for a specific cast.
* @summary DEPRECATED - Get all recasters for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
*/
castRecasters(apiKey: string, castHash: string, viewerFid?: number, limit?: number, cursor?: string, options?: any): AxiosPromise<CastRecasterResponse> {
Expand All @@ -330,14 +339,15 @@ export const ReactionsApiFactory = function (configuration?: Configuration, base
*/
export class ReactionsApi extends BaseAPI {
/**
* Get all like reactions for a specific cast in reverse chronological order.
* @summary Get all like reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all like reactions for a specific cast in reverse chronological order.
* @summary DEPRECATED - Get all like reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof ReactionsApi
*/
Expand All @@ -346,14 +356,15 @@ export class ReactionsApi extends BaseAPI {
}

/**
* Get all reactions (likes and recasts) for a specific cast.
* @summary Get all reactions for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all reactions (likes and recasts) for a specific cast.
* @summary DEPRECATED - Get all reactions for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof ReactionsApi
*/
Expand All @@ -362,14 +373,15 @@ export class ReactionsApi extends BaseAPI {
}

/**
* Get all recasters for a specific cast.
* @summary Get all recasters for a specific cast
* Now deprecated, use [/v2/farcaster/reactions/cast](https://docs.neynar.com/reference/reactions-cast) - Get all recasters for a specific cast.
* @summary DEPRECATED - Get all recasters for a specific cast
* @param {string} apiKey API key required for authentication.
* @param {string} castHash Cast hash
* @param {number} [viewerFid] fid of the user viewing this information, needed for contextual information.
* @param {number} [limit] Number of results to retrieve (default 25, max 150)
* @param {string} [cursor] Pagination cursor.
* @param {*} [options] Override http request option.
* @deprecated
* @throws {RequiredError}
* @memberof ReactionsApi
*/
Expand Down
2 changes: 1 addition & 1 deletion src/oas
Submodule oas updated 1 files
+8 −6 src/v1/spec.yaml

0 comments on commit 3189435

Please sign in to comment.