CLI: expose public search language with --language

未关闭 适合新手
#88 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@semajzandrews 已经在做这个了。

开始于 2026年11月14日。

  • #89 来自 @HarshRajSinghania —— 已关闭,未合并

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
cli, python
领域
cli

调研方向

改动应放在 spotapi/cli.py 中,那里定义了 search 子命令的参数并将其转发给 Public.search;离线测试用例应放在 tests/test_cli.py 中。先阅读现有 search 参数是如何接入的,然后添加一个可选的 --language 参数,并将其值原样传递。完成的标准是:帮助文本中显示一个示例 locale,省略该参数时行为与之前一致,并且离线测试同时覆盖提供参数和省略参数两种情况。

由索引模型根据 Issue 内容生成。

描述

enhancement good first issue

Problem

Public.search(..., language="fr-CA") already supports localized public search, but spotapi search does not expose that option. CLI users must write Python for a capability the CLI can forward directly.

Proposed change

Add an optional locale flag:

spotapi search "Charlotte Cardin" --language fr-CA

Pass its value unchanged to Public.search(..., language=args.language).

Acceptance criteria

  • spotapi search --help documents --language with an example locale.
  • Omitting the option preserves current behavior.
  • The supplied value is forwarded unchanged to Public.search.
  • Offline tests cover both the supplied and omitted cases.
  • No new dependency or Spotify endpoint is introduced.

Scope

The likely implementation is limited to spotapi/cli.py and tests/test_cli.py. Do not add automatic locale detection or change the Python API as part of this issue.

Comment before starting so duplicate work can be avoided.

主要语言
Python
星标
493
派生
40
平均合并
5 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Aran404/SpotAPI 的其他 Issue

查看 Aran404/SpotAPI 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。