Provide convenience method for adding a client-id header
- Dominant language
- Python
- Stars
- 29
- Forks
- 32
- Avg merge
- 19h 6m
- Merged PRs (30d)
- 1
Description
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_idmethod 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, whereX.Y.Zis the version ofpython_cmr - When the user does invoke the
client_idmethod, 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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Query class beside the existing token and bearer_token methods, then check how the python_cmr package version is exposed. Done means a client_id convenience method sets Client-Id with the requested default or version suffix behavior, with coverage for both user-supplied and default IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100