mirror of
https://github.com/jdalrymple/gitbeaker.git
synced 2026-01-25 16:04:01 +00:00
25 lines
662 B
TypeScript
25 lines
662 B
TypeScript
import { BaseService, RequestHelper, BaseRequestOptions } from '../infrastructure';
|
|
import { GroupId, ProjectId } from '.';
|
|
|
|
class IssuesStatistics extends BaseService {
|
|
all({
|
|
projectId,
|
|
groupId,
|
|
...options
|
|
}: ({ projectId?: ProjectId } | { groupId?: GroupId } | {}) & BaseRequestOptions = {}) {
|
|
let url;
|
|
|
|
if (projectId) {
|
|
url = `projects/${encodeURIComponent(projectId)}/issues_statistics`;
|
|
} else if (groupId) {
|
|
url = `groups/${encodeURIComponent(groupId)}/issues_statistics`;
|
|
} else {
|
|
url = 'issues_statistics';
|
|
}
|
|
|
|
return RequestHelper.get(this, url, options);
|
|
}
|
|
}
|
|
|
|
export default IssuesStatistics;
|