Closed mmktomato closed 3 years ago
These three's *IdOrKey
parameters are in request body. The endpoints accept both project id (number
) and project key (string
). So the parameters should be string | number
.
The others' *IdOrKey
parameters are in request path. For example:
public getIssue(issueIdOrKey: string | number): Promise<any> {
return this.get(`issues/${issueIdOrKey}`);
}
If you pass project key (string
) to it, the path is issues/MY_PROJ_KEY
.
If you pass project id (number
) to it, the path is issues/12345
.
The endpoints accept both. So the parameters should be string | number
.
Conclusion: string | number
for all *IdOrKey
parameters in this library.
For example,
https://github.com/nulab/backlog-js/blob/3e9f817b2b2014ece946e0cbd35781bcb7e65ba9/src/backlog.ts#L303
but in reference,
One more example.
https://github.com/nulab/backlog-js/blob/3e9f817b2b2014ece946e0cbd35781bcb7e65ba9/src/option.ts#L540
but in reference,
I think backlog-js should follow the references.