mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-27 16:57:44 +00:00
feat(track): add follow-token-groups subcommand
Adds `track follow-token-groups` command that calls GET /v1/user/follow_token_groups to retrieve a wallet's token follow group names (id, name, rank) for a given chain. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -438,6 +438,10 @@ export class OpenApiClient {
|
||||
return this.authExistRequest("GET", "/v1/user/follow_tokens", { chain, wallet_address: walletAddress, ...extra });
|
||||
}
|
||||
|
||||
async getFollowGroupNames(chain: string, walletAddress: string): Promise<unknown> {
|
||||
return this.authExistRequest("GET", "/v1/user/follow_token_groups", { chain, wallet_address: walletAddress });
|
||||
}
|
||||
|
||||
async getKol(chain?: string, limit?: number): Promise<unknown> {
|
||||
const query: Record<string, string | number> = {};
|
||||
if (chain) query["chain"] = chain;
|
||||
|
||||
@@ -35,6 +35,19 @@ export function registerTrackCommands(program: Command): void {
|
||||
printResult(data, opts.raw);
|
||||
});
|
||||
|
||||
track
|
||||
.command("follow-token-groups")
|
||||
.description("Get the follow token group names for a wallet on a given chain")
|
||||
.requiredOption("--chain <chain>", "Chain: sol / bsc / base / eth")
|
||||
.requiredOption("--wallet <address>", "Wallet address")
|
||||
.option("--raw", "Output raw JSON")
|
||||
.action(async (opts) => {
|
||||
validateChain(opts.chain);
|
||||
const client = new OpenApiClient(getConfig());
|
||||
const data = await client.getFollowGroupNames(opts.chain, opts.wallet).catch(exitOnError);
|
||||
printResult(data, opts.raw);
|
||||
});
|
||||
|
||||
track
|
||||
.command("follow-wallet")
|
||||
.description("Get follow-wallet trade records")
|
||||
|
||||
Reference in New Issue
Block a user