Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Provide convenience method for adding a client-id header

未关闭
#49 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

@Sharvin-M 已经在做这个了。

开始于 2025年1月14日。

  • #97 来自 @Sharvin-M —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
python
领域
api

调研方向

从现有的 token 和 bearer_token 方法旁边的 Query 类开始,然后检查 python_cmr 包的版本是如何公开的。当 client_id 便捷方法能够按照所要求的默认值或版本后缀行为设置 Client-Id,并覆盖用户提供的 ID 和默认 ID 时,即表示完成。

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

描述

enhancement good first issue

The Headers section of the CMR Search API documentation describes the Client-Id header as follows:

Client-Id - Indicates a name for the client using the CMR API. Specifying this helps Operations monitor query performance per client. It can also make it easier for them to identify your requests if you contact them for assistance.

Given that there are token and bearer_token methods in the Query class for conveniently setting the Authorization header, providing a client_id method would be convenient for supplying the Client-Id header.

Further, I recommend the following:

  • When the user does not invoke the client_id method to specify their own chosen ID for identification for assistance, a default should be set. I recommend something like this: python_cmr-vX.Y.Z, where X.Y.Z is the version of python_cmr
  • When the user does invoke the client_id method, the following suffix should be added to the value specified by the user: (python_cmr-vX.Y.Z), with a space character between the user-supplied value and the suffix.
主要语言
Python
星标
29
派生
32
平均合并
19 小时 6 分钟
30 天内合并 PR
1

贡献指南

这个仓库没有索引到贡献指南

从这里开始

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

nasa/python_cmr 的其他 Issue

查看 nasa/python_cmr 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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