CLI: expose public search language with --language
评估
调研方向
改动应放在 spotapi/cli.py 中,那里定义了 search 子命令的参数并将其转发给 Public.search;离线测试用例应放在 tests/test_cli.py 中。先阅读现有 search 参数是如何接入的,然后添加一个可选的 --language 参数,并将其值原样传递。完成的标准是:帮助文本中显示一个示例 locale,省略该参数时行为与之前一致,并且离线测试同时覆盖提供参数和省略参数两种情况。
由索引模型根据 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 --helpdocuments--languagewith 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,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Aran404/SpotAPI 的其他 Issue
-
CLI: reject invalid player seek and volume values before connecting可能重新可做 关联的 PR 已关闭且未合并。 未关闭bug good first issue
难度 2/5 1-3 小时 新手友好度 75/100
-
documentation enhancement help wanted
难度 4/5 3-5 天 新手友好度 42/100
相似的 Issue
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 88/100
JheysonJhordyHuarauyaRiquelme/sprocguard#18 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 80/100
dlq/synthpopcan#59 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
mdn/translated-content#40220 ·
维护者通常 4 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 84/100
ETSInitiative/PETSIRD#243 ·
维护者通常 1 天内回复
-
deferred p2
难度 2/5 1-3 小时 新手友好度 70/100
cuadrao-ai/argus#2160 ·
维护者通常 1 天内回复