feat(spotify): implement milestone M3 api commands
This commit is contained in:
@@ -4,6 +4,13 @@ import minimist from "minimist";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
import { getAuthStatus, runAuthorizationFlow } from "./auth.js";
|
||||
import {
|
||||
runAddToPlaylistCommand,
|
||||
runCreatePlaylistCommand,
|
||||
runRemoveFromPlaylistCommand,
|
||||
runSearchAndAddCommand
|
||||
} from "./playlists.js";
|
||||
import { runListPlaylistsCommand, runSearchCommand } from "./search.js";
|
||||
|
||||
export interface CliDeps {
|
||||
stdout: Pick<NodeJS.WriteStream, "write">;
|
||||
@@ -14,7 +21,7 @@ export interface ParsedCli {
|
||||
command: string;
|
||||
positional: string[];
|
||||
json: boolean;
|
||||
public: boolean;
|
||||
public?: boolean;
|
||||
limit?: string;
|
||||
offset?: string;
|
||||
description?: string;
|
||||
@@ -57,12 +64,12 @@ export function createDefaultHandlers(): CommandHandlers {
|
||||
}
|
||||
return status.configFound && status.tokenFound ? 0 : 1;
|
||||
},
|
||||
search: notImplemented("search"),
|
||||
"list-playlists": notImplemented("list-playlists"),
|
||||
"create-playlist": notImplemented("create-playlist"),
|
||||
"add-to-playlist": notImplemented("add-to-playlist"),
|
||||
"remove-from-playlist": notImplemented("remove-from-playlist"),
|
||||
"search-and-add": notImplemented("search-and-add"),
|
||||
search: runSearchCommand,
|
||||
"list-playlists": runListPlaylistsCommand,
|
||||
"create-playlist": runCreatePlaylistCommand,
|
||||
"add-to-playlist": runAddToPlaylistCommand,
|
||||
"remove-from-playlist": runRemoveFromPlaylistCommand,
|
||||
"search-and-add": runSearchAndAddCommand,
|
||||
import: notImplemented("import")
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user